提现黑名单用户转入人工审核,并打上标记
This commit is contained in:
parent
f71ade8129
commit
e1a652f496
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.sqx.modules.app.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提现黑名单表
|
||||||
|
* @author tankaikai
|
||||||
|
* @since 2025-01-07 12:56
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value ="tb_withdraw_blacklist")
|
||||||
|
public class TbWithdrawBlacklist implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type=IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
private String realName;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,7 @@ import com.sqx.modules.app.entity.TbUserBlacklist;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付宝黑名单 Mapper
|
* 实名认证黑名单 Mapper
|
||||||
* @author tankaikai
|
* @author tankaikai
|
||||||
* @since 2025-01-07 12:56
|
* @since 2025-01-07 12:56
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.sqx.modules.app.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.sqx.modules.app.entity.TbWithdrawBlacklist;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提现黑名单 Mapper
|
||||||
|
* @author tankaikai
|
||||||
|
* @since 2025-01-07 12:56
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface TbWithdrawBlacklistMapper extends BaseMapper<TbWithdrawBlacklist> {
|
||||||
|
}
|
||||||
|
|
@ -19,6 +19,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.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;
|
||||||
import com.sqx.modules.app.service.UserMoneyService;
|
import com.sqx.modules.app.service.UserMoneyService;
|
||||||
|
|
@ -57,6 +58,7 @@ import weixin.popular.bean.message.templatemessage.TemplateMessageItem;
|
||||||
import weixin.popular.bean.message.templatemessage.TemplateMessageResult;
|
import weixin.popular.bean.message.templatemessage.TemplateMessageResult;
|
||||||
import weixin.popular.support.TokenManager;
|
import weixin.popular.support.TokenManager;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.websocket.SendResult;
|
import javax.websocket.SendResult;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
|
@ -109,6 +111,8 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private WuyouPay wuyouPay;
|
private WuyouPay wuyouPay;
|
||||||
|
@Resource
|
||||||
|
private TbWithdrawBlacklistMapper tbWithdrawBlacklistMapper;
|
||||||
|
|
||||||
public CashOutServiceImpl(UserInfoService userInfoService) {
|
public CashOutServiceImpl(UserInfoService userInfoService) {
|
||||||
this.userInfoService = userInfoService;
|
this.userInfoService = userInfoService;
|
||||||
|
|
@ -498,7 +502,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
||||||
|
|
||||||
String alipayAccount;
|
String alipayAccount;
|
||||||
String alipayName;
|
String alipayName;
|
||||||
|
Set<String> withdrawCheckNameSet = new HashSet<>();
|
||||||
if (isSys) {
|
if (isSys) {
|
||||||
SysUserEntity sysUserEntity = sysUserService.getById(userId);
|
SysUserEntity sysUserEntity = sysUserService.getById(userId);
|
||||||
Msg msg1 = msgDao.findByPhoneAndCode(sysUserEntity.getMobile(), msg);
|
Msg msg1 = msgDao.findByPhoneAndCode(sysUserEntity.getMobile(), msg);
|
||||||
|
|
@ -510,6 +514,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
||||||
}
|
}
|
||||||
alipayAccount = sysUserEntity.getZhiFuBao();
|
alipayAccount = sysUserEntity.getZhiFuBao();
|
||||||
alipayName = sysUserEntity.getZhiFuBaoName();
|
alipayName = sysUserEntity.getZhiFuBaoName();
|
||||||
|
withdrawCheckNameSet.add(alipayName);
|
||||||
} else {
|
} else {
|
||||||
UserEntity userInfo = userService.queryByUserId(userId);
|
UserEntity userInfo = userService.queryByUserId(userId);
|
||||||
if (userInfo.getStatus().equals(0)) {
|
if (userInfo.getStatus().equals(0)) {
|
||||||
|
|
@ -529,6 +534,9 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
||||||
}
|
}
|
||||||
alipayAccount = userInfo.getZhiFuBao();
|
alipayAccount = userInfo.getZhiFuBao();
|
||||||
alipayName = userInfo.getZhiFuBaoName();
|
alipayName = userInfo.getZhiFuBaoName();
|
||||||
|
String certName = userDetailInfo.getCertName();
|
||||||
|
withdrawCheckNameSet.add(alipayName);
|
||||||
|
withdrawCheckNameSet.add(certName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 最低提现金额
|
// 最低提现金额
|
||||||
|
|
@ -612,6 +620,13 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
||||||
if (userMoney.getAmount().doubleValue() < money) {
|
if (userMoney.getAmount().doubleValue() < money) {
|
||||||
return Result.success("可提现余额不足!");
|
return Result.success("可提现余额不足!");
|
||||||
}
|
}
|
||||||
|
// 禁止该姓名的用户提现
|
||||||
|
Integer count = tbWithdrawBlacklistMapper.selectCount(Wrappers.<TbWithdrawBlacklist>lambdaQuery().in(TbWithdrawBlacklist::getRealName, withdrawCheckNameSet));
|
||||||
|
if(count > 0){
|
||||||
|
userMoneyDetails.setContent("成功提现:" + money);
|
||||||
|
cashOut.setState(3);
|
||||||
|
cashOut.setRelationId("提现黑名单用户,请谨慎审核!");
|
||||||
|
}else{
|
||||||
if (wuyouPay.checkCanCash(userId, WithdrawTypeEnum.MANUAL, new BigDecimal(money.toString()))) {
|
if (wuyouPay.checkCanCash(userId, WithdrawTypeEnum.MANUAL, new BigDecimal(money.toString()))) {
|
||||||
cashOut.setStatus(4);
|
cashOut.setStatus(4);
|
||||||
BaseResp baseResp = wuyouPay.extractOrder(outOrderNo, cashOut.getUserId(), true, cashOut.getMoney(), cashOut.getZhifubao(), cashOut.getZhifubaoName());
|
BaseResp baseResp = wuyouPay.extractOrder(outOrderNo, cashOut.getUserId(), true, cashOut.getMoney(), cashOut.getZhifubao(), cashOut.getZhifubaoName());
|
||||||
|
|
@ -628,6 +643,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
||||||
userMoneyDetails.setContent("成功提现:" + money);
|
userMoneyDetails.setContent("成功提现:" + money);
|
||||||
cashOut.setState(3);
|
cashOut.setState(3);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
userMoneyDetailsService.save(userMoneyDetails);
|
userMoneyDetailsService.save(userMoneyDetails);
|
||||||
baseMapper.insert(cashOut);
|
baseMapper.insert(cashOut);
|
||||||
userMoneyService.updateAmount(2, userId, money);
|
userMoneyService.updateAmount(2, userId, money);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue