提现黑名单用户转入人工审核,并打上标记
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;
|
||||
|
||||
/**
|
||||
* 支付宝黑名单 Mapper
|
||||
* 实名认证黑名单 Mapper
|
||||
* @author tankaikai
|
||||
* @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.UserDao;
|
||||
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.UserMoneyDetailsService;
|
||||
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.support.TokenManager;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.websocket.SendResult;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
|
@ -109,6 +111,8 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
|
||||
@Autowired
|
||||
private WuyouPay wuyouPay;
|
||||
@Resource
|
||||
private TbWithdrawBlacklistMapper tbWithdrawBlacklistMapper;
|
||||
|
||||
public CashOutServiceImpl(UserInfoService userInfoService) {
|
||||
this.userInfoService = userInfoService;
|
||||
|
|
@ -498,7 +502,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
|
||||
String alipayAccount;
|
||||
String alipayName;
|
||||
|
||||
Set<String> withdrawCheckNameSet = new HashSet<>();
|
||||
if (isSys) {
|
||||
SysUserEntity sysUserEntity = sysUserService.getById(userId);
|
||||
Msg msg1 = msgDao.findByPhoneAndCode(sysUserEntity.getMobile(), msg);
|
||||
|
|
@ -510,6 +514,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
}
|
||||
alipayAccount = sysUserEntity.getZhiFuBao();
|
||||
alipayName = sysUserEntity.getZhiFuBaoName();
|
||||
withdrawCheckNameSet.add(alipayName);
|
||||
} else {
|
||||
UserEntity userInfo = userService.queryByUserId(userId);
|
||||
if (userInfo.getStatus().equals(0)) {
|
||||
|
|
@ -529,6 +534,9 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
}
|
||||
alipayAccount = userInfo.getZhiFuBao();
|
||||
alipayName = userInfo.getZhiFuBaoName();
|
||||
String certName = userDetailInfo.getCertName();
|
||||
withdrawCheckNameSet.add(alipayName);
|
||||
withdrawCheckNameSet.add(certName);
|
||||
}
|
||||
|
||||
// 最低提现金额
|
||||
|
|
@ -612,21 +620,29 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
if (userMoney.getAmount().doubleValue() < money) {
|
||||
return Result.success("可提现余额不足!");
|
||||
}
|
||||
if (wuyouPay.checkCanCash(userId, WithdrawTypeEnum.MANUAL, new BigDecimal(money.toString()))) {
|
||||
cashOut.setStatus(4);
|
||||
BaseResp baseResp = wuyouPay.extractOrder(outOrderNo, cashOut.getUserId(), true, cashOut.getMoney(), cashOut.getZhifubao(), cashOut.getZhifubaoName());
|
||||
if (baseResp.getStatus() != null && (baseResp.getStatus().equals(2) || baseResp.getStatus().equals(10000))) {
|
||||
userMoneyDetails.setContent("成功提现:" + money);
|
||||
cashOut.setState(1);
|
||||
cashOut.setOutAt(DateUtil.date().toString());
|
||||
}
|
||||
|
||||
if (baseResp.getErrorMsg() != null) {
|
||||
return Result.error(baseResp.getErrorMsg());
|
||||
}
|
||||
} else {
|
||||
// 禁止该姓名的用户提现
|
||||
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()))) {
|
||||
cashOut.setStatus(4);
|
||||
BaseResp baseResp = wuyouPay.extractOrder(outOrderNo, cashOut.getUserId(), true, cashOut.getMoney(), cashOut.getZhifubao(), cashOut.getZhifubaoName());
|
||||
if (baseResp.getStatus() != null && (baseResp.getStatus().equals(2) || baseResp.getStatus().equals(10000))) {
|
||||
userMoneyDetails.setContent("成功提现:" + money);
|
||||
cashOut.setState(1);
|
||||
cashOut.setOutAt(DateUtil.date().toString());
|
||||
}
|
||||
|
||||
if (baseResp.getErrorMsg() != null) {
|
||||
return Result.error(baseResp.getErrorMsg());
|
||||
}
|
||||
} else {
|
||||
userMoneyDetails.setContent("成功提现:" + money);
|
||||
cashOut.setState(3);
|
||||
}
|
||||
}
|
||||
userMoneyDetailsService.save(userMoneyDetails);
|
||||
baseMapper.insert(cashOut);
|
||||
|
|
|
|||
Loading…
Reference in New Issue