|
|
|
@ -74,24 +74,27 @@ namespace Myshipping.Core.Job
|
|
|
|
|
var ub = _repPingTaiUserBase.FirstOrDefault(x => x.USERID == user.GID);
|
|
|
|
|
|
|
|
|
|
sysUser.Account = user.CODENAME;
|
|
|
|
|
sysUser.Password = DESCEncryption.Encrypt(user.PASSWORD, keyDES);
|
|
|
|
|
//sysUser.Password = DESCEncryption.Encrypt(user.PASSWORD, keyDES); //只在新增时同步密码,防止覆盖
|
|
|
|
|
sysUser.TenantId = tenantId;
|
|
|
|
|
sysUser.Name = user.SHOWNAME;
|
|
|
|
|
//sysUser.Name = user.SHOWNAME;//只在新增时同步姓名,防止覆盖
|
|
|
|
|
sysUser.AdminType = AdminType.None;
|
|
|
|
|
sysUser.DjyUserId = user.GID;
|
|
|
|
|
sysUser.NickName = user.SHOWNAME;
|
|
|
|
|
sysUser.Phone = ub.MOBILE;
|
|
|
|
|
sysUser.Email = ub.EMAIL1;
|
|
|
|
|
sysUser.DjyUserId = user.GID;
|
|
|
|
|
|
|
|
|
|
if (!existUser)
|
|
|
|
|
{
|
|
|
|
|
sysUser.Password = DESCEncryption.Encrypt(user.PASSWORD, keyDES);//只在新增时同步密码
|
|
|
|
|
sysUser.Name = user.SHOWNAME;//只在新增时同步姓名,防止覆盖
|
|
|
|
|
|
|
|
|
|
var newUser = _repUser.Insert(sysUser);
|
|
|
|
|
|
|
|
|
|
var emp = new SysEmp();
|
|
|
|
|
emp.Id = sysUser.Id;
|
|
|
|
|
emp.OrgId = org.Id;
|
|
|
|
|
emp.OrgName = org.Name;
|
|
|
|
|
|
|
|
|
|
_repEmp.Insert(emp);
|
|
|
|
|
|
|
|
|
|
var empPos = new SysEmpPos();
|
|
|
|
@ -107,13 +110,12 @@ namespace Myshipping.Core.Job
|
|
|
|
|
|
|
|
|
|
Log.Information($"新用户,插入:{sysUser.Name}");
|
|
|
|
|
}
|
|
|
|
|
//2023-3-24,暂时取消用户更新,防止数据覆盖
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
// _repUser.Update(sysUser);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_repUser.Update(sysUser);
|
|
|
|
|
|
|
|
|
|
// Log.Information($"老用户,更新:{sysUser.Name}");
|
|
|
|
|
//}
|
|
|
|
|
Log.Information($"老用户,更新:{sysUser.Name}");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
_sugerClient.Ado.CommitTran();
|
|
|
|
|
|
|
|
|
|