Browse Source

专家入库通过后账号启用

master
WendyYang 1 year ago
parent
commit
52053938be
2 changed files with 11 additions and 2 deletions
  1. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java
  2. +9
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java View File

@@ -144,10 +144,10 @@ public class ExpertManage {
UserInfo userInfo = iUserInfoService.getUserInfoByPhoneNo(phoneNo);
if (Objects.isNull(userInfo)) {
userInfo = UserInfo.builder()
// .accountId(dingEmployeeInfo.getAccountId())
//.accountId(dingEmployeeInfo.getAccountId())
.username(basicInfo.getName())
.realName(basicInfo.getName())
// .employeeCode(dingEmployeeInfo.getEmployeeCode())
//.employeeCode(dingEmployeeInfo.getEmployeeCode())
.available(UserAvailableEnum.DISABLE.name())
.mobile(phoneNo)
.createBy(operatorId)


+ 9
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java View File

@@ -34,7 +34,10 @@ import com.ningdatech.pmapi.sys.model.entity.UserRole;
import com.ningdatech.pmapi.sys.service.IRoleService;
import com.ningdatech.pmapi.sys.service.IUserRoleService;
import com.ningdatech.pmapi.sys.service.impl.UserRoleServiceImpl;
import com.ningdatech.pmapi.user.constant.UserAvailableEnum;
import com.ningdatech.pmapi.user.entity.UserInfo;
import com.ningdatech.pmapi.user.entity.enumeration.RoleEnum;
import com.ningdatech.pmapi.user.service.IUserInfoService;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import com.ningdatech.yxt.utils.JSONUtils;
import lombok.RequiredArgsConstructor;
@@ -65,6 +68,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
private final IRoleService roleService;
private final IUserRoleService userRoleService;
private final IExpertSensitiveInfoModifyDetailRecordService iExpertSensitiveInfoModifyDetailRecordService;
private final IUserInfoService userInfoService;


/**
@@ -390,6 +394,11 @@ public class ExpertInfoServiceImpl implements ExpertInfoService {
expertUserFullInfo.setRemark(cmd.getRemark());
expertUserFullInfo.setRegionCode(cmd.getJoinRegionCode());
expertUserFullInfo.setRegionLevel(cmd.getJoinRegionLevel());
// 账号启用
LambdaUpdateWrapper<UserInfo> userInfoUpdate = Wrappers.lambdaUpdate(UserInfo.class)
.eq(UserInfo::getId,expertUserId)
.set(UserInfo::getAvailable, UserAvailableEnum.ENABLE);
userInfoService.update(userInfoUpdate);

// 保存所有专家标签字段
List<ExpertTag> saveExpertTagList = buildSaveExpertTagList(expertUserId, cmd.getOther());


Loading…
Cancel
Save