|
@@ -98,7 +98,7 @@ public class WxPayServiceImpl implements WxPayServiceI {
|
98
|
98
|
HfWxConfig config = new HfWxConfig();
|
99
|
99
|
WXPay wxpay = new WXPay(config);
|
100
|
100
|
|
101
|
|
- Map<String, Object> orderPriceAndNotifyUrl = getOrderPriceAndNotifyUrl(type, orderNo);
|
|
101
|
+ Map<String, Object> orderPriceAndNotifyUrl = getOrderPriceAndNotifyUrl(type, orderNo, "wx");
|
102
|
102
|
|
103
|
103
|
String typeName = Constant.PAY_TYPE_BILL.equals(type) ? "物业缴费" : Constant.PAY_TYPE_CAR.equals(type) ? "车缴费" : "缴费";
|
104
|
104
|
|
|
@@ -146,11 +146,12 @@ public class WxPayServiceImpl implements WxPayServiceI {
|
146
|
146
|
* 根据订单类型获取 金额 和 回调地址
|
147
|
147
|
* @param type
|
148
|
148
|
* @param orderNo
|
|
149
|
+ * @param notifyType wx 微信, ali 支付宝
|
149
|
150
|
* @return
|
150
|
151
|
* @throws Exception
|
151
|
152
|
*/
|
152
|
153
|
@Override
|
153
|
|
- public Map<String,Object> getOrderPriceAndNotifyUrl(String type, String orderNo) throws Exception {
|
|
154
|
+ public Map<String,Object> getOrderPriceAndNotifyUrl(String type, String orderNo, String notifyType) throws Exception {
|
154
|
155
|
Map<String,Object> orderMap = Maps.newHashMap();
|
155
|
156
|
|
156
|
157
|
// 物业缴费
|
|
@@ -170,7 +171,7 @@ public class WxPayServiceImpl implements WxPayServiceI {
|
170
|
171
|
Long payPrice = billOrderList.stream().mapToLong(e -> tpBillInvoiceMapper.selectByPrimaryKey(e.getTpBillInvoiceId()).getPayPrice()).sum();
|
171
|
172
|
orderMap.put("orderNo", orderNo);
|
172
|
173
|
orderMap.put("payPrice", String.valueOf(payPrice));
|
173
|
|
- orderMap.put("notifyUrl", payNotifyPerproties.getWxBillNotify());
|
|
174
|
+ orderMap.put("notifyUrl", "wx".equals(notifyType) ? payNotifyPerproties.getWxBillNotify() : payNotifyPerproties.getAliBillNotify());
|
174
|
175
|
|
175
|
176
|
} else if (Constant.PAY_TYPE_CAR.equals(type)) { // 车缴费
|
176
|
177
|
List<TaUserLicenseOrder> userLicenseOrders = taUserLicenseOrderMapper.selectByOrderNumber(orderNo);
|
|
@@ -188,7 +189,7 @@ public class WxPayServiceImpl implements WxPayServiceI {
|
188
|
189
|
Long payPrice = userLicenseOrders.stream().map(e -> Long.parseLong(e.getExtensionPrice())).count();
|
189
|
190
|
orderMap.put("orderNo", orderNo);
|
190
|
191
|
orderMap.put("payPrice", String.valueOf(payPrice));
|
191
|
|
- orderMap.put("notifyUrl", payNotifyPerproties.getWxCarNotify());
|
|
192
|
+ orderMap.put("notifyUrl", "wx".equals(notifyType) ? payNotifyPerproties.getWxCarNotify() : payNotifyPerproties.getAliCarNotify());
|
192
|
193
|
}
|
193
|
194
|
|
194
|
195
|
return orderMap;
|