Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
wangw 2025-10-29 18:25:02 +08:00
commit 656ef5165b
4 changed files with 7 additions and 3 deletions

View File

@ -80,8 +80,9 @@ public class NotifyController {
log.info("参数信息: {}", jsonObject.toJSONString());
String outBillNo = jsonObject.getString("out_bill_no");
String state = jsonObject.getString("state");
String failReason = jsonObject.getString("fail_reason");
try {
distributionUserService.withdrawNotify(outBillNo, state);
distributionUserService.withdrawNotify(outBillNo, state, failReason);
}catch (Exception e) {
log.warn("转账回调失败", e);
}

View File

@ -80,6 +80,8 @@ public class MkDistributionWithdrawFlow implements Serializable {
private String status;
private String failReason;
}

View File

@ -144,5 +144,5 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
* CANCELING 撤销中
* CANCELLED 已撤销
*/
void withdrawNotify(String outBillNo, String state);
void withdrawNotify(String outBillNo, String state, String failReason);
}

View File

@ -693,7 +693,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
@Override
@Transactional(rollbackFor = Exception.class)
public void withdrawNotify(String outBillNo, String state) {
public void withdrawNotify(String outBillNo, String state, String failReason) {
MkDistributionWithdrawFlow flow = withdrawFlowService.getOne(new QueryWrapper().eq(MkDistributionWithdrawFlow::getBillNo, outBillNo));
AssertUtil.isNull(flow, "提现记录不存在");
switch (state) {
@ -709,6 +709,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
break;
}
flow.setFailReason(failReason);
withdrawFlowService.updateById(flow);
}
}