|
@@ -14,7 +14,9 @@ import org.slf4j.LoggerFactory;
|
14
|
14
|
import org.springframework.beans.factory.annotation.Autowired;
|
15
|
15
|
import org.springframework.stereotype.Service;
|
16
|
16
|
|
|
17
|
+import java.text.SimpleDateFormat;
|
17
|
18
|
import java.time.Instant;
|
|
19
|
+import java.util.Date;
|
18
|
20
|
import java.util.HashMap;
|
19
|
21
|
import java.util.Map;
|
20
|
22
|
|
|
@@ -43,11 +45,11 @@ public class WxPayServiceImpl implements WxPayServiceI {
|
43
|
45
|
|
44
|
46
|
//获取支付金额
|
45
|
47
|
TpBillInvoice tpBillInvoice = tpBillInvoiceMapper.selectByIdAndUserId(billInvoiceId,userElement.getId(),userElement.getCommunityId());
|
46
|
|
-
|
47
|
48
|
if (null == tpBillInvoice){
|
48
|
49
|
throw new Exception("订单不存在");
|
49
|
50
|
}
|
50
|
51
|
|
|
52
|
+ //下单
|
51
|
53
|
Map<String, String> data = new HashMap<String, String>();
|
52
|
54
|
data.put("body", "支付测试");
|
53
|
55
|
//商品号唯一
|
|
@@ -89,7 +91,7 @@ public class WxPayServiceImpl implements WxPayServiceI {
|
89
|
91
|
WXPay wxpay = new WXPay(config);
|
90
|
92
|
|
91
|
93
|
Map<String, String> data = new HashMap<String, String>();
|
92
|
|
- data.put("bill_date", "20190219");
|
|
94
|
+ data.put("bill_date", new SimpleDateFormat("yyyyMMdd").format(new Date()));
|
93
|
95
|
data.put("bill_type", "ALL");
|
94
|
96
|
return wxpay.downloadBill(data);
|
95
|
97
|
}
|