新增了回调的逻辑判断

This commit is contained in:
1215525055@qq.com 2025-04-24 19:14:48 +08:00
parent 8b3302f518
commit e00d783729
2 changed files with 19 additions and 5 deletions

View File

@ -8,6 +8,7 @@ import cn.com.tenlion.operator.service.user.expand.UserExpandServiceImpl;
import cn.com.tenlion.operator.util.EncryptUtil;
import com.alibaba.fastjson.JSONObject;
import ink.wgink.annotation.CheckRequestBodyAnnotation;
import ink.wgink.common.advice.ResponseAdvice;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.common.component.SecurityComponent;
import ink.wgink.exceptions.SaveException;

View File

@ -182,6 +182,7 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
}
params.put("rechargeRemark", rechargeRemark);
accountRechargeDao.updateRemark(params);
AccountRechargeDTO dto = accountRechargeDao.get(params);
if (StringUtils.isEmpty(po.getAccountItemId()) && po.getReconciliationStatus().equals("0")) {
// 1. 生成流水记录
AccountItemVO vo = new AccountItemVO();
@ -193,8 +194,14 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
String accountItemId = iAccountItemService.saveReturnId(vo);
// 2. 修改状态为2
updateCheck(po.getAccountRechargeId(), RechargeCheckEnum.RECHARGE_SUCCESS, rechargeRemark, accountItemId, "", DateUtil.getTime());
// 3.通知到账
sysCallbackService.save("项目充值到账", systemApiPathProperties.getCopyright() + "api/pay/recharge-success/user-id/" + po.getAccountId(), null);
// 套餐包购买的不通知
if(StringUtils.isEmpty(dto.getPackageInfoId())) {
// 3. 平台通知到账
JSONObject jsonobject =new JSONObject();
jsonobject.put("money", po.getRechargeMoney());
sysCallbackService.save("对公充值到账", systemApiPathProperties.getCopyright() + "api/pay/recharge-success/user-id/" + po.getAccountId(), jsonobject);
}
}
}
@ -666,7 +673,7 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
public synchronized void saveConfirmOnline(String id, String orderId, String successTime) {
AccountRechargeDTO dto = get(id);
if (StringUtils.isEmpty(dto.getAccountItemId()) &&
dto.getReconciliationStatus().equals(ReconciliationStatusEnum.UN_RECONCILIATION.getValue())) {
dto.getReconciliationStatus().equals(ReconciliationStatusEnum.UN_RECONCILIATION.getValue())) {
// 1. 生成流水记录
AccountItemVO vo = new AccountItemVO();
vo.setType(1);
@ -677,8 +684,14 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
String accountItemId = iAccountItemService.saveReturnId(vo);
// 2. 修改状态为2
updateCheck(dto.getAccountRechargeId(), RechargeCheckEnum.RECHARGE_SUCCESS, "线上充值", accountItemId, orderId, successTime);
// 3. 调用第三方接口, 告知充值到账
sysCallbackService.save("项目充值到账", systemApiPathProperties.getCopyright() + "api/pay/recharge-success/user-id/" + dto.getAccountId(), null);
// 套餐包购买的不通知
if(StringUtils.isEmpty(dto.getPackageInfoId())) {
// 3. 平台通知到账
JSONObject jsonobject =new JSONObject();
jsonobject.put("money", dto.getRechargeMoney());
sysCallbackService.save("对公充值到账", systemApiPathProperties.getCopyright() + "api/pay/recharge-success/user-id/" + dto.getAccountId(), jsonobject);
}
}
}