修改导入用户bug

dev_sys_config818
zhangyue 2026-08-25 17:26:52 +08:00
parent 3fbffef136
commit 63d883956b
3 changed files with 12 additions and 3 deletions

View File

@ -814,7 +814,6 @@ public class UserUpdateExe {
UserE userE = new UserE(); UserE userE = new UserE();
UserDO userDO = userRepository.getById( id); UserDO userDO = userRepository.getById( id);
CorpInfoDO corpInfoDO = corpInfoRepository.getById(userDO.getCorpinfoId()); CorpInfoDO corpInfoDO = corpInfoRepository.getById(userDO.getCorpinfoId());
userE.resetPassword(zcloudTenantTypeConfigFacade.getPasswordByCode(corpInfoDO.getType())); userE.resetPassword(zcloudTenantTypeConfigFacade.getPasswordByCode(corpInfoDO.getType()));
userRepository.changePassword(id, userE.getPassword()); userRepository.changePassword(id, userE.getPassword());
} }

View File

@ -297,6 +297,8 @@ public class CorpInfoRepositoryImpl extends BaseRepositoryImpl<CorpInfoMapper, C
if (!ObjectUtils.isEmpty(params.get("menuPath"))) { if (!ObjectUtils.isEmpty(params.get("menuPath"))) {
menuPerms = MenuEnum.getMenuKeyByPath(params.get("menuPath").toString()); menuPerms = MenuEnum.getMenuKeyByPath(params.get("menuPath").toString());
} }
SSOUser ssoUser = AuthContext.get();
params.put("tenantId",ssoUser.getTenantId());
IPage<CorpInfoDO> result = corpInfoMapper.corpUserMiddlePage(iPage, params, menuPerms); IPage<CorpInfoDO> result = corpInfoMapper.corpUserMiddlePage(iPage, params, menuPerms);
return PageHelper.pageToResponse(result, result.getRecords()); return PageHelper.pageToResponse(result, result.getRecords());
} }
@ -342,8 +344,13 @@ public class CorpInfoRepositoryImpl extends BaseRepositoryImpl<CorpInfoMapper, C
CorpInfoDO corpInfoDO = corpInfoMapper.selectById(AuthContext.getTenantId()); CorpInfoDO corpInfoDO = corpInfoMapper.selectById(AuthContext.getTenantId());
if(corpInfoDO == null) if(corpInfoDO == null)
throw new BizException("当前企业不存在"); throw new BizException("当前企业不存在");
try {
if(zcloudTenantTypeConfigFacade.getDefaultType("defaultType0001").equals(corpInfoDO.getType())) if(zcloudTenantTypeConfigFacade.getDefaultType("defaultType0001").equals(corpInfoDO.getType()))
return true; return true;
} catch (Exception e){
throw new BizException("未配置默认监管端租户类型,请联系管理员配置后操作。");
}
return false; return false;
} }

View File

@ -43,6 +43,9 @@
<if test="params.eqCorpState != null and params.eqCorpState.trim() != ''"> <if test="params.eqCorpState != null and params.eqCorpState.trim() != ''">
AND c.corp_state = #{params.eqCorpState} AND c.corp_state = #{params.eqCorpState}
</if> </if>
<if test="params.tenantId != null and params.tenantId != ''">
AND c.tenant_id = #{params.tenantId}
</if>
group by c.id group by c.id
ORDER BY ORDER BY
c.corp_order ASC, c.corp_order ASC,