he2802 4 سال پیش
والد
کامیت
854b71fc9f
1فایلهای تغییر یافته به همراه1 افزوده شده و 5 حذف شده
  1. 1 5
      zhongzheng-system/src/main/java/com/zhongzheng/modules/wx/service/impl/WxPayServiceImpl.java

+ 1 - 5
zhongzheng-system/src/main/java/com/zhongzheng/modules/wx/service/impl/WxPayServiceImpl.java

@@ -171,15 +171,11 @@ public class WxPayServiceImpl  implements IWxPayService {
             BigDecimal unit = new BigDecimal(100);
             price = price.multiply(unit);
             Map<String, String> data = new HashMap<String, String>();
-            if(price==null){
-                throw new CustomException("金额错误"+price);
-            }
-    //        data.put("attach", "pay");
             data.put("body", body);
             data.put("out_trade_no", out_trade_no);
             data.put("device_info", "");
             data.put("fee_type", "CNY");
-            data.put("total_fee", price.toString());
+            data.put("total_fee", price.intValue()+"");
             data.put("openid", openid);
             data.put("spbill_create_ip", IpUtils.getIpAddr(ServletUtils.getRequest()));
             data.put("notify_url", notifyUrl);