提现回调 数据不存在时 的处理
This commit is contained in:
parent
8fa1b7005e
commit
9f6172b95c
|
|
@ -302,6 +302,8 @@ public class WuyouController {
|
|||
CashOut cashOut = cashOutDao.selectOne(orderNumber);
|
||||
if (cashOut != null) {
|
||||
wuyouCallbackService.executeExtractCallback(cashOut, notifyDto);
|
||||
} else {
|
||||
wuyouCallbackService.cashElse(orderNo, userId, notifyDto.getTotal(), notifyDto.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,4 +14,6 @@ public interface WuyouCallbackService {
|
|||
void executeExtractCallback(CashOut cashOut, NotifyDto notifyDto);
|
||||
|
||||
int executeExtractCallback(CashOut cashOut, int status, String reason);
|
||||
|
||||
void cashElse(String orderNo, Long userId, Double money, String msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@ package com.sqx.modules.pay.service.impl;
|
|||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.sqx.modules.app.entity.UserInfo;
|
||||
import com.sqx.modules.app.entity.UserMoney;
|
||||
import com.sqx.modules.app.entity.UserMoneyDetails;
|
||||
import com.sqx.modules.app.service.UserInfoService;
|
||||
import com.sqx.modules.app.service.UserMoneyDetailsService;
|
||||
import com.sqx.modules.app.service.UserMoneyService;
|
||||
import com.sqx.modules.pay.dao.CashOutDao;
|
||||
|
|
@ -35,6 +37,8 @@ public class WuyouCallbackServiceImpl implements WuyouCallbackService {
|
|||
private UserMoneyDetailsService userMoneyDetailsService;
|
||||
@Autowired
|
||||
private SysUserMoneyDetailsService sysUserMoneyDetailsService;
|
||||
@Autowired
|
||||
private UserInfoService userInfoService;
|
||||
|
||||
@Resource
|
||||
private CashOutDao cashOutDao;
|
||||
|
|
@ -154,4 +158,17 @@ public class WuyouCallbackServiceImpl implements WuyouCallbackService {
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cashElse(String orderNo, Long userId, Double money, String msg) {
|
||||
CashOut cashOut = new CashOut();
|
||||
cashOut.setUserId(userId);
|
||||
cashOut.setOrderNumber(orderNo);
|
||||
cashOut.setMoney(money.toString());
|
||||
cashOut.setRelationId(msg);
|
||||
cashOut.setState(9);
|
||||
UserInfo userInfo = userInfoService.getByUserId(userId);
|
||||
cashOut.setZhifubaoName(userInfo.getCertName());
|
||||
cashOutDao.insert(cashOut);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue