feat(user): 添加九公司用户标识功能
parent
97d6d2f1fe
commit
ba4945e651
|
|
@ -3,8 +3,8 @@ spring:
|
|||
import:
|
||||
# - classpath:nacos.yml
|
||||
# - classpath:sdk.yml
|
||||
# - classpath:nacos-prod.yml
|
||||
# - classpath:sdk-prod.yml
|
||||
- classpath:nacos-prod2.yml
|
||||
- classpath:sdk-prod2.yml
|
||||
- classpath:nacos-prod.yml
|
||||
- classpath:sdk-prod.yml
|
||||
# - classpath:nacos-prod2.yml
|
||||
# - classpath:sdk-prod2.yml
|
||||
- classpath:swagger.yml
|
||||
|
|
|
|||
|
|
@ -63,3 +63,6 @@ dahua:
|
|||
password: qinan@202604
|
||||
clientId: mkmj_management
|
||||
clientSecret: 5ef82f7c-9926-46a3-8d07-136fd054849c
|
||||
nine:
|
||||
config:
|
||||
companyId: 2008712261453131776
|
||||
|
|
|
|||
|
|
@ -64,3 +64,6 @@ dahua:
|
|||
password: qinan@202604
|
||||
clientId: mkmj_management
|
||||
clientSecret: 5ef82f7c-9926-46a3-8d07-136fd054849c
|
||||
nine:
|
||||
config:
|
||||
companyId: 2590800828822460065
|
||||
|
|
@ -14,6 +14,7 @@ import com.jjb.saas.system.client.user.facade.UserFacade;
|
|||
import com.zcloud.basic.info.command.convertor.CorpInfoCoConvertor;
|
||||
import com.zcloud.basic.info.command.convertor.UserCoConvertor;
|
||||
import com.zcloud.basic.info.constant.RedisConstant;
|
||||
import com.zcloud.basic.info.domain.config.NineCompanyConfig;
|
||||
import com.zcloud.basic.info.domain.enums.UserEmploymentFlagEnum;
|
||||
import com.zcloud.basic.info.domain.enums.UserTypeEnum;
|
||||
import com.zcloud.basic.info.domain.gateway.UserGateway;
|
||||
|
|
@ -32,6 +33,7 @@ import com.zcloud.gbscommon.utils.PageQueryHelper;
|
|||
import com.zcloud.gbscommon.utils.Tools;
|
||||
import com.zcloud.gbscommon.utils.ZcloudRedisUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -49,6 +51,7 @@ import java.util.stream.Collectors;
|
|||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
@Slf4j
|
||||
public class UserQueryExe {
|
||||
private final UserRepository userRepository;
|
||||
private final UserGateway userGateway;
|
||||
|
|
@ -57,6 +60,7 @@ public class UserQueryExe {
|
|||
private final CorpInfoCoConvertor corpInfoCoConvertor;
|
||||
private ZcloudRedisUtil zcloudRedisUtil;
|
||||
private final UserExpandInfoRepository userExpandInfoRepository;
|
||||
private final NineCompanyConfig nineCompanyConfig;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -236,6 +240,14 @@ public class UserQueryExe {
|
|||
UserDO userDO = userRepository.getInfoById(id);
|
||||
UserCO userCO = new UserCO();
|
||||
BeanUtils.copyProperties(userDO, userCO);
|
||||
try{
|
||||
Long nineCompanyId = nineCompanyConfig.getCompanyId();
|
||||
userCO.setNineCompanyFlag(nineCompanyId != null && nineCompanyId.equals(userCO.getCorpinfoId()));
|
||||
}catch (Exception e){
|
||||
log.error("获取九公司ID异常", e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return SingleResponse.of(userCO);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -218,5 +218,8 @@ public class UserCO extends ClientObject {
|
|||
private String payNumber;
|
||||
@ApiModelProperty(value = "是否缴纳其他人身伤害保险")
|
||||
private Integer isBf;
|
||||
|
||||
@ApiModelProperty(value = "是否九公司人员")
|
||||
private Boolean nineCompanyFlag;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue