Evan 2 년 전
부모
커밋
e768006f13
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      mp-service/src/main/java/com/qs/mp/channel/service/impl/ChannelWithdrawServiceImpl.java

+ 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", "提现");
       //商户日期(该参数做交易与查询时需要一致) 该日期需在当日的前后一天时间范围之内