增加黑名单提现限制
This commit is contained in:
parent
c4bfce19f4
commit
6a2b51a585
|
|
@ -24,6 +24,7 @@ import com.sqx.common.utils.Result;
|
|||
import com.sqx.modules.app.dao.MsgDao;
|
||||
import com.sqx.modules.app.dao.UserDao;
|
||||
import com.sqx.modules.app.entity.*;
|
||||
import com.sqx.modules.app.mapper.TbUserBlacklistMapper;
|
||||
import com.sqx.modules.app.mapper.TbWithdrawBlacklistMapper;
|
||||
import com.sqx.modules.app.service.UserInfoService;
|
||||
import com.sqx.modules.app.service.UserMoneyDetailsService;
|
||||
|
|
@ -118,6 +119,8 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
private WuyouPay wuyouPay;
|
||||
@Resource
|
||||
private TbWithdrawBlacklistMapper tbWithdrawBlacklistMapper;
|
||||
@Resource
|
||||
private TbUserBlacklistMapper tbUserBlacklistMapper;
|
||||
|
||||
public CashOutServiceImpl(UserInfoService userInfoService) {
|
||||
this.userInfoService = userInfoService;
|
||||
|
|
@ -538,6 +541,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
String alipayAccount;
|
||||
String alipayName;
|
||||
String bankName;
|
||||
String idCardNo = null;
|
||||
Set<String> withdrawCheckNameSet = new HashSet<>();
|
||||
if (isSys) {
|
||||
SysUserEntity sysUserEntity = sysUserService.getById(userId);
|
||||
|
|
@ -584,6 +588,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
alipayName = userDetailInfo.getCertName();
|
||||
}
|
||||
bankName = userDetailInfo.getBankName();
|
||||
idCardNo = userDetailInfo.getCertNo();
|
||||
withdrawCheckNameSet.add(alipayName);
|
||||
}
|
||||
|
||||
|
|
@ -672,7 +677,13 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
}
|
||||
// 禁止该姓名的用户提现
|
||||
Integer count = tbWithdrawBlacklistMapper.selectCount(Wrappers.<TbWithdrawBlacklist>lambdaQuery().in(TbWithdrawBlacklist::getRealName, withdrawCheckNameSet));
|
||||
if (count > 0) {
|
||||
// 禁止该身份证号的用户提现
|
||||
Integer blackUserCount = tbUserBlacklistMapper.selectCount(Wrappers.<TbUserBlacklist>lambdaQuery().eq(TbUserBlacklist::getIdCardNo, idCardNo.trim()));
|
||||
if (blackUserCount > 0) {
|
||||
userMoneyDetails.setContent("刷单用户禁止提现:" + money);
|
||||
cashOut.setState(2);
|
||||
cashOut.setOutAt(DateUtil.date().toString());
|
||||
} else if (count > 0) {
|
||||
userMoneyDetails.setContent("提现=" + money);
|
||||
cashOut.setState(3);
|
||||
cashOut.setRelationId("提现黑名单用户,请谨慎审核!");
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public class WuyouPay {
|
|||
CommonInfo cashLimit = commonInfoService.findOne(922);
|
||||
if (cashLimit == null || StrUtil.isBlank(cashLimit.getValue())) {
|
||||
logger.warn("提现必要参数未配置,请联系管理员");
|
||||
throw new ValidateException("【922】每日体现次数上限未配置");
|
||||
throw new ValidateException("【922】每日提现次数上限未配置");
|
||||
}
|
||||
|
||||
if (successCashCount >= Integer.parseInt(cashLimit.getValue())) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue