敏感数据脱敏
This commit is contained in:
parent
8d12ce9ae5
commit
e5e7962cc3
|
|
@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil;
|
|||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.exceptions.ValidateException;
|
||||
import cn.hutool.core.lang.Validator;
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
|
@ -17,6 +18,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.sqx.common.exception.SqxException;
|
||||
import com.sqx.common.utils.DesensitizedUtil;
|
||||
import com.sqx.common.utils.PageUtils;
|
||||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.modules.app.dao.MsgDao;
|
||||
|
|
@ -171,10 +173,22 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
item.setVerifyCount(info2.getCount());
|
||||
item.setVerifyTotal(info2.getTotal());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (isApp) {
|
||||
for (CashOut item : cashOutList) {
|
||||
if (StrUtil.isNotBlank(item.getBankName())) {
|
||||
String bankCardNo = DesensitizedUtil.bankCard(item.getZhifubao());
|
||||
item.setZhifubao(bankCardNo);
|
||||
} else if (Validator.isEmail(item.getZhifubao())) {
|
||||
String email = DesensitizedUtil.email(item.getZhifubao());
|
||||
item.setZhifubao(email);
|
||||
} else if (Validator.isMobile(item.getZhifubao())) {
|
||||
String mobilePhone = DesensitizedUtil.mobilePhone(item.getZhifubao());
|
||||
item.setZhifubao(mobilePhone);
|
||||
}
|
||||
}
|
||||
}
|
||||
return PageUtils.page(new PageInfo<>(cashOutList));
|
||||
}
|
||||
|
||||
|
|
@ -617,9 +631,9 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
if (baseResp.getErrorMsg() != null) {
|
||||
return Result.error(baseResp.getErrorMsg());
|
||||
}
|
||||
}catch (SqxException e){
|
||||
} catch (SqxException e) {
|
||||
return Result.error(e.getMsg());
|
||||
}catch (ValidateException v){
|
||||
} catch (ValidateException v) {
|
||||
sysUserMoneyDetails.setContent("提现:" + money);
|
||||
cashOut.setState(3);
|
||||
cashOut.setRelationId(v.getMessage());
|
||||
|
|
@ -663,9 +677,9 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
if (baseResp.getErrorMsg() != null) {
|
||||
return Result.error(baseResp.getErrorMsg());
|
||||
}
|
||||
}catch (SqxException e){
|
||||
} catch (SqxException e) {
|
||||
return Result.error(e.getMsg());
|
||||
}catch (ValidateException v){
|
||||
} catch (ValidateException v) {
|
||||
userMoneyDetails.setContent("提现:" + money);
|
||||
cashOut.setState(3);
|
||||
cashOut.setRelationId(v.getMessage());
|
||||
|
|
@ -897,7 +911,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
data.put("count", count);
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
data.put("list", list);
|
||||
List<CashOut> cashOutList = cashOutDao.selectList(Wrappers.<CashOut>lambdaQuery().eq(CashOut::getState,1).eq(CashOut::getZhifubaoName, alipayAccountName));
|
||||
List<CashOut> cashOutList = cashOutDao.selectList(Wrappers.<CashOut>lambdaQuery().eq(CashOut::getState, 1).eq(CashOut::getZhifubaoName, alipayAccountName));
|
||||
if (CollUtil.isEmpty(cashOutList)) {
|
||||
return data;
|
||||
}
|
||||
|
|
@ -905,7 +919,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
for (Map.Entry<Long, List<CashOut>> entry : collect.entrySet()) {
|
||||
Long k = entry.getKey();
|
||||
List<CashOut> v = entry.getValue();
|
||||
BigDecimal subSum = v.stream().map(obj->Convert.toBigDecimal(obj.getMoney())).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
BigDecimal subSum = v.stream().map(obj -> Convert.toBigDecimal(obj.getMoney())).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
Map<String, Object> record = new HashMap<>();
|
||||
record.put("userId", k);
|
||||
record.put("userName", "未知");
|
||||
|
|
@ -914,7 +928,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
record.put("zhiFuBaoName", v.stream().map(CashOut::getZhifubaoName).distinct().collect(Collectors.joining(" / ")));
|
||||
record.put("zhiFuBao", v.stream().map(CashOut::getZhifubao).distinct().collect(Collectors.joining(" / ")));
|
||||
UserEntity entity = userDao.selectById(k);
|
||||
if(entity!=null){
|
||||
if (entity != null) {
|
||||
record.put("userId", entity.getUserId());
|
||||
record.put("userName", entity.getUserName());
|
||||
record.put("inviterCode", entity.getInviterCode());
|
||||
|
|
|
|||
Loading…
Reference in New Issue