[fix]修改充值

This commit is contained in:
wangqx 2025-09-24 18:45:29 +08:00
parent 362d57869b
commit 01bdbbb102
2 changed files with 2 additions and 4 deletions

View File

@ -266,7 +266,7 @@ public class WechatPlugin implements Payment {
Map<String, String> attachMap = new HashMap<>();
attachMap.put("orderType", payParam.getOrderType());
attachMap.put("outOrderNo", outOrderNo);
attachMap.put("sn", outOrderNo);
String attach = URLEncoder.createDefault().encode(JSONUtil.toJsonStr(attachMap), StandardCharsets.UTF_8);
String appid = setting.getAppId();
@ -513,9 +513,7 @@ public class WechatPlugin implements Payment {
String payParamStr = jsonObject.getStr("attach");
String payParamJson = URLDecoder.decode(payParamStr, StandardCharsets.UTF_8);
PayParam payParam = JSONUtil.toBean(payParamJson, PayParam.class);
String tradeNo = jsonObject.getStr("transaction_id");
// Double totalAmount = CurrencyUtil.reversalFen(jsonObject.getJSONObject("amount").getDouble("total"));
PaymentSuccessParams paymentSuccessParams = new PaymentSuccessParams(
PaymentMethodEnum.WECHAT.getCode(),

View File

@ -118,7 +118,7 @@ public class ChargeServiceImpl extends ServiceImpl<ChargeMapper, Charge> impleme
accountBillService.addMoney(charge.getActualMoney(), charge.getMemberId(), AccountBillSourceEnum.RECHARGE, "充值");
//生成充值记录
//获取账号金额
MemberAccount memberAccount = memberAccountService.getById(charge.getMemberId());
MemberAccount memberAccount = memberAccountService.getMemberAccount(charge.getMemberId());
MqUtil.sendIMMessage(buildMessage(charge,memberAccount));
}