add(REQ-3342) 同步云筑用户到third_person中
This commit is contained in:
parent
4c9cdb56e1
commit
a3bdee9d3c
@ -38,5 +38,9 @@
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@ -0,0 +1,20 @@
|
||||
package cn.axzo.riven.api.v2.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @Author zr
|
||||
* @Date 2025/2/14 17:31
|
||||
* @Description 同步平台类型
|
||||
**/
|
||||
@Getter
|
||||
public enum ThirdPersonTypeEnum {
|
||||
YUN_ZHU("云筑"),
|
||||
;
|
||||
|
||||
public final String msg;
|
||||
|
||||
ThirdPersonTypeEnum(String msg){
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
28
riven-api-v2/src/main/java/cn/axzo/riven/api/v2/thirdparty/feign/ThirdPersonApi.java
vendored
Normal file
28
riven-api-v2/src/main/java/cn/axzo/riven/api/v2/thirdparty/feign/ThirdPersonApi.java
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
package cn.axzo.riven.api.v2.thirdparty.feign;
|
||||
|
||||
import cn.axzo.foundation.result.ApiResult;
|
||||
import cn.axzo.riven.api.v2.thirdparty.req.ThirdPersonBatchAddReq;
|
||||
import cn.axzo.riven.api.v2.thirdparty.resp.ThirdPersonBatchAddResp;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author zr
|
||||
* @Date 2025/2/14 17:04
|
||||
* @Description
|
||||
**/
|
||||
|
||||
@FeignClient(
|
||||
value = "riven",
|
||||
url = "${axzo.service.riven:http://riven:8080}"
|
||||
)
|
||||
public interface ThirdPersonApi {
|
||||
|
||||
@PostMapping("api/riven/thirdPerson/batchAdd")
|
||||
ApiResult<List<ThirdPersonBatchAddResp>> batchAdd(@RequestBody @Validated ThirdPersonBatchAddReq req );
|
||||
|
||||
}
|
||||
66
riven-api-v2/src/main/java/cn/axzo/riven/api/v2/thirdparty/req/ThirdPersonAddReq.java
vendored
Normal file
66
riven-api-v2/src/main/java/cn/axzo/riven/api/v2/thirdparty/req/ThirdPersonAddReq.java
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
package cn.axzo.riven.api.v2.thirdparty.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author zr
|
||||
* @Date 2025/2/17 10:02
|
||||
* @Description
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ThirdPersonAddReq {
|
||||
|
||||
@NotNull(message = "PersonId must be not null")
|
||||
private Long personId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@NotBlank(message = "Name must be not blank")
|
||||
private String thirdPersonName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@NotBlank(message = "IdNumber must be not blank")
|
||||
private String thirdIdNumber;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@NotBlank(message = "Phone must be not blank")
|
||||
private String thirdPersonPhone;
|
||||
|
||||
/**
|
||||
* 三方性别
|
||||
*/
|
||||
private String thirdSex;
|
||||
|
||||
/**
|
||||
* 身份证签发单位
|
||||
*/
|
||||
private String thirdAuthority;
|
||||
|
||||
/**
|
||||
* 三方人脸照片
|
||||
*/
|
||||
private String thirdPersonFaceUrl;
|
||||
|
||||
/**
|
||||
* 第三方人员唯一标识
|
||||
*/
|
||||
private String thirdUniquePersonId;
|
||||
/**
|
||||
* 三方身份证照片
|
||||
*/
|
||||
private String thirdPersonPhoto;
|
||||
}
|
||||
30
riven-api-v2/src/main/java/cn/axzo/riven/api/v2/thirdparty/req/ThirdPersonBatchAddReq.java
vendored
Normal file
30
riven-api-v2/src/main/java/cn/axzo/riven/api/v2/thirdparty/req/ThirdPersonBatchAddReq.java
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
package cn.axzo.riven.api.v2.thirdparty.req;
|
||||
|
||||
import cn.axzo.riven.api.v2.common.enums.ThirdPersonTypeEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author zr
|
||||
* @Date 2025/2/14 17:06
|
||||
* @Description 平台同步类型
|
||||
**/
|
||||
@Data
|
||||
public class ThirdPersonBatchAddReq {
|
||||
|
||||
/**
|
||||
* 同步平台类型
|
||||
*/
|
||||
@NotNull(message = "Type must be not null")
|
||||
private ThirdPersonTypeEnum type;
|
||||
|
||||
/**
|
||||
* 同步人员信息
|
||||
*/
|
||||
@NotEmpty(message = "Third persons must be not empty")
|
||||
private List<ThirdPersonAddReq> thirdPersons;
|
||||
|
||||
}
|
||||
26
riven-api-v2/src/main/java/cn/axzo/riven/api/v2/thirdparty/req/ThirdPersonQuery.java
vendored
Normal file
26
riven-api-v2/src/main/java/cn/axzo/riven/api/v2/thirdparty/req/ThirdPersonQuery.java
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
package cn.axzo.riven.api.v2.thirdparty.req;
|
||||
|
||||
import cn.axzo.riven.api.v2.common.enums.ThirdPersonTypeEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author zr
|
||||
* @Date 2025/2/17 15:36
|
||||
* @Description
|
||||
**/
|
||||
@Data
|
||||
public class ThirdPersonQuery {
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idNumber;
|
||||
private List<String> idNumbers;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private ThirdPersonTypeEnum type;
|
||||
}
|
||||
16
riven-api-v2/src/main/java/cn/axzo/riven/api/v2/thirdparty/resp/ThirdPersonBatchAddResp.java
vendored
Normal file
16
riven-api-v2/src/main/java/cn/axzo/riven/api/v2/thirdparty/resp/ThirdPersonBatchAddResp.java
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
package cn.axzo.riven.api.v2.thirdparty.resp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author zr
|
||||
* @Date 2025/2/14 17:28
|
||||
* @Description
|
||||
**/
|
||||
@Data
|
||||
public class ThirdPersonBatchAddResp {
|
||||
// personId
|
||||
private Long personId;
|
||||
//第三方人员id
|
||||
private Long thirdPersonId;
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package cn.axzo.riven;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.core.env.Environment;
|
||||
|
||||
@Slf4j
|
||||
@SpringBootApplication(scanBasePackages = {"cn.axzo", "com.axzo.framework"})
|
||||
@EnableFeignClients(basePackages = {"cn.axzo"})
|
||||
@MapperScan({"cn.axzo.riven.dingtalk.**.mapper"})
|
||||
public class RivenDevApplication {
|
||||
public static void main(String[] args) {
|
||||
System.setProperty("spring.profiles.active","dev");
|
||||
System.setProperty("NACOS_HOST","https://dev-nacos.axzo.cn");
|
||||
System.setProperty("NACOS_PORT","443");
|
||||
System.setProperty("NACOS_NAMESPACE_ID","35eada10-9574-4db8-9fea-bc6a4960b6c7");
|
||||
System.setProperty("CUSTOM_ENV","dev");
|
||||
|
||||
System.setProperty("spring.datasource.url","jdbc:mysql://172.16.2.171:3306/pudge?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&serverTimezone=Asia/Shanghai&useSSL=true&verifyServerCertificate=false&rewriteBatchedStatements=true");
|
||||
// System.setProperty("spring.datasource.url","jdbc:mysql://172.16.2.171:3306/pudge?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&serverTimezone=Asia/Shanghai&useSSL=true&verifyServerCertificate=false&rewriteBatchedStatements=true");
|
||||
System.setProperty("spring.redis.port","31270");
|
||||
System.setProperty("spring.redis.host","172.16.2.23");
|
||||
ConfigurableApplicationContext run = SpringApplication.run(RivenDevApplication.class, args);
|
||||
Environment env = run.getEnvironment();
|
||||
log.info(
|
||||
"--------------------------------------------------------------------------------------------------------------------\n" +
|
||||
"Application 【{}】 is running on 【{}】 environment!\n" +
|
||||
"Api Local: \thttp://127.0.0.1:{}\n" +
|
||||
"Mysql: \t{}\t username:{}\n" +
|
||||
"Redis: \t{}:{}\t database:{}\n" +
|
||||
"RabbitMQ: \t{}\t username:{}",
|
||||
env.getProperty("spring.application.name"),
|
||||
env.getProperty("spring.profiles.active"),
|
||||
env.getProperty("server.port"),
|
||||
env.getProperty("spring.datasource.url"),
|
||||
env.getProperty("spring.datasource.username"),
|
||||
env.getProperty("spring.redis.host"),
|
||||
env.getProperty("spring.redis.port"),
|
||||
env.getProperty("spring.redis.database"),
|
||||
env.getProperty("spring.rabbitmq.addresses"),
|
||||
env.getProperty("spring.rabbitmq.username") +
|
||||
"\n----------------------------------------------------------");
|
||||
}
|
||||
}
|
||||
@ -97,6 +97,16 @@
|
||||
<artifactId>alibaba-dingtalk-service-sdk</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.axzo</groupId>
|
||||
<artifactId>riven-api-v2</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.trade</groupId>
|
||||
<artifactId>trade-data-security-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
package cn.axzo.riven.third.controller;
|
||||
|
||||
import cn.axzo.basics.common.exception.ServiceException;
|
||||
import cn.axzo.foundation.result.ApiResult;
|
||||
import cn.axzo.riven.api.v2.common.enums.ThirdPersonTypeEnum;
|
||||
import cn.axzo.riven.api.v2.thirdparty.feign.ThirdPersonApi;
|
||||
import cn.axzo.riven.api.v2.thirdparty.req.ThirdPersonBatchAddReq;
|
||||
import cn.axzo.riven.api.v2.thirdparty.resp.ThirdPersonBatchAddResp;
|
||||
import cn.axzo.riven.third.service.ThirdPersonStrategy;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author zr
|
||||
* @Date 2025/2/14 17:37
|
||||
* @Description
|
||||
**/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class ThirdPersonApiImpl implements ThirdPersonApi {
|
||||
|
||||
private final List<ThirdPersonStrategy> thirdPersonStrategys;
|
||||
|
||||
@Override
|
||||
public ApiResult<List<ThirdPersonBatchAddResp>> batchAdd(ThirdPersonBatchAddReq req) {
|
||||
ThirdPersonStrategy thirdPersonStrategy = getThirdPersonStrategy(req.getType());
|
||||
List<ThirdPersonBatchAddResp> resps = thirdPersonStrategy.saveOrUpdateBatch(req.getThirdPersons());
|
||||
return ApiResult.success(resps);
|
||||
}
|
||||
|
||||
private ThirdPersonStrategy getThirdPersonStrategy(ThirdPersonTypeEnum type) {
|
||||
return thirdPersonStrategys.stream().filter(item -> item.getType(type))
|
||||
.findFirst().orElseThrow(() -> new ServiceException("不支持对应三方用户"));
|
||||
}
|
||||
}
|
||||
@ -1,14 +1,17 @@
|
||||
package cn.axzo.riven.third.dao;
|
||||
|
||||
import cn.axzo.framework.data.mybatisplus.model.BaseEntity;
|
||||
import cn.axzo.riven.api.v2.thirdparty.req.ThirdPersonQuery;
|
||||
import cn.axzo.riven.third.dao.mapper.ThirdPersonMapper;
|
||||
import cn.axzo.riven.third.dao.mapper.ThirdProjectMapper;
|
||||
import cn.axzo.riven.third.entity.ThirdPerson;
|
||||
import cn.axzo.riven.third.entity.ThirdProject;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Author: zhongpeng
|
||||
* Date: 2024/6/25 18:08
|
||||
@ -16,4 +19,12 @@ import org.springframework.stereotype.Service;
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ThirdPersonDao extends ServiceImpl<ThirdPersonMapper, ThirdPerson> {
|
||||
|
||||
public List<ThirdPerson> list(ThirdPersonQuery req){
|
||||
return lambdaQuery().eq(BaseEntity::getIsDelete, 0L)
|
||||
.eq(Objects.nonNull(req.getType()), ThirdPerson::getThirdCode, req.getType().name())
|
||||
.eq(Objects.nonNull(req.getIdNumber()), ThirdPerson::getThirdIdNumber, req.getIdNumber())
|
||||
.in(CollUtil.isNotEmpty(req.getIdNumbers()),ThirdPerson::getThirdIdNumber, req.getIdNumbers())
|
||||
.list();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
package cn.axzo.riven.third.service;
|
||||
|
||||
import cn.axzo.riven.api.v2.thirdparty.req.ThirdPersonQuery;
|
||||
import cn.axzo.riven.client.common.enums.ThirdCodeEnum;
|
||||
import cn.axzo.riven.client.res.ThirdPartPersonRes;
|
||||
import cn.axzo.riven.third.entity.ThirdPerson;
|
||||
import cn.axzo.riven.third.entity.ThirdProject;
|
||||
import cn.axzo.riven.third.entity.ThirdProjectPerson;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Author: zhongpeng
|
||||
@ -28,4 +29,12 @@ public interface ThirdPersonService {
|
||||
|
||||
public ThirdPartPersonRes getThirdPartPerson(Long personId, ThirdCodeEnum thirdCode);
|
||||
|
||||
/**
|
||||
* 批量添加三方平台用户
|
||||
* @param thirdPersonList
|
||||
*/
|
||||
void saveOrUpdateBatch(List<ThirdPerson> thirdPersonList);
|
||||
|
||||
|
||||
List<ThirdPerson> list(ThirdPersonQuery req);
|
||||
}
|
||||
|
||||
@ -0,0 +1,28 @@
|
||||
package cn.axzo.riven.third.service;
|
||||
|
||||
import cn.axzo.riven.api.v2.common.enums.ThirdPersonTypeEnum;
|
||||
import cn.axzo.riven.api.v2.thirdparty.req.ThirdPersonAddReq;
|
||||
import cn.axzo.riven.api.v2.thirdparty.req.ThirdPersonQuery;
|
||||
import cn.axzo.riven.api.v2.thirdparty.resp.ThirdPersonBatchAddResp;
|
||||
import cn.axzo.riven.third.entity.ThirdPerson;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author zr
|
||||
* @Date 2025/2/14 18:10
|
||||
* @Description
|
||||
**/
|
||||
public interface ThirdPersonStrategy {
|
||||
|
||||
Boolean getType(ThirdPersonTypeEnum type);
|
||||
|
||||
List<ThirdPersonBatchAddResp> saveOrUpdateBatch(List<ThirdPersonAddReq> req);
|
||||
|
||||
/**
|
||||
* 根据类型查询云筑人员
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
List<ThirdPerson> listYunZhu(ThirdPersonQuery req);
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package cn.axzo.riven.third.service.impl;
|
||||
|
||||
import cn.axzo.riven.api.v2.thirdparty.req.ThirdPersonQuery;
|
||||
import cn.axzo.riven.client.common.enums.ThirdCodeEnum;
|
||||
import cn.axzo.riven.client.res.ThirdPartPersonRes;
|
||||
import cn.axzo.riven.third.dao.ThirdPersonDao;
|
||||
@ -55,6 +56,21 @@ public class ThirdPersonServiceImpl implements ThirdPersonService {
|
||||
return convertToResp(list.get(0));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量添加三方平台用户
|
||||
*
|
||||
* @param thirdPersonList
|
||||
*/
|
||||
@Override
|
||||
public void saveOrUpdateBatch(List<ThirdPerson> thirdPersonList) {
|
||||
thirdPersonDao.saveOrUpdateBatch(thirdPersonList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ThirdPerson> list(ThirdPersonQuery req) {
|
||||
return thirdPersonDao.list(req);
|
||||
}
|
||||
|
||||
private ThirdPartPersonRes convertToResp(ThirdPerson thirdPerson) {
|
||||
if (thirdPerson == null) {
|
||||
return null;
|
||||
|
||||
@ -0,0 +1,90 @@
|
||||
package cn.axzo.riven.third.service.impl;
|
||||
|
||||
import cn.axzo.basics.profiles.common.enums.SexType;
|
||||
import cn.axzo.riven.api.v2.common.enums.ThirdPersonTypeEnum;
|
||||
import cn.axzo.riven.api.v2.thirdparty.req.ThirdPersonAddReq;
|
||||
import cn.axzo.riven.api.v2.thirdparty.req.ThirdPersonBatchAddReq;
|
||||
import cn.axzo.riven.api.v2.thirdparty.req.ThirdPersonQuery;
|
||||
import cn.axzo.riven.api.v2.thirdparty.resp.ThirdPersonBatchAddResp;
|
||||
import cn.axzo.riven.third.entity.ThirdPerson;
|
||||
import cn.axzo.riven.third.service.ThirdPersonService;
|
||||
import cn.axzo.riven.third.service.ThirdPersonStrategy;
|
||||
import cn.axzo.trade.datasecurity.core.util.DataSecurityHelper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author zr
|
||||
* @Date 2025/2/14 18:17
|
||||
* @Description
|
||||
**/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
@Slf4j
|
||||
public class YunZhuThirdPersonStrategy implements ThirdPersonStrategy {
|
||||
|
||||
private final ThirdPersonService thirdPersonService;
|
||||
|
||||
@Override
|
||||
public Boolean getType(ThirdPersonTypeEnum type) {
|
||||
return Objects.equals(ThirdPersonTypeEnum.YUN_ZHU, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ThirdPersonBatchAddResp> saveOrUpdateBatch(List<ThirdPersonAddReq> req) {
|
||||
|
||||
List<String> idNumbers = req.stream().map(item -> {
|
||||
return DataSecurityHelper.encrypt(item.getThirdIdNumber());
|
||||
}).distinct().collect(Collectors.toList());
|
||||
ThirdPersonQuery query = new ThirdPersonQuery();
|
||||
query.setIdNumbers(idNumbers);
|
||||
query.setType(ThirdPersonTypeEnum.YUN_ZHU);
|
||||
List<ThirdPerson> thirdPeople = listYunZhu(query);
|
||||
Map<String, ThirdPerson> numberPersonMap = thirdPeople.stream()
|
||||
.collect(Collectors.toMap(ThirdPerson::getThirdIdNumber, Function.identity(), (x, y) -> x));
|
||||
|
||||
List<ThirdPerson> thirdPersonList = req.stream().map(item -> {
|
||||
ThirdPerson thirdPerson = new ThirdPerson();
|
||||
String idNumberSecurity = DataSecurityHelper.encrypt(item.getThirdIdNumber());
|
||||
if (numberPersonMap.containsKey(idNumberSecurity)) {
|
||||
thirdPerson = numberPersonMap.get(idNumberSecurity);
|
||||
}
|
||||
build(thirdPerson, item);
|
||||
thirdPerson.setThirdUniquePersonId(idNumberSecurity);
|
||||
thirdPerson.setThirdIdNumber(idNumberSecurity);
|
||||
return thirdPerson;
|
||||
}).collect(Collectors.toList());
|
||||
thirdPersonService.saveOrUpdateBatch(thirdPersonList);
|
||||
|
||||
return thirdPersonList.stream().map(item ->{
|
||||
ThirdPersonBatchAddResp resp = new ThirdPersonBatchAddResp();
|
||||
resp.setPersonId(item.getPersonId());
|
||||
resp.setThirdPersonId(item.getId());
|
||||
return resp;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ThirdPerson> listYunZhu(ThirdPersonQuery req) {
|
||||
return thirdPersonService.list(req);
|
||||
}
|
||||
|
||||
|
||||
private void build(ThirdPerson thirdPerson, ThirdPersonAddReq req){
|
||||
thirdPerson.setThirdCode(ThirdPersonTypeEnum.YUN_ZHU.name());
|
||||
thirdPerson.setThirdPersonName(req.getThirdPersonName());
|
||||
thirdPerson.setThirdPersonPhone(DataSecurityHelper.encrypt(req.getThirdPersonPhone()));
|
||||
thirdPerson.setThirdPersonPhoto(req.getThirdPersonPhoto());
|
||||
thirdPerson.setThirdAuthority(req.getThirdAuthority());
|
||||
thirdPerson.setThirdPersonFaceUrl(req.getThirdPersonFaceUrl());
|
||||
thirdPerson.setThirdSex(req.getThirdSex());
|
||||
thirdPerson.setPersonId(req.getPersonId());
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user