2
0

feat: 套餐金额

This commit is contained in:
caiyuchao
2025-01-22 11:50:58 +08:00
parent 575e101082
commit f7f8642401
2 changed files with 5 additions and 1 deletions

View File

@@ -415,7 +415,7 @@ public class WxPayController extends AbstractWxPayApiController {
System.out.println(returnMsg);
if (!WxPayKit.codeIsOk(returnCode)) {
// 测试用
return new AjaxResult().success("http://localhost:9201/statics/1880498021541883905/payQRCode2.png");
return new AjaxResult().success("http://192.168.9.50/img/2/payQRCode2_20250121035132A001.png");
// return new AjaxResult().addError("error:" + returnMsg);
}
String resultCode = result.get("result_code");

View File

@@ -185,6 +185,10 @@ public class UOrderServiceImpl extends ServiceImpl<UOrderMapper, UOrder> impleme
order.setUserId(SecurityUtils.getUserId());
order.setStatus(OrderStatusEnum.UNPAID.getCode());
order.setOrderNo(System.currentTimeMillis() + StrUtil.EMPTY);
if (ObjectUtil.isNotNull(order.getPackageId())) {
UPackage uPackage = packageService.getById(order.getPackageId());
order.setOrderAmount(uPackage.getPrice());
}
this.save(order);
List<UBillRule> billRules = billRuleMapper.selectList(Wrappers.lambdaQuery());
billRules.stream().findFirst().ifPresent(billRule -> {