Browse Source

优化了市认证数据同步

dev
vincent 3 days ago
parent
commit
e8c0cf71d4
  1. 2
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/quartz/job/SrzDeptOriginalDataJob.java
  2. 4
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/quartz/job/SrzUserOriginalDataJob.java
  3. 62
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/quartz/job/SynDeptInfoJob.java
  4. 161
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/quartz/job/SynUserInfoJob.java
  5. 184
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/SrzDeptMapper.xml
  6. 184
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/SrzUserMapper.xml
  7. 7
      zdxt-modules/zdxt-system/src/main/java/org/dromara/system/service/impl/SysUserServiceImpl.java
  8. 2
      zdxt-web-server/zdxt-admin-web-server/src/main/resources/application-prod.yml

2
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/quartz/job/SrzDeptOriginalDataJob.java

@ -148,7 +148,7 @@ public class SrzDeptOriginalDataJob {
httpPost.setEntity(entity);
log.info("请求参数: {}", params);
CloseableHttpResponse response = client.execute(httpPost);
return EntityUtils.toString(response.getEntity());

4
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/quartz/job/SrzUserOriginalDataJob.java

@ -28,7 +28,7 @@ import java.util.stream.Collectors;
/**
* 同步市认证用户组织信息原始数据
*/
@Slf4j
@Component
@RequiredArgsConstructor
public class SrzUserOriginalDataJob {
@ -62,6 +62,7 @@ public class SrzUserOriginalDataJob {
* 获取市认证用户原始数据
*/
public void getData(){
log.info(" SrzUserOriginalDataJob 获取市认证用户原始数据开始");
List<SysDictDataVo> srz_item = sysDictDataService.selectDictDataByType("srz_item");
Map<String,String> map = srz_item.stream().collect(Collectors.toMap(SysDictDataVo::getDictLabel,SysDictDataVo::getDictValue));
@ -119,6 +120,7 @@ public class SrzUserOriginalDataJob {
} catch (Exception e) {
e.printStackTrace();
}
log.info(" SrzUserOriginalDataJob 获取市认证用户原始数据结束");
}
private String connect(String apiPath) {

62
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/quartz/job/SynDeptInfoJob.java

@ -22,7 +22,7 @@ import java.util.Map;
/**
* 同步部门信息
*/
@Slf4j
@Component
@RequiredArgsConstructor
public class SynDeptInfoJob {
@ -60,35 +60,41 @@ public class SynDeptInfoJob {
// 开始同步更新数据到用户表
for(SrzDeptVo srzDept : srzDeptList){
log.info("====> 获取数据: {}", srzDept.getName());
SysDeptBo sysDeptBo = new SysDeptBo();
// 机构ID organizationId
sysDeptBo.setDeptId(srzDept.getOrganizationid());
// 机构父节点 parentId
sysDeptBo.setParentId(srzDept.getParentid());
sysDeptBo.setOrganizationParentId(srzDept.getParentid());
// 机构名称 name
sysDeptBo.setDeptName(srzDept.getName());
// 行级容错: 单条失败不中断整批同步, 防止毒丸数据反复卡死循环
try {
SysDeptBo sysDeptBo = new SysDeptBo();
// 机构ID organizationId
sysDeptBo.setDeptId(srzDept.getOrganizationid());
// 机构父节点 parentId
sysDeptBo.setParentId(srzDept.getParentid());
sysDeptBo.setOrganizationParentId(srzDept.getParentid());
// 机构名称 name
sysDeptBo.setDeptName(srzDept.getName());
//限制唯一部门id
String organizationId = srzDept.getOrganizationid();
if(StringUtils.isNotEmpty(organizationId)){
SysDeptVo uniqueDept = sysDeptService.selectDeptById(organizationId);
if (null != uniqueDept && uniqueDept.getDeptId() != null) {
// 更新数据库
sysDeptBo.setDeptId(uniqueDept.getDeptId());
log.info("====> 更新数据: {}: {}", uniqueDept.getDeptId(), uniqueDept.getDeptName());
int rowNum = sysDeptService.updateDept(sysDeptBo);
updateNum += rowNum;
} else {
// 插入数据库
log.info("====> 新增数据: {}: {}", sysDeptBo.getDeptId(), sysDeptBo.getDeptName());
int rowNum = sysDeptService.insertDept(sysDeptBo);
insertNum += rowNum;
//限制唯一部门id
String organizationId = srzDept.getOrganizationid();
if(StringUtils.isNotEmpty(organizationId)){
SysDeptVo uniqueDept = sysDeptService.selectDeptById(organizationId);
if (null != uniqueDept && uniqueDept.getDeptId() != null) {
// 更新数据库
sysDeptBo.setDeptId(uniqueDept.getDeptId());
log.info("====> 更新数据: {}: {}", uniqueDept.getDeptId(), uniqueDept.getDeptName());
int rowNum = sysDeptService.updateDept(sysDeptBo);
updateNum += rowNum;
} else {
// 插入数据库
log.info("====> 新增数据: {}: {}", sysDeptBo.getDeptId(), sysDeptBo.getDeptName());
int rowNum = sysDeptService.insertDept(sysDeptBo);
insertNum += rowNum;
}
srzDept.setNeedUpdate(1L);
int srz_num = iSrzDeptService.update(srzDept);
rowNom_srz += srz_num;
}
srzDept.setNeedUpdate(1L);
int srz_num = iSrzDeptService.update(srzDept);
rowNom_srz += srz_num;
} catch (Exception rowEx) {
// Quartz 线程无 Sa-Token 上下文(checkDeptDataScope) / 父部门未同步(insertDept NPE) 等单行异常
log.error("====> 部门同步单条失败, organizationId: {}, name: {}",
srzDept.getOrganizationid(), srzDept.getName(), rowEx);
}
}
}

161
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/quartz/job/SynUserInfoJob.java

@ -8,6 +8,7 @@ import com.zdxt.enforcementcode.service.ISrzUserService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.helper.DataPermissionHelper;
import org.dromara.system.domain.bo.SysUserBo;
import org.dromara.system.domain.vo.SysUserVo;
import org.dromara.system.service.ISysDictDataService;
@ -26,7 +27,7 @@ import java.util.Map;
/**
* 同步用户信息定时任务
*/
@Slf4j
@Component
@RequiredArgsConstructor
public class SynUserInfoJob {
@ -57,6 +58,7 @@ public class SynUserInfoJob {
int insertNum = 0;
int updateNum = 0;
int rowNom_srz = 0;
int failNum = 0;
try {
// 做个死循环, 一直到查寻不到数据了再break
while (true) {
@ -68,86 +70,99 @@ public class SynUserInfoJob {
// 开始同步更新数据到用户表
for(SrzUserVo srzUser : srzUserList){
log.info("====> 获取数据: {}", srzUser.getUsername());
SysUserBo sysUserBo = new SysUserBo();
sysUserBo.setSex(srzUser.getGendercode());
sysUserBo.setDeptId(srzUser.getOrganizationid());
sysUserBo.setOrganizationId(srzUser.getOrganizationid());
sysUserBo.setStrUserId(srzUser.getUserid());
sysUserBo.setSrzUserid(srzUser.getSrzuserid());
sysUserBo.setFullname(srzUser.getFullname());
sysUserBo.setUserName(srzUser.getFullname());
sysUserBo.setTaskId(srzUser.getTaskid());
sysUserBo.setSystemId(srzUser.getSystemid());
sysUserBo.setLoginName(srzUser.getUsername());
sysUserBo.setEffectOn(srzUser.getEffecton());
sysUserBo.setIsDisabled(srzUser.getIsdisabled());
sysUserBo.setIsDeleted(srzUser.getIsdeleted());
sysUserBo.setCreateAt(srzUser.getCreateat());
sysUserBo.setUpdateAt(srzUser.getUpdateat());
sysUserBo.setGuid(srzUser.getGuid());
//用户类型 0 系统用户
sysUserBo.setUserSource(0);
//手机号加密
String mobileNumber = "";
try {
mobileNumber = IdCardCryptoUtil.symmetricEncryptIdCard(secretKey, srzUser.getMobilenumber());
} catch (Exception e) {
System.out.println(e.getMessage());
mobileNumber = "";
}
sysUserBo.setMobileNumber(mobileNumber);
sysUserBo.setPhonenumber(mobileNumber);
sysUserBo.setEmail(srzUser.getEmail());
sysUserBo.setCertificateTypeId(srzUser.getCertificatetypeid());
sysUserBo.setCertificateTypeIdCode(srzUser.getCertificatetypeidcode());
//证件号加密
String certificateNumber = "";
// 行级容错: 单条失败不中断整批, 防止毒丸数据反复卡死同步
try {
certificateNumber = IdCardCryptoUtil.symmetricEncryptIdCard(secretKey, srzUser.getCertificatenumber());
} catch (Exception e) {
certificateNumber = "";
}
log.info("====> 获取数据: {}", srzUser.getUsername());
SysUserBo sysUserBo = new SysUserBo();
sysUserBo.setSex(srzUser.getGendercode());
sysUserBo.setDeptId(srzUser.getOrganizationid());
sysUserBo.setOrganizationId(srzUser.getOrganizationid());
sysUserBo.setStrUserId(srzUser.getUserid());
sysUserBo.setSrzUserid(srzUser.getSrzuserid());
sysUserBo.setFullname(srzUser.getFullname());
sysUserBo.setUserName(srzUser.getFullname());
// sys_user.nick_name 为 NOT NULL 无默认值, 新增用户必须提供, 取全名兜底登录名
sysUserBo.setNickName(StringUtils.isNotEmpty(srzUser.getFullname())
? srzUser.getFullname() : srzUser.getUsername());
sysUserBo.setTaskId(srzUser.getTaskid());
sysUserBo.setSystemId(srzUser.getSystemid());
sysUserBo.setLoginName(srzUser.getUsername());
sysUserBo.setEffectOn(srzUser.getEffecton());
sysUserBo.setIsDisabled(srzUser.getIsdisabled());
sysUserBo.setIsDeleted(srzUser.getIsdeleted());
sysUserBo.setCreateAt(srzUser.getCreateat());
sysUserBo.setUpdateAt(srzUser.getUpdateat());
sysUserBo.setGuid(srzUser.getGuid());
//用户类型 0 系统用户
sysUserBo.setUserSource(0);
//手机号加密
String mobileNumber = "";
try {
mobileNumber = IdCardCryptoUtil.symmetricEncryptIdCard(secretKey, srzUser.getMobilenumber());
} catch (Exception e) {
log.warn("====> 手机号加密失败, username: {}, 原因: {}", srzUser.getUsername(), e.getMessage());
mobileNumber = "";
}
sysUserBo.setMobileNumber(mobileNumber);
sysUserBo.setPhonenumber(mobileNumber);
sysUserBo.setEmail(srzUser.getEmail());
sysUserBo.setCertificateTypeId(srzUser.getCertificatetypeid());
sysUserBo.setCertificateTypeIdCode(srzUser.getCertificatetypeidcode());
//证件号加密
String certificateNumber = "";
try {
certificateNumber = IdCardCryptoUtil.symmetricEncryptIdCard(secretKey, srzUser.getCertificatenumber());
} catch (Exception e) {
log.warn("====> 证件号加密失败, username: {}, 原因: {}", srzUser.getUsername(), e.getMessage());
certificateNumber = "";
}
sysUserBo.setCertificateNumber(certificateNumber);
sysUserBo.setIsMappingPerson(srzUser.getIsmappingperson());
sysUserBo.randomSalt();
//新增用户默认不删除标记
sysUserBo.setDelFlag("0");
//限制只通过用户信息的username来判断,避免登录出现问题
String userName = srzUser.getUsername();
if(StringUtils.isNotEmpty(userName)){
UserSearchDto userSearchDto = new UserSearchDto();
userSearchDto.setUserSource(0);
SysUserVo uniqueUser = sysUserService.selectUserByLoginName(userName);
if (null != uniqueUser && uniqueUser.getUserId() != null) {
// 更新数据库
sysUserBo.setUserId(uniqueUser.getUserId());
if (StringUtils.isEmpty(sysUserBo.getLawCertificateNum())) {
sysUserBo.setLawCertificateNum(uniqueUser.getLawCertificateNum());
sysUserBo.setCertificateNumber(certificateNumber);
sysUserBo.setIsMappingPerson(srzUser.getIsmappingperson());
sysUserBo.randomSalt();
//新增用户默认不删除标记
sysUserBo.setDelFlag("0");
//限制只通过用户信息的username来判断,避免登录出现问题
String userName = srzUser.getUsername();
if(StringUtils.isNotEmpty(userName)){
UserSearchDto userSearchDto = new UserSearchDto();
userSearchDto.setUserSource(0);
SysUserVo uniqueUser = sysUserService.selectUserByLoginName(userName);
if (null != uniqueUser && uniqueUser.getUserId() != null) {
// 更新数据库
sysUserBo.setUserId(uniqueUser.getUserId());
if (StringUtils.isEmpty(sysUserBo.getLawCertificateNum())) {
sysUserBo.setLawCertificateNum(uniqueUser.getLawCertificateNum());
}
log.info("====> 更新数据: {}", srzUser.getUsername());
// Quartz 工作线程无 Sa-Token 上下文, 需绕过数据权限拦截器
int rowNum = DataPermissionHelper.ignore(() -> sysUserService.updateUser(sysUserBo));
updateNum += rowNum;
} else {
// 插入数据库
log.info("====> 新增数据: {}", srzUser.getUsername());
int rowNum = DataPermissionHelper.ignore(() -> sysUserService.insertUser(sysUserBo));
insertNum += rowNum;
}
log.info("====> 更新数据: {}", srzUser.getUsername());
int rowNum = sysUserService.updateUser(sysUserBo);
updateNum += rowNum;
} else {
// 插入数据库
log.info("====> 新增数据: {}", srzUser.getUsername());
int rowNum = sysUserService.insertUser(sysUserBo);
insertNum += rowNum;
srzUser.setNeedUpdate(1L);
int srz_num = DataPermissionHelper.ignore(() -> iSrzUserService.update(srzUser));
rowNom_srz += srz_num;
}
srzUser.setNeedUpdate(1L);
int srz_num = iSrzUserService.update(srzUser);
rowNom_srz += srz_num;
} catch (Exception rowEx) {
failNum++;
// 单条失败(如 nick_name 等必填字段缺失): 记录后跳过, 不中断整批
log.error("====> 用户同步单条失败, username: {}, userId: {}",
srzUser.getUsername(), srzUser.getUserid(), rowEx);
}
}
}
log.info("新增用户数量 : {} / 更新用户数量 : {} / 更新原始表数 : {}", insertNum, updateNum, rowNom_srz);
log.info("新增用户数量 : {} / 更新用户数量 : {} / 更新原始表数 : {} / 失败数量 : {}",
insertNum, updateNum, rowNom_srz, failNum);
} catch (Exception e) {
System.out.println(e);
e.printStackTrace();
log.error("用户同步任务整体异常", e);
}
}

184
zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/SrzDeptMapper.xml

@ -8,86 +8,88 @@
<insert id="insertSrzDept" parameterType="com.zdxt.enforcementcode.domain.SrzDept">
insert into srz_dept
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="organizationId != null and organizationId != ''">organizationId,</if>
<if test="organizationid != null and organizationid != ''">organizationId,</if>
<if test="name != null and name != ''">name,</if>
<if test="code != null and code != ''">code,</if>
<if test="effectOn != null and effectOn != ''">effectOn,</if>
<if test="taskId != null and taskId != ''">taskId,</if>
<if test="zzDisplayPath != null and zzDisplayPath != ''">zzDisplayPath,</if>
<if test="zzIsLeaf != null and zzIsLeaf != ''">zzIsLeaf,</if>
<if test="isDeleted != null and isDeleted != ''">isDeleted,</if>
<if test="isDisabled != null and isDisabled != ''">isDisabled,</if>
<if test="systemId != null and systemId != ''">systemId,</if>
<if test="zzLevel != null and zzLevel != ''">zzLevel,</if>
<if test="parentId != null and parentId != ''">parentId,</if>
<if test="effecton != null and effecton != ''">effectOn,</if>
<if test="taskid != null and taskid != ''">taskId,</if>
<if test="zzdisplaypath != null and zzdisplaypath != ''">zzDisplayPath,</if>
<if test="zzisleaf != null and zzisleaf != ''">zzIsLeaf,</if>
<if test="isdeleted != null and isdeleted != ''">isDeleted,</if>
<if test="isdisabled != null and isdisabled != ''">isDisabled,</if>
<if test="systemid != null and systemid != ''">systemId,</if>
<if test="zzlevel != null and zzlevel != ''">zzLevel,</if>
<if test="parentid != null and parentid != ''">parentId,</if>
<if test="sequence != null and sequence != ''">sequence,</if>
<if test="createAt != null and createAt != ''">createAt,</if>
<if test="updateAt != null and updateAt != ''">updateAt,</if>
<if test="createat != null and createat != ''">createAt,</if>
<if test="updateat != null and updateat != ''">updateAt,</if>
<if test="guid != null and guid != ''">guid,</if>
<if test="isMappingUnit != null and isMappingUnit != ''">isMappingUnit,</if>
<if test="mappingUnitParentId != null and mappingUnitParentId != ''">mappingUnitParentId,</if>
<if test="srzUnitId != null and srzUnitId != ''">srzUnitId,</if>
<if test="simpleName != null and simpleName != ''">simpleName,</if>
<if test="isStatutoryOrg != null and isStatutoryOrg != ''">isStatutoryOrg,</if>
<if test="isActive != null and isActive != ''">isActive,</if>
<if test="unitStatusCode != null and unitStatusCode != ''">unitStatusCode,</if>
<if test="unitStatus != null and unitStatus != ''">unitStatus,</if>
<if test="unitType != null and unitType != ''">unitType,</if>
<if test="xzqhCode != null and xzqhCode != ''">xzqhCode,</if>
<if test="ismappingunit != null and ismappingunit != ''">isMappingUnit,</if>
<if test="mappingunitparentid != null and mappingunitparentid != ''">mappingUnitParentId,</if>
<if test="srzunitid != null and srzunitid != ''">srzUnitId,</if>
<if test="simplename != null and simplename != ''">simpleName,</if>
<if test="isstatutoryorg != null and isstatutoryorg != ''">isStatutoryOrg,</if>
<if test="isactive != null and isactive != ''">isActive,</if>
<if test="unitstatuscode != null and unitstatuscode != ''">unitStatusCode,</if>
<if test="unitstatus != null and unitstatus != ''">unitStatus,</if>
<if test="unittype != null and unittype != ''">unitType,</if>
<if test="xzqhcode != null and xzqhcode != ''">xzqhCode,</if>
<if test="xzqh != null and xzqh != ''">xzqh,</if>
<if test="isCGManager != null and isCGManager != ''">isCGManager,</if>
<if test="isBureauOffice != null and isBureauOffice != ''">isBureauOffice,</if>
<if test="unitTypeCode != null and unitTypeCode != ''">unitTypeCode,</if>
<if test="dwxzCode != null and dwxzCode != ''">dwxzCode,</if>
<if test="iscgmanager != null and iscgmanager != ''">isCGManager,</if>
<if test="isbureauoffice != null and isbureauoffice != ''">isBureauOffice,</if>
<if test="unittypecode != null and unittypecode != ''">unitTypeCode,</if>
<if test="dwxzcode != null and dwxzcode != ''">dwxzCode,</if>
<if test="dwxz != null and dwxz != ''">dwxz,</if>
<if test="unitSysTypeCode != null and unitSysTypeCode != ''">unitSysTypeCode,</if>
<if test="unitSysType != null and unitSysType != ''">unitSysType,</if>
<if test="unitsystypecode != null and unitsystypecode != ''">unitSysTypeCode,</if>
<if test="unitsystype != null and unitsystype != ''">unitSysType,</if>
<if test="dwxtlbms != null and dwxtlbms != ''">dwxtlbms,</if>
<if test="unitLevelCode != null and unitLevelCode != ''">unitLevelCode,</if>
<if test="unitLevel != null and unitLevel != ''">unitLevel,</if>
<if test="unitlevelcode != null and unitlevelcode != ''">unitLevelCode,</if>
<if test="unitlevel != null and unitlevel != ''">unitLevel,</if>
<if test="creditcode != null and creditcode != ''">creditcode,</if>
<if test="description != null and description != ''">description,</if>
<if test="needUpdate != null">need_update,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="organizationId != null and organizationId != ''">#{organizationId},</if>
<if test="organizationid != null and organizationid != ''">#{organizationid},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="code != null and code != ''">#{code},</if>
<if test="effectOn != null and effectOn != ''">#{effectOn},</if>
<if test="taskId != null and taskId != ''">#{taskId},</if>
<if test="zzDisplayPath != null and zzDisplayPath != ''">#{zzDisplayPath},</if>
<if test="zzIsLeaf != null and zzIsLeaf != ''">#{zzIsLeaf},</if>
<if test="isDeleted != null and isDeleted != ''">#{isDeleted},</if>
<if test="isDisabled != null and isDisabled != ''">#{isDisabled},</if>
<if test="systemId != null and systemId != ''">#{systemId},</if>
<if test="zzLevel != null and zzLevel != ''">#{zzLevel},</if>
<if test="parentId != null and parentId != ''">#{parentId},</if>
<if test="effecton != null and effecton != ''">#{effecton},</if>
<if test="taskid != null and taskid != ''">#{taskid},</if>
<if test="zzdisplaypath != null and zzdisplaypath != ''">#{zzdisplaypath},</if>
<if test="zzisleaf != null and zzisleaf != ''">#{zzisleaf},</if>
<if test="isdeleted != null and isdeleted != ''">#{isdeleted},</if>
<if test="isdisabled != null and isdisabled != ''">#{isdisabled},</if>
<if test="systemid != null and systemid != ''">#{systemid},</if>
<if test="zzlevel != null and zzlevel != ''">#{zzlevel},</if>
<if test="parentid != null and parentid != ''">#{parentid},</if>
<if test="sequence != null and sequence != ''">#{sequence},</if>
<if test="createAt != null and createAt != ''">#{createAt},</if>
<if test="updateAt != null and updateAt != ''">#{updateAt},</if>
<if test="createat != null and createat != ''">#{createat},</if>
<if test="updateat != null and updateat != ''">#{updateat},</if>
<if test="guid != null and guid != ''">#{guid},</if>
<if test="isMappingUnit != null and isMappingUnit != ''">#{isMappingUnit},</if>
<if test="mappingUnitParentId != null and mappingUnitParentId != ''">#{mappingUnitParentId},</if>
<if test="srzUnitId != null and srzUnitId != ''">#{srzUnitId},</if>
<if test="simpleName != null and simpleName != ''">#{simpleName},</if>
<if test="isStatutoryOrg != null and isStatutoryOrg != ''">#{isStatutoryOrg},</if>
<if test="isActive != null and isActive != ''">#{isActive},</if>
<if test="unitStatusCode != null and unitStatusCode != ''">#{unitStatusCode},</if>
<if test="unitStatus != null and unitStatus != ''">#{unitStatus},</if>
<if test="unitType != null and unitType != ''">#{unitType},</if>
<if test="xzqhCode != null and xzqhCode != ''">#{xzqhCode},</if>
<if test="ismappingunit != null and ismappingunit != ''">#{ismappingunit},</if>
<if test="mappingunitparentid != null and mappingunitparentid != ''">#{mappingunitparentid},</if>
<if test="srzunitid != null and srzunitid != ''">#{srzunitid},</if>
<if test="simplename != null and simplename != ''">#{simplename},</if>
<if test="isstatutoryorg != null and isstatutoryorg != ''">#{isstatutoryorg},</if>
<if test="isactive != null and isactive != ''">#{isactive},</if>
<if test="unitstatuscode != null and unitstatuscode != ''">#{unitstatuscode},</if>
<if test="unitstatus != null and unitstatus != ''">#{unitstatus},</if>
<if test="unittype != null and unittype != ''">#{unittype},</if>
<if test="xzqhcode != null and xzqhcode != ''">#{xzqhcode},</if>
<if test="xzqh != null and xzqh != ''">#{xzqh},</if>
<if test="isCGManager != null and isCGManager != ''">#{isCGManager},</if>
<if test="isBureauOffice != null and isBureauOffice != ''">#{isBureauOffice},</if>
<if test="unitTypeCode != null and unitTypeCode != ''">#{unitTypeCode},</if>
<if test="dwxzCode != null and dwxzCode != ''">#{dwxzCode},</if>
<if test="iscgmanager != null and iscgmanager != ''">#{iscgmanager},</if>
<if test="isbureauoffice != null and isbureauoffice != ''">#{isbureauoffice},</if>
<if test="unittypecode != null and unittypecode != ''">#{unittypecode},</if>
<if test="dwxzcode != null and dwxzcode != ''">#{dwxzcode},</if>
<if test="dwxz != null and dwxz != ''">#{dwxz},</if>
<if test="unitSysTypeCode != null and unitSysTypeCode != ''">#{unitSysTypeCode},</if>
<if test="unitSysType != null and unitSysType != ''">#{unitSysType},</if>
<if test="unitsystypecode != null and unitsystypecode != ''">#{unitsystypecode},</if>
<if test="unitsystype != null and unitsystype != ''">#{unitsystype},</if>
<if test="dwxtlbms != null and dwxtlbms != ''">#{dwxtlbms},</if>
<if test="unitLevelCode != null and unitLevelCode != ''">#{unitLevelCode},</if>
<if test="unitLevel != null and unitLevel != ''">#{unitLevel},</if>
<if test="unitlevelcode != null and unitlevelcode != ''">#{unitlevelcode},</if>
<if test="unitlevel != null and unitlevel != ''">#{unitlevel},</if>
<if test="creditcode != null and creditcode != ''">#{creditcode},</if>
<if test="description != null and description != ''">#{description},</if>
<if test="needUpdate != null">#{needUpdate},</if>
</trim>
</insert>
@ -96,44 +98,44 @@
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="code != null and code != ''">code = #{code},</if>
<if test="effectOn != null and effectOn != ''">effectOn = #{effectOn},</if>
<if test="taskId != null and taskId != ''">taskId = #{taskId},</if>
<if test="zzDisplayPath != null and zzDisplayPath != ''">zzDisplayPath = #{zzDisplayPath},</if>
<if test="zzIsLeaf != null and zzIsLeaf != ''">zzIsLeaf = #{zzIsLeaf},</if>
<if test="isDeleted != null and isDeleted != ''">isDeleted = #{isDeleted},</if>
<if test="isDisabled != null and isDisabled != ''">isDisabled = #{isDisabled},</if>
<if test="systemId != null and systemId != ''">systemId = #{systemId},</if>
<if test="zzLevel != null and zzLevel != ''">zzLevel = #{zzLevel},</if>
<if test="parentId != null and parentId != ''">parentId = #{parentId},</if>
<if test="effecton != null and effecton != ''">effectOn = #{effecton},</if>
<if test="taskid != null and taskid != ''">taskId = #{taskid},</if>
<if test="zzdisplaypath != null and zzdisplaypath != ''">zzDisplayPath = #{zzdisplaypath},</if>
<if test="zzisleaf != null and zzisleaf != ''">zzIsLeaf = #{zzisleaf},</if>
<if test="isdeleted != null and isdeleted != ''">isDeleted = #{isdeleted},</if>
<if test="isdisabled != null and isdisabled != ''">isDisabled = #{isdisabled},</if>
<if test="systemid != null and systemid != ''">systemId = #{systemid},</if>
<if test="zzlevel != null and zzlevel != ''">zzLevel = #{zzlevel},</if>
<if test="parentid != null and parentid != ''">parentId = #{parentid},</if>
<if test="sequence != null and sequence != ''">sequence = #{sequence},</if>
<if test="createAt != null and createAt != ''">createAt = #{createAt},</if>
<if test="updateAt != null and updateAt != ''">updateAt = #{updateAt},</if>
<if test="createat != null and createat != ''">createAt = #{createat},</if>
<if test="updateat != null and updateat != ''">updateAt = #{updateat},</if>
<if test="guid != null and guid != ''">guid = #{guid},</if>
<if test="isMappingUnit != null and isMappingUnit != ''">isMappingUnit = #{isMappingUnit},</if>
<if test="mappingUnitParentId != null and mappingUnitParentId != ''">mappingUnitParentId = #{mappingUnitParentId},</if>
<if test="srzUnitId != null and srzUnitId != ''">srzUnitId = #{srzUnitId},</if>
<if test="simpleName != null and simpleName != ''">simpleName = #{simpleName},</if>
<if test="isStatutoryOrg != null and isStatutoryOrg != ''">isStatutoryOrg = #{isStatutoryOrg},</if>
<if test="isActive != null and isActive != ''">isActive = #{isActive},</if>
<if test="unitStatusCode != null and unitStatusCode != ''">unitStatusCode = #{unitStatusCode},</if>
<if test="unitStatus != null and unitStatus != ''">unitStatus = #{unitStatus},</if>
<if test="unitType != null and unitType != ''">unitType = #{unitType},</if>
<if test="xzqhCode != null and xzqhCode != ''">xzqhCode = #{xzqhCode},</if>
<if test="ismappingunit != null and ismappingunit != ''">isMappingUnit = #{ismappingunit},</if>
<if test="mappingunitparentid != null and mappingunitparentid != ''">mappingUnitParentId = #{mappingunitparentid},</if>
<if test="srzunitid != null and srzunitid != ''">srzUnitId = #{srzunitid},</if>
<if test="simplename != null and simplename != ''">simpleName = #{simplename},</if>
<if test="isstatutoryorg != null and isstatutoryorg != ''">isStatutoryOrg = #{isstatutoryorg},</if>
<if test="isactive != null and isactive != ''">isActive = #{isactive},</if>
<if test="unitstatuscode != null and unitstatuscode != ''">unitStatusCode = #{unitstatuscode},</if>
<if test="unitstatus != null and unitstatus != ''">unitStatus = #{unitstatus},</if>
<if test="unittype != null and unittype != ''">unitType = #{unittype},</if>
<if test="xzqhcode != null and xzqhcode != ''">xzqhCode = #{xzqhcode},</if>
<if test="xzqh != null and xzqh != ''">xzqh = #{xzqh},</if>
<if test="isCGManager != null and isCGManager != ''">isCGManager = #{isCGManager},</if>
<if test="isBureauOffice != null and isBureauOffice != ''">isBureauOffice = #{isBureauOffice},</if>
<if test="unitTypeCode != null and unitTypeCode != ''">unitTypeCode = #{unitTypeCode},</if>
<if test="dwxzCode != null and dwxzCode != ''">dwxzCode = #{dwxzCode},</if>
<if test="iscgmanager != null and iscgmanager != ''">isCGManager = #{iscgmanager},</if>
<if test="isbureauoffice != null and isbureauoffice != ''">isBureauOffice = #{isbureauoffice},</if>
<if test="unittypecode != null and unittypecode != ''">unitTypeCode = #{unittypecode},</if>
<if test="dwxzcode != null and dwxzcode != ''">dwxzCode = #{dwxzcode},</if>
<if test="dwxz != null and dwxz != ''">dwxz = #{dwxz},</if>
<if test="unitSysTypeCode != null and unitSysTypeCode != ''">unitSysTypeCode = #{unitSysTypeCode},</if>
<if test="unitSysType != null and unitSysType != ''">unitSysType = #{unitSysType},</if>
<if test="unitsystypecode != null and unitsystypecode != ''">unitSysTypeCode = #{unitsystypecode},</if>
<if test="unitsystype != null and unitsystype != ''">unitSysType = #{unitsystype},</if>
<if test="dwxtlbms != null and dwxtlbms != ''">dwxtlbms = #{dwxtlbms},</if>
<if test="unitLevelCode != null and unitLevelCode != ''">unitLevelCode = #{unitLevelCode},</if>
<if test="unitLevel != null and unitLevel != ''">unitLevel = #{unitLevel},</if>
<if test="unitlevelcode != null and unitlevelcode != ''">unitLevelCode = #{unitlevelcode},</if>
<if test="unitlevel != null and unitlevel != ''">unitLevel = #{unitlevel},</if>
<if test="creditcode != null and creditcode != ''">creditcode = #{creditcode},</if>
<if test="description != null and description != ''">description=#{description},</if>
<if test="needUpdate != null and needUpdate != ''">need_update=#{needUpdate},</if>
<if test="needUpdate != null">need_update=#{needUpdate},</if>
</trim>
where organizationId = #{organizationId}
where organizationId = #{organizationid}
</update>
</mapper>

184
zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/SrzUserMapper.xml

@ -8,65 +8,65 @@
<update id="updateUser" parameterType="com.zdxt.enforcementcode.domain.SrzUser">
UPDATE srz_user
<trim prefix="SET" suffixOverrides=",">
<if test="ryztCode != null and ryztCode != ''">ryztCode = #{ryztCode},</if>
<if test="mobileNumber != null and mobileNumber != ''">mobileNumber = #{mobileNumber},</if>
<if test="ryztcode != null and ryztcode != ''">ryztCode = #{ryztcode},</if>
<if test="mobilenumber != null and mobilenumber != ''">mobileNumber = #{mobilenumber},</if>
<if test="zcgzld != null and zcgzld != ''">zcgzld = #{zcgzld},</if>
<if test="gldw != null and gldw != ''">gldw = #{gldw},</if>
<if test="updateAt != null and updateAt != ''">updateAt = #{updateAt},</if>
<if test="zwjcCode != null and zwjcCode != ''">zwjcCode = #{zwjcCode},</if>
<if test="effectOn != null and effectOn != ''">effectOn = #{effectOn},</if>
<if test="updateat != null and updateat != ''">updateAt = #{updateat},</if>
<if test="zwjccode != null and zwjccode != ''">zwjcCode = #{zwjccode},</if>
<if test="effecton != null and effecton != ''">effectOn = #{effecton},</if>
<if test="zwjc != null and zwjc != ''">zwjc = #{zwjc},</if>
<if test="organizationId != null and organizationId != ''">organizationId = #{organizationId},</if>
<if test="organizationid != null and organizationid != ''">organizationId = #{organizationid},</if>
<if test="province != null and province != ''">province = #{province},</if>
<if test="isDisabled != null and isDisabled != ''">isDisabled = #{isDisabled},</if>
<if test="certificateTypeIdCode != null and certificateTypeIdCode != ''">certificateTypeIdCode = #{certificateTypeIdCode},</if>
<if test="isdisabled != null and isdisabled != ''">isDisabled = #{isdisabled},</if>
<if test="certificatetypeidcode != null and certificatetypeidcode != ''">certificateTypeIdCode = #{certificatetypeidcode},</if>
<if test="jrfs != null and jrfs != ''">jrfs = #{jrfs},</if>
<if test="spareNumber != null and spareNumber != ''">spareNumber = #{spareNumber},</if>
<if test="sparenumber != null and sparenumber != ''">spareNumber = #{sparenumber},</if>
<if test="positionname != null and positionname != ''">positionname = #{positionname},</if>
<if test="pylxcode != null and pylxcode != ''">pylxcode = #{pylxcode},</if>
<if test="jbcc != null and jbcc != ''">jbcc = #{jbcc},</if>
<if test="contractEndTime != null and contractEndTime != ''">contractEndTime = #{contractEndTime},</if>
<if test="contractendtime != null and contractendtime != ''">contractEndTime = #{contractendtime},</if>
<if test="sequence != null and sequence != ''">sequence = #{sequence},</if>
<if test="genderCode != null and genderCode != ''">genderCode = #{genderCode},</if>
<if test="zwwxMobile != null and zwwxMobile != ''">zwwxMobile = #{zwwxMobile},</if>
<if test="gendercode != null and gendercode != ''">genderCode = #{gendercode},</if>
<if test="zwwxmobile != null and zwwxmobile != ''">zwwxMobile = #{zwwxmobile},</if>
<if test="district != null and district != ''">district = #{district},</if>
<if test="certificateTypeId != null and certificateTypeId != ''">certificateTypeId = #{certificateTypeId},</if>
<if test="contractStartTime != null and contractStartTime != ''">contractStartTime = #{contractStartTime},</if>
<if test="certificatetypeid != null and certificatetypeid != ''">certificateTypeId = #{certificatetypeid},</if>
<if test="contractstarttime != null and contractstarttime != ''">contractStartTime = #{contractstarttime},</if>
<if test="rylydw != null and rylydw != ''">rylydw = #{rylydw},</if>
<if test="telephoneNumber != null and telephoneNumber != ''">telephoneNumber = #{telephoneNumber},</if>
<if test="telephonenumber != null and telephonenumber != ''">telephoneNumber = #{telephonenumber},</if>
<if test="gender != null and gender != ''">gender = #{gender},</if>
<if test="city != null and city != ''">city = #{city},</if>
<if test="jbccCode != null and jbccCode != ''">jbccCode = #{jbccCode},</if>
<if test="jbcccode != null and jbcccode != ''">jbccCode = #{jbcccode},</if>
<if test="rylb != null and rylb != ''">rylb = #{rylb},</if>
<if test="hometownCode != null and hometownCode != ''">hometownCode = #{hometownCode},</if>
<if test="hometowncode != null and hometowncode != ''">hometownCode = #{hometowncode},</if>
<if test="units != null and units != ''">units = #{units},</if>
<if test="srzUserid != null and srzUserid != ''">srzUserid = #{srzUserid},</if>
<if test="createAt != null and createAt != ''">createAt = #{createAt},</if>
<if test="engName != null and engName != ''">engName = #{engName},</if>
<if test="isDeleted != null and isDeleted != ''">isDeleted = #{isDeleted},</if>
<if test="srzuserid != null and srzuserid != ''">srzUserid = #{srzuserid},</if>
<if test="createat != null and createat != ''">createAt = #{createat},</if>
<if test="engname != null and engname != ''">engName = #{engname},</if>
<if test="isdeleted != null and isdeleted != ''">isDeleted = #{isdeleted},</if>
<if test="jrfscode != null and jrfscode != ''">jrfscode = #{jrfscode},</if>
<if test="email != null and email != ''">email = #{email},</if>
<if test="zwbsCode != null and zwbsCode != ''">zwbsCode = #{zwbsCode},</if>
<if test="zwbscode != null and zwbscode != ''">zwbsCode = #{zwbscode},</if>
<if test="dwzyld != null and dwzyld != ''">dwzyld = #{dwzyld},</if>
<if test="pylx != null and pylx != ''">pylx = #{pylx},</if>
<if test="systemId != null and systemId != ''">systemId = #{systemId},</if>
<if test="rylbCode != null and rylbCode != ''">rylbCode = #{rylbCode},</if>
<if test="systemid != null and systemid != ''">systemId = #{systemid},</if>
<if test="rylbcode != null and rylbcode != ''">rylbCode = #{rylbcode},</if>
<if test="hometown != null and hometown != ''">hometown = #{hometown},</if>
<if test="photo != null and photo != ''">photo = #{photo},</if>
<if test="glzrr != null and glzrr != ''">glzrr = #{glzrr},</if>
<if test="userId != null and userId != ''">userId = #{userId},</if>
<if test="zwwxId != null and zwwxId != ''">zwwxId = #{zwwxId},</if>
<if test="userid != null and userid != ''">userId = #{userid},</if>
<if test="zwwxid != null and zwwxid != ''">zwwxId = #{zwwxid},</if>
<if test="ryzt != null and ryzt != ''">ryzt = #{ryzt},</if>
<if test="certificateNumber != null and certificateNumber != ''">certificateNumber = #{certificateNumber},</if>
<if test="certificatenumber != null and certificatenumber != ''">certificateNumber = #{certificatenumber},</if>
<if test="zwbs != null and zwbs != ''">zwbs = #{zwbs},</if>
<if test="faxNumber != null and faxNumber != ''">faxNumber = #{faxNumber},</if>
<if test="faxnumber != null and faxnumber != ''">faxNumber = #{faxnumber},</if>
<if test="fullname != null and fullname != ''">fullname = #{fullname},</if>
<if test="isMappingPerson != null and isMappingPerson != ''">isMappingPerson = #{isMappingPerson},</if>
<if test="taskId != null and taskId != ''">taskId = #{taskId},</if>
<if test="ismappingperson != null and ismappingperson != ''">isMappingPerson = #{ismappingperson},</if>
<if test="taskid != null and taskid != ''">taskId = #{taskid},</if>
<if test="username != null and username != ''">username = #{username},</if>
<if test="needUpdate != null">need_update = #{needUpdate},</if>
</trim>
WHERE userId = #{userId}
WHERE userId = #{userid}
</update>
<!-- 安全动态插入:只更新非空字段 -->
@ -74,121 +74,123 @@
INSERT INTO srz_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="guid != null and guid != ''">guid,</if>
<if test="ryztCode != null and ryztCode != ''">ryztCode,</if>
<if test="mobileNumber != null and mobileNumber != ''">mobileNumber,</if>
<if test="ryztcode != null and ryztcode != ''">ryztCode,</if>
<if test="mobilenumber != null and mobilenumber != ''">mobileNumber,</if>
<if test="zcgzld != null and zcgzld != ''">zcgzld,</if>
<if test="gldw != null and gldw != ''">gldw,</if>
<if test="updateAt != null and updateAt != ''">updateAt,</if>
<if test="zwjcCode != null and zwjcCode != ''">zwjcCode,</if>
<if test="effectOn != null and effectOn != ''">effectOn,</if>
<if test="updateat != null and updateat != ''">updateAt,</if>
<if test="zwjccode != null and zwjccode != ''">zwjcCode,</if>
<if test="effecton != null and effecton != ''">effectOn,</if>
<if test="zwjc != null and zwjc != ''">zwjc,</if>
<if test="organizationId != null and organizationId != ''">organizationId,</if>
<if test="organizationid != null and organizationid != ''">organizationId,</if>
<if test="province != null and province != ''">province,</if>
<if test="isDisabled != null and isDisabled != ''">isDisabled,</if>
<if test="certificateTypeIdCode != null and certificateTypeIdCode != ''">certificateTypeIdCode,</if>
<if test="isdisabled != null and isdisabled != ''">isDisabled,</if>
<if test="certificatetypeidcode != null and certificatetypeidcode != ''">certificateTypeIdCode,</if>
<if test="jrfs != null and jrfs != ''">jrfs,</if>
<if test="spareNumber != null and spareNumber != ''">spareNumber,</if>
<if test="sparenumber != null and sparenumber != ''">spareNumber,</if>
<if test="positionname != null and positionname != ''">positionname,</if>
<if test="pylxcode != null and pylxcode != ''">pylxcode,</if>
<if test="jbcc != null and jbcc != ''">jbcc,</if>
<if test="contractEndTime != null and contractEndTime != ''">contractEndTime,</if>
<if test="contractendtime != null and contractendtime != ''">contractEndTime,</if>
<if test="sequence != null and sequence != ''">sequence,</if>
<if test="genderCode != null and genderCode != ''">genderCode,</if>
<if test="zwwxMobile != null and zwwxMobile != ''">zwwxMobile,</if>
<if test="gendercode != null and gendercode != ''">genderCode,</if>
<if test="zwwxmobile != null and zwwxmobile != ''">zwwxMobile,</if>
<if test="district != null and district != ''">district,</if>
<if test="certificateTypeId != null and certificateTypeId != ''">certificateTypeId,</if>
<if test="contractStartTime != null and contractStartTime != ''">contractStartTime,</if>
<if test="certificatetypeid != null and certificatetypeid != ''">certificateTypeId,</if>
<if test="contractstarttime != null and contractstarttime != ''">contractStartTime,</if>
<if test="rylydw != null and rylydw != ''">rylydw,</if>
<if test="telephoneNumber != null and telephoneNumber != ''">telephoneNumber,</if>
<if test="telephonenumber != null and telephonenumber != ''">telephoneNumber,</if>
<if test="gender != null and gender != ''">gender,</if>
<if test="city != null and city != ''">city,</if>
<if test="jbccCode != null and jbccCode != ''">jbccCode,</if>
<if test="jbcccode != null and jbcccode != ''">jbccCode,</if>
<if test="rylb != null and rylb != ''">rylb,</if>
<if test="hometownCode != null and hometownCode != ''">hometownCode,</if>
<if test="hometowncode != null and hometowncode != ''">hometownCode,</if>
<if test="units != null and units != ''">units,</if>
<if test="srzUserid != null and srzUserid != ''">srzUserid,</if>
<if test="createAt != null and createAt != ''">createAt,</if>
<if test="engName != null and engName != ''">engName,</if>
<if test="isDeleted != null and isDeleted != ''">isDeleted,</if>
<if test="srzuserid != null and srzuserid != ''">srzUserid,</if>
<if test="createat != null and createat != ''">createAt,</if>
<if test="engname != null and engname != ''">engName,</if>
<if test="isdeleted != null and isdeleted != ''">isDeleted,</if>
<if test="jrfscode != null and jrfscode != ''">jrfscode,</if>
<if test="email != null and email != ''">email,</if>
<if test="zwbsCode != null and zwbsCode != ''">zwbsCode,</if>
<if test="zwbscode != null and zwbscode != ''">zwbsCode,</if>
<if test="dwzyld != null and dwzyld != ''">dwzyld,</if>
<if test="pylx != null and pylx != ''">pylx,</if>
<if test="systemId != null and systemId != ''">systemId,</if>
<if test="rylbCode != null and rylbCode != ''">rylbCode,</if>
<if test="systemid != null and systemid != ''">systemId,</if>
<if test="rylbcode != null and rylbcode != ''">rylbCode,</if>
<if test="hometown != null and hometown != ''">hometown,</if>
<if test="photo != null and photo != ''">photo,</if>
<if test="glzrr != null and glzrr != ''">glzrr,</if>
<if test="userId != null and userId != ''">userId,</if>
<if test="zwwxId != null and zwwxId != ''">zwwxId,</if>
<if test="userid != null and userid != ''">userId,</if>
<if test="zwwxid != null and zwwxid != ''">zwwxId,</if>
<if test="ryzt != null and ryzt != ''">ryzt,</if>
<if test="certificateNumber != null and certificateNumber != ''">certificateNumber,</if>
<if test="certificatenumber != null and certificatenumber != ''">certificateNumber,</if>
<if test="zwbs != null and zwbs != ''">zwbs,</if>
<if test="faxNumber != null and faxNumber != ''">faxNumber,</if>
<if test="faxnumber != null and faxnumber != ''">faxNumber,</if>
<if test="fullname != null and fullname != ''">fullname,</if>
<if test="isMappingPerson != null and isMappingPerson != ''">isMappingPerson,</if>
<if test="taskId != null and taskId != ''">taskId,</if>
<if test="ismappingperson != null and ismappingperson != ''">isMappingPerson,</if>
<if test="taskid != null and taskid != ''">taskId,</if>
<if test="username != null and username != ''">username,</if>
<if test="needUpdate != null">need_update,</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="guid != null and guid != ''">#{guid},</if>
<if test="ryztCode != null and ryztCode != ''">#{ryztCode},</if>
<if test="mobileNumber != null and mobileNumber != ''">#{mobileNumber},</if>
<if test="ryztcode != null and ryztcode != ''">#{ryztcode},</if>
<if test="mobilenumber != null and mobilenumber != ''">#{mobilenumber},</if>
<if test="zcgzld != null and zcgzld != ''">#{zcgzld},</if>
<if test="gldw != null and gldw != ''">#{gldw},</if>
<if test="updateAt != null and updateAt != ''">#{updateAt},</if>
<if test="zwjcCode != null and zwjcCode != ''">#{zwjcCode},</if>
<if test="effectOn != null and effectOn != ''">#{effectOn},</if>
<if test="updateat != null and updateat != ''">#{updateat},</if>
<if test="zwjccode != null and zwjccode != ''">#{zwjccode},</if>
<if test="effecton != null and effecton != ''">#{effecton},</if>
<if test="zwjc != null and zwjc != ''">#{zwjc},</if>
<if test="organizationId != null and organizationId != ''">#{organizationId},</if>
<if test="organizationid != null and organizationid != ''">#{organizationid},</if>
<if test="province != null and province != ''">#{province},</if>
<if test="isDisabled != null and isDisabled != ''">#{isDisabled},</if>
<if test="certificateTypeIdCode != null and certificateTypeIdCode != ''">#{certificateTypeIdCode},</if>
<if test="isdisabled != null and isdisabled != ''">#{isdisabled},</if>
<if test="certificatetypeidcode != null and certificatetypeidcode != ''">#{certificatetypeidcode},</if>
<if test="jrfs != null and jrfs != ''">#{jrfs},</if>
<if test="spareNumber != null and spareNumber != ''">#{spareNumber},</if>
<if test="sparenumber != null and sparenumber != ''">#{sparenumber},</if>
<if test="positionname != null and positionname != ''">#{positionname},</if>
<if test="pylxcode != null and pylxcode != ''">#{pylxcode},</if>
<if test="jbcc != null and jbcc != ''">#{jbcc},</if>
<if test="contractEndTime != null and contractEndTime != ''">#{contractEndTime},</if>
<if test="contractendtime != null and contractendtime != ''">#{contractendtime},</if>
<if test="sequence != null and sequence != ''">#{sequence},</if>
<if test="genderCode != null and genderCode != ''">#{genderCode},</if>
<if test="zwwxMobile != null and zwwxMobile != ''">#{zwwxMobile},</if>
<if test="gendercode != null and gendercode != ''">#{gendercode},</if>
<if test="zwwxmobile != null and zwwxmobile != ''">#{zwwxmobile},</if>
<if test="district != null and district != ''">#{district},</if>
<if test="certificateTypeId != null and certificateTypeId != ''">#{certificateTypeId},</if>
<if test="contractStartTime != null and contractStartTime != ''">#{contractStartTime},</if>
<if test="certificatetypeid != null and certificatetypeid != ''">#{certificatetypeid},</if>
<if test="contractstarttime != null and contractstarttime != ''">#{contractstarttime},</if>
<if test="rylydw != null and rylydw != ''">#{rylydw},</if>
<if test="telephoneNumber != null and telephoneNumber != ''">#{telephoneNumber},</if>
<if test="telephonenumber != null and telephonenumber != ''">#{telephonenumber},</if>
<if test="gender != null and gender != ''">#{gender},</if>
<if test="city != null and city != ''">#{city},</if>
<if test="jbccCode != null and jbccCode != ''">#{jbccCode},</if>
<if test="jbcccode != null and jbcccode != ''">#{jbcccode},</if>
<if test="rylb != null and rylb != ''">#{rylb},</if>
<if test="hometownCode != null and hometownCode != ''">#{hometownCode},</if>
<if test="hometowncode != null and hometowncode != ''">#{hometowncode},</if>
<if test="units != null and units != ''">#{units},</if>
<if test="srzUserid != null and srzUserid != ''">#{srzUserid},</if>
<if test="createAt != null and createAt != ''">#{createAt},</if>
<if test="engName != null and engName != ''">#{engName},</if>
<if test="isDeleted != null and isDeleted != ''">#{isDeleted},</if>
<if test="srzuserid != null and srzuserid != ''">#{srzuserid},</if>
<if test="createat != null and createat != ''">#{createat},</if>
<if test="engname != null and engname != ''">#{engname},</if>
<if test="isdeleted != null and isdeleted != ''">#{isdeleted},</if>
<if test="jrfscode != null and jrfscode != ''">#{jrfscode},</if>
<if test="email != null and email != ''">#{email},</if>
<if test="zwbsCode != null and zwbsCode != ''">#{zwbsCode},</if>
<if test="zwbscode != null and zwbscode != ''">#{zwbscode},</if>
<if test="dwzyld != null and dwzyld != ''">#{dwzyld},</if>
<if test="pylx != null and pylx != ''">#{pylx},</if>
<if test="systemId != null and systemId != ''">#{systemId},</if>
<if test="rylbCode != null and rylbCode != ''">#{rylbCode},</if>
<if test="systemid != null and systemid != ''">#{systemid},</if>
<if test="rylbcode != null and rylbcode != ''">#{rylbcode},</if>
<if test="hometown != null and hometown != ''">#{hometown},</if>
<if test="photo != null and photo != ''">#{photo},</if>
<if test="glzrr != null and glzrr != ''">#{glzrr},</if>
<if test="userId != null and userId != ''">#{userId},</if>
<if test="zwwxId != null and zwwxId != ''">#{zwwxId},</if>
<if test="userid != null and userid != ''">#{userid},</if>
<if test="zwwxid != null and zwwxid != ''">#{zwwxid},</if>
<if test="ryzt != null and ryzt != ''">#{ryzt},</if>
<if test="certificateNumber != null and certificateNumber != ''">#{certificateNumber},</if>
<if test="certificatenumber != null and certificatenumber != ''">#{certificatenumber},</if>
<if test="zwbs != null and zwbs != ''">#{zwbs},</if>
<if test="faxNumber != null and faxNumber != ''">#{faxNumber},</if>
<if test="faxnumber != null and faxnumber != ''">#{faxnumber},</if>
<if test="fullname != null and fullname != ''">#{fullname},</if>
<if test="isMappingPerson != null and isMappingPerson != ''">#{isMappingPerson},</if>
<if test="taskId != null and taskId != ''">#{taskId},</if>
<if test="ismappingperson != null and ismappingperson != ''">#{ismappingperson},</if>
<if test="taskid != null and taskid != ''">#{taskid},</if>
<if test="username != null and username != ''">#{username},</if>
<if test="needUpdate != null">#{needUpdate},</if>
</trim>
</insert>
</mapper>

7
zdxt-modules/zdxt-system/src/main/java/org/dromara/system/service/impl/SysUserServiceImpl.java

@ -165,7 +165,12 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
*/
@Override
public SysUserVo selectUserByLoginName(String loginName) {
return baseMapper.selectVoOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getLoginName, loginName));
return baseMapper.selectVoOne(new LambdaQueryWrapper<SysUser>()
.eq(SysUser::getLoginName, loginName)
// 历史数据可能存在重复 login_name: 取更新时间最新的一条, 避免 TooManyResultsException
.orderByDesc(SysUser::getUpdateTime)
.orderByDesc(SysUser::getUserId)
.last("limit 1"));
}
/**

2
zdxt-web-server/zdxt-admin-web-server/src/main/resources/application-prod.yml

@ -312,7 +312,7 @@ szypt:
srnwg:
#正式
# url: ENC(pHNm/o0+6S+HjrM5nuMiPRfkrHS1tXYD5i25OBtM4dWSi6MvH6iXfw==)
url: ENC(HCw6VzCad8GcF4cOEZdHD0IqXKkxLRc6YlVtnr3O1r4=)
url: http://10.76.108.1/srz
systemCode: ENC(cHDdxMKpJ/rbuj4PVCxylN+zPd9I2KT0)
integrationKey: ENC(txSndcPbZK5mYjW7Doa/n9Ips2PLa9NV)
paasId: szsfj_zhifajianduma_001

Loading…
Cancel
Save