Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -159,8 +159,6 @@ public abstract class BaseWx {
|
||||
}
|
||||
|
||||
public JSONObject verifySignature(HttpServletRequest request) {
|
||||
|
||||
|
||||
try {
|
||||
log.info("开始校验签名并解密");
|
||||
String timestamp = request.getHeader("Wechatpay-Timestamp");
|
||||
|
||||
@@ -671,7 +671,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
|
||||
JSONObject jsonObject = appWxService.transferBalance(userInfo.getWechatOpenId(), userInfo.getRealName(), finalAmount, "提现", withdrawFlow.getBillNo());
|
||||
withdrawFlow.setPackageInfo(jsonObject.getString("package_info"));
|
||||
// 扣减余额
|
||||
userInfoService.updateDistributionAmount(userId, withdrawFlow.getAmount().negate());
|
||||
userInfoService.updateDistributionAmount(userId, withdrawFlowDTO.getAmount().negate());
|
||||
return withdrawFlowService.save(withdrawFlow);
|
||||
}
|
||||
|
||||
@@ -687,4 +687,24 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
|
||||
"package", flow.getPackageInfo()
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void withdrawNotify(String outBillNo, String state) {
|
||||
MkDistributionWithdrawFlow flow = withdrawFlowService.getOne(new QueryWrapper().eq(MkDistributionWithdrawFlow::getBillNo, outBillNo));
|
||||
AssertUtil.isNull(flow, "提现记录不存在");
|
||||
switch (state) {
|
||||
case "SUCCESS":
|
||||
flow.setStatus(TableValueConstant.DistributionWithdrawFlow.Status.FINISH.getCode());
|
||||
break;
|
||||
case "FAIL":
|
||||
flow.setStatus(TableValueConstant.DistributionWithdrawFlow.Status.FAIL.getCode());
|
||||
case "CANCELLED":
|
||||
flow.setStatus(TableValueConstant.DistributionWithdrawFlow.Status.FAIL.getCode());
|
||||
// 扣减余额
|
||||
userInfoService.updateDistributionAmount(flow.getUserId(), flow.getAmount().add(flow.getServiceFee()));
|
||||
break;
|
||||
|
||||
}
|
||||
withdrawFlowService.updateById(flow);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user