增加黑名单提现限制

This commit is contained in:
Tankaikai
2025-03-06 13:28:17 +08:00
parent c4bfce19f4
commit 6a2b51a585
2 changed files with 13 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ import com.sqx.common.utils.Result;
import com.sqx.modules.app.dao.MsgDao; import com.sqx.modules.app.dao.MsgDao;
import com.sqx.modules.app.dao.UserDao; import com.sqx.modules.app.dao.UserDao;
import com.sqx.modules.app.entity.*; 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.mapper.TbWithdrawBlacklistMapper;
import com.sqx.modules.app.service.UserInfoService; import com.sqx.modules.app.service.UserInfoService;
import com.sqx.modules.app.service.UserMoneyDetailsService; import com.sqx.modules.app.service.UserMoneyDetailsService;
@@ -118,6 +119,8 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
private WuyouPay wuyouPay; private WuyouPay wuyouPay;
@Resource @Resource
private TbWithdrawBlacklistMapper tbWithdrawBlacklistMapper; private TbWithdrawBlacklistMapper tbWithdrawBlacklistMapper;
@Resource
private TbUserBlacklistMapper tbUserBlacklistMapper;
public CashOutServiceImpl(UserInfoService userInfoService) { public CashOutServiceImpl(UserInfoService userInfoService) {
this.userInfoService = userInfoService; this.userInfoService = userInfoService;
@@ -538,6 +541,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
String alipayAccount; String alipayAccount;
String alipayName; String alipayName;
String bankName; String bankName;
String idCardNo = null;
Set<String> withdrawCheckNameSet = new HashSet<>(); Set<String> withdrawCheckNameSet = new HashSet<>();
if (isSys) { if (isSys) {
SysUserEntity sysUserEntity = sysUserService.getById(userId); SysUserEntity sysUserEntity = sysUserService.getById(userId);
@@ -584,6 +588,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
alipayName = userDetailInfo.getCertName(); alipayName = userDetailInfo.getCertName();
} }
bankName = userDetailInfo.getBankName(); bankName = userDetailInfo.getBankName();
idCardNo = userDetailInfo.getCertNo();
withdrawCheckNameSet.add(alipayName); 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)); 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); userMoneyDetails.setContent("提现=" + money);
cashOut.setState(3); cashOut.setState(3);
cashOut.setRelationId("提现黑名单用户,请谨慎审核!"); cashOut.setRelationId("提现黑名单用户,请谨慎审核!");

View File

@@ -105,7 +105,7 @@ public class WuyouPay {
CommonInfo cashLimit = commonInfoService.findOne(922); CommonInfo cashLimit = commonInfoService.findOne(922);
if (cashLimit == null || StrUtil.isBlank(cashLimit.getValue())) { if (cashLimit == null || StrUtil.isBlank(cashLimit.getValue())) {
logger.warn("提现必要参数未配置,请联系管理员"); logger.warn("提现必要参数未配置,请联系管理员");
throw new ValidateException("【922】每日现次数上限未配置"); throw new ValidateException("【922】每日现次数上限未配置");
} }
if (successCashCount >= Integer.parseInt(cashLimit.getValue())) { if (successCashCount >= Integer.parseInt(cashLimit.getValue())) {