Browse Source

优化脱敏

shuiqilin
zhangxin 1 year ago
parent
commit
5c7819c30d

+ 1
- 1
src/main/java/com/qtzl/alterSales/manager/handler/AflCenterUserInfoFindByIdHandler.java View File

@@ -36,7 +36,7 @@ public class AflCenterUserInfoFindByIdHandler extends AbstractAfterSalesManager<
aflCenterUserInfo.setIdNum(DesensitizedUtil.idCardNum(aflCenterUserInfo.getIdNum(), 3, 4));
}
if (!StringUtils.isEmpty(aflCenterUserInfo.getMobile())&&aflCenterUserInfo.getMobile().length()==11){
aflCenterUserInfo.setIdNum(DesensitizedUtil.mobilePhone(aflCenterUserInfo.getMobile()));
aflCenterUserInfo.setMobile(DesensitizedUtil.mobilePhone(aflCenterUserInfo.getMobile()));
}
return JSON.toJSONString(aflCenterUserInfo, SerializerFeature.WriteDateUseDateFormat);
}

+ 1
- 1
src/main/java/com/qtzl/alterSales/manager/handler/AflCenterUserInfoFindPageHandler.java View File

@@ -124,7 +124,7 @@ public class AflCenterUserInfoFindPageHandler extends AbstractAfterSalesManager<
aflCenterUserInfoVo.setIdNum(DesensitizedUtil.idCardNum(aflCenterUserInfoVo.getIdNum(), 3, 4));
}
if (!StringUtils.isEmpty(aflCenterUserInfoVo.getMobile())&&aflCenterUserInfoVo.getMobile().length()==11){
aflCenterUserInfoVo.setIdNum(DesensitizedUtil.mobilePhone(aflCenterUserInfoVo.getMobile()));
aflCenterUserInfoVo.setMobile(DesensitizedUtil.mobilePhone(aflCenterUserInfoVo.getMobile()));
}
return aflCenterUserInfoVo;
}

+ 3
- 0
src/main/java/com/qtzl/alterSales/manager/handler/AflCertificationInfoFindPageHandler.java View File

@@ -62,6 +62,9 @@ public class AflCertificationInfoFindPageHandler extends AbstractAfterSalesManag
if (!StringUtils.isEmpty(aflCertificationInfoVo.getIdCardNumber())&&aflCertificationInfoVo.getIdCardNumber().length()==18){
aflCertificationInfoVo.setIdCardNumber(DesensitizedUtil.idCardNum(aflCertificationInfoVo.getIdCardNumber(), 3, 4));
}
if (!StringUtils.isEmpty(aflCertificationInfoVo.getMobile())&&aflCertificationInfoVo.getMobile().length()==11){
aflCertificationInfoVo.setMobile(DesensitizedUtil.mobilePhone(aflCertificationInfoVo.getMobile()));
}
}
response.setData(result);
return response;

+ 11
- 1
src/main/java/com/qtzl/alterSales/manager/handler/AflOrderInfoFindByIdHandler.java View File

@@ -1,13 +1,16 @@
package com.qtzl.alterSales.manager.handler;

import cn.com.taiji.common.manager.net.http.ServiceHandleException;
import cn.hutool.core.util.DesensitizedUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.qtzl.alterSales.dao.entity.second.AflOrderInfo;
import com.qtzl.alterSales.manager.abstracts.AbstractAfterSalesManager;
import com.qtzl.alterSales.manager.model.protocol.sales.AflOrderInfoFindByIdRequest;
import com.qtzl.alterSales.manager.service.AflOrderInfoService;
import com.qtzl.alterSales.manager.service.AfterSalesCmd;
import com.txffp.api.core.manager.comm.annotation.ApiHandler;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
@@ -28,7 +31,14 @@ public class AflOrderInfoFindByIdHandler extends AbstractAfterSalesManager<AflOr

@Override
public String handleInternal(String filename, AflOrderInfoFindByIdRequest request) throws ServiceHandleException {
return JSON.toJSONString(aflOrderInfoService.findById(request.getId()), SerializerFeature.WriteDateUseDateFormat);
AflOrderInfo aflOrderInfo = aflOrderInfoService.findById(request.getId());
if (!StringUtils.isEmpty(aflOrderInfo.getMobile())&&aflOrderInfo.getMobile().length()==11){
aflOrderInfo.setMobile(DesensitizedUtil.mobilePhone(aflOrderInfo.getMobile()));
}
if (!StringUtils.isEmpty(aflOrderInfo.getIdNum())&&aflOrderInfo.getIdNum().length()==18){
aflOrderInfo.setIdNum(DesensitizedUtil.idCardNum(aflOrderInfo.getIdNum(), 0, 4));
}
return JSON.toJSONString(aflOrderInfo, SerializerFeature.WriteDateUseDateFormat);
}

}

+ 4
- 0
src/main/java/com/qtzl/alterSales/manager/handler/AflUserLogPageHandler.java View File

@@ -1,6 +1,7 @@
package com.qtzl.alterSales.manager.handler;

import cn.com.taiji.common.manager.net.http.ServiceHandleException;
import cn.hutool.core.util.DesensitizedUtil;
import com.google.common.collect.Lists;
import com.qtzl.alterSales.dao.entity.second.AflUserLog;
import com.qtzl.alterSales.dao.repo.jpa.second.AflUserLogRepo;
@@ -103,6 +104,9 @@ public class AflUserLogPageHandler extends AbstractAfterSalesManager<AflUserLogP
Date outTime = new Date(Long.valueOf(aflUserLog.getOutTime()) * 1000L);
aflUserLog.setOutTime(sdf.format(outTime));
}
if (!StringUtils.isEmpty(aflUserLog.getMobile())&&aflUserLog.getMobile().length()==11){
aflUserLog.setMobile(DesensitizedUtil.mobilePhone(aflUserLog.getMobile()));
}
return aflUserLog;
}
}

+ 4
- 0
src/main/java/com/qtzl/alterSales/manager/handler/AflUserLoginInfoFindPageHandler.java View File

@@ -2,6 +2,7 @@ package com.qtzl.alterSales.manager.handler;

import cn.com.taiji.common.manager.net.http.ServiceHandleException;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.DesensitizedUtil;
import com.google.common.collect.Lists;
import com.qtzl.alterSales.dao.entity.second.AflUserLoginInfo;
import com.qtzl.alterSales.dao.repo.jpa.second.AflUserLoginInfoRepo;
@@ -102,6 +103,9 @@ public class AflUserLoginInfoFindPageHandler extends AbstractAfterSalesManager<A
private AflUserLoginInfoVo toVo(AflUserLoginInfo aflUserLoginInfo) {
AflUserLoginInfoVo aflUserLoginInfoVo = new AflUserLoginInfoVo();
BeanUtil.copyProperties(aflUserLoginInfo, aflUserLoginInfoVo);
if (!StringUtils.isEmpty(aflUserLoginInfoVo.getMobile())&&aflUserLoginInfoVo.getMobile().length()==11){
aflUserLoginInfoVo.setMobile(DesensitizedUtil.mobilePhone(aflUserLoginInfoVo.getMobile()));
}
aflUserLoginInfoVo.setStatus(AuthenticationStatusEnum.YESREALNAME.getCode());
return aflUserLoginInfoVo;
}

+ 1
- 1
src/main/java/com/qtzl/alterSales/manager/service/AflCenterUserInfoServiceImpl.java View File

@@ -151,7 +151,7 @@ public class AflCenterUserInfoServiceImpl implements AflCenterUserInfoService{
AflCenterUserInfo aflCenterUserInfo = selectById(request.getId());
if (AccountTypeEnum.PERSONAL.getCode().equals(aflCenterUserInfo.getAccountType())&&
(aflCenterUserInfo.getName().equals(request.getNewName())
||request.getNewName().equals(aflCenterUserInfo.getAddress())
&&aflCenterUserInfo.getAddress().equals(request.getNewAddress())
)
){
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("个人用户变更前参数与变更后参数未发生改变");

+ 7
- 0
src/main/java/com/qtzl/alterSales/manager/service/AflOrderInfoServiceImpl.java View File

@@ -3,6 +3,7 @@ package com.qtzl.alterSales.manager.service;
import cn.com.taiji.common.manager.net.http.ServiceHandleException;
import cn.com.taiji.common.pub.CollectionTools;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.DesensitizedUtil;
import com.google.common.collect.Lists;
import com.qtzl.alterSales.dao.entity.second.AflOrderInfo;
import com.qtzl.alterSales.dao.repo.jpa.second.AflOrderInfoRepo;
@@ -171,6 +172,12 @@ public class AflOrderInfoServiceImpl implements AflOrderInfoService{
private AflOrderInfoVo toVo(AflOrderInfo aflOrderInfo) {
AflOrderInfoVo aflOrderInfoVo = new AflOrderInfoVo();
BeanUtil.copyProperties(aflOrderInfo, aflOrderInfoVo);
if (!StringUtils.isEmpty(aflOrderInfoVo.getMobile())&&aflOrderInfoVo.getMobile().length()==11){
aflOrderInfoVo.setMobile(DesensitizedUtil.mobilePhone(aflOrderInfoVo.getMobile()));
}
if (!StringUtils.isEmpty(aflOrderInfoVo.getIdNum())&&aflOrderInfoVo.getIdNum().length()==18){
aflOrderInfoVo.setIdNum(DesensitizedUtil.idCardNum(aflOrderInfoVo.getIdNum(), 0, 4));
}
aflOrderInfoVo.setPatternOpenId(aflOrderInfo.getOpenId());
return aflOrderInfoVo;
}

Loading…
Cancel
Save