提现防止多次
This commit is contained in:
@ -93,6 +93,7 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode DIVIDE_NOT_EXISTS = new ErrorCode(1_007_902_001, "分账单不存在");
|
||||
ErrorCode ORDER_NOT_COMPLETE = new ErrorCode(1_007_902_002, "还有订单尚未结算");
|
||||
ErrorCode WX_ACCOUNT_NO = new ErrorCode(1_007_902_002, "微信充值金额不足");
|
||||
ErrorCode REFUND_NOT_COMPLETE = new ErrorCode(1_007_902_002, "还有退款正在进行");
|
||||
|
||||
|
||||
ErrorCode DIVIDE_COMPANY_NOT_EXISTS = new ErrorCode(1_007_903_001, "分账公司不存在");
|
||||
|
@ -412,6 +412,14 @@ public class WxProfitsharingServiceImpl implements WxProfitsharingService {
|
||||
throw new ServiceException(ORDER_NOT_COMPLETE);
|
||||
}
|
||||
|
||||
//判断用户是否正在退款
|
||||
List<WxRefundDO> refundDOList1 = wxRefundMapper.selectList(Wrappers.<WxRefundDO>lambdaQuery()
|
||||
.eq(WxRefundDO::getStatus, PayDivideRefundStatusRespEnum.PROCESSING.getStatus())
|
||||
.eq(WxRefundDO::getUserId, drawMoneyVO.getUserId()));
|
||||
if (CollectionUtil.isNotEmpty(refundDOList1)) {
|
||||
throw new ServiceException(REFUND_NOT_COMPLETE);
|
||||
}
|
||||
|
||||
//判断是否有金额可退款
|
||||
BigDecimal wxAmount = wxProfitsharingMapper.getWxAmount(drawMoneyVO.getUserId());
|
||||
if (wxAmount == null) {
|
||||
|
Reference in New Issue
Block a user