Эх сурвалжийг харах

Merge branch 'dev' into 'mp-server-test'

提现

See merge request quanshu/mp-server!1069
Evan 2 жил өмнө
parent
commit
feaf86d4ec

+ 8 - 1
mp-service/src/main/java/com/qs/mp/channel/service/impl/ChannelWithdrawServiceImpl.java

@@ -72,6 +72,9 @@ public class ChannelWithdrawServiceImpl extends ServiceImpl<ChannelWithdrawMappe
   @Value("${ys-pay.withdraw-notify-url}")
   private String ysWithdrawNotifyUrl;
 
+  @Value(value = "${server.env}")
+  private String env;
+
   @Autowired
   private IYsCallLogService ysCallLogService;
 
@@ -196,7 +199,11 @@ public class ChannelWithdrawServiceImpl extends ServiceImpl<ChannelWithdrawMappe
       //暂时只支持币种:CNY(人民币)
       bizContent.put("currency", "CNY");
       //提现的总金额。单位为:RMB Yuan。取值范围为[0.01,99999999.99],精确到小数点后两位。Number(10,2)指10位长度,2位精度
-      bizContent.put("total_amount", new BigDecimal(withdraw.getMoney()).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP).toString());
+      if ("prod".equals(env)) {
+        bizContent.put("total_amount", new BigDecimal(withdraw.getMoney()).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP).toString());
+      } else {
+        bizContent.put("total_amount", "1.00");
+      }
       //订单说明
       bizContent.put("subject", "提现");
       //商户日期(该参数做交易与查询时需要一致) 该日期需在当日的前后一天时间范围之内