wuxw 3 lat temu
rodzic
commit
b744c6e6a9

+ 11 - 2
service-acct/src/main/java/com/java110/acct/cmd/payment/UnifiedPaymentCmd.java

@@ -103,9 +103,18 @@ public class UnifiedPaymentCmd extends Cmd{
 
         String env = MappingCache.getValue("HC_ENV");
 
-        // 3.0 如果支付金额为0 直接调用 支付完通知接口
         // 这里 演示环境不向微信下单
-        if (paymentOrderDto.getMoney() <= 0 || "DEV".equals(env) || "TEST".equals(env)) {
+        if ("DEV".equals(env) || "TEST".equals(env)) {
+            paymentBusiness.notifyPayment(paymentOrderDto,reqJson);
+            JSONObject param = new JSONObject();
+            param.put("code", "100");
+            param.put("msg", "演示环境不触发支付");
+            context.setResponseEntity(new ResponseEntity(JSONObject.toJSONString(param), HttpStatus.OK));
+            return ;
+        }
+
+        // 3.0 如果支付金额为0 直接调用 支付完通知接口
+        if (paymentOrderDto.getMoney() <= 0) {
             paymentBusiness.notifyPayment(paymentOrderDto,reqJson);
             JSONObject param = new JSONObject();
             param.put("code", "100");