相关方用户岗位
parent
15c3260c09
commit
f5fbc6a8bd
|
|
@ -2,6 +2,7 @@ package com.zcloud.basic.info.command;
|
|||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.jjb.saas.config.client.dicttree.facade.ConfDictTreeFacade;
|
||||
|
|
@ -160,6 +161,8 @@ public class UserAddExe {
|
|||
if(userDO == null){
|
||||
throw new BizException("用户不存在");
|
||||
}
|
||||
userRepository.checkUserIdCard(cmd.getId(),cmd.getUserIdCard());
|
||||
|
||||
if(userDO.getFlowFlag()!=null && !userDO.getFlowFlag().equals(cmd.getFlowFlag())){
|
||||
// 已完善,与旧数据对比
|
||||
List<UserCorpRecordDO> userCorpRecordDOList = userCorpRecordRepository.getInfoListByUserId(cmd.getId());
|
||||
|
|
|
|||
|
|
@ -80,5 +80,7 @@ public interface UserRepository extends BaseRepository<UserDO> {
|
|||
UserDO getByPhone(String phone);
|
||||
|
||||
UserDO getByPhoneAndIdCard(String phone, String idCardNumber);
|
||||
|
||||
void checkUserIdCard(@NotNull(message = "主键id不能为空") Long id, String userIdCard);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -509,5 +509,16 @@ public class UserRepositoryImpl extends BaseRepositoryImpl<UserMapper, UserDO> i
|
|||
queryWrapper.eq("user_id_card", idCardNumber);
|
||||
return getOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkUserIdCard(Long id, String userIdCard) {
|
||||
Map<String, Object> verifyParam = new HashMap<>();
|
||||
verifyParam.put("userIdCard", userIdCard);
|
||||
verifyParam.put("id", id);
|
||||
Integer count = userMapper.countUser(verifyParam);
|
||||
if (count > 0) {
|
||||
throw new BizException("身份证号已经存在,请联系管理员");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -168,7 +168,10 @@
|
|||
<select id="getInfoById" resultType="com.zcloud.basic.info.persistence.dataobject.UserDO">
|
||||
select
|
||||
d.name as department_name,
|
||||
p.post_name,
|
||||
CASE
|
||||
WHEN c.type IN (1, 2, 3) THEN u.post_name
|
||||
ELSE p.post_name
|
||||
END AS post_name,
|
||||
u.id,
|
||||
u.user_id,
|
||||
u.username,
|
||||
|
|
|
|||
Loading…
Reference in New Issue