|
@@ -531,7 +531,7 @@ public class OrderServiceImpl implements OrderService {
|
|
|
if (!needUpdateStock) {
|
|
|
return;
|
|
|
}
|
|
|
- // 更新库存 TODO
|
|
|
+ // 更新库存
|
|
|
updateStock(order, "管理后台订单退款");*/
|
|
|
// updateStock(order, "管理后台订单退款");
|
|
|
|
|
@@ -1695,6 +1695,9 @@ public class OrderServiceImpl implements OrderService {
|
|
|
// e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
Map resultObj = Maps.newHashMap();
|
|
|
|
|
|
|
|
@@ -2253,14 +2256,17 @@ public class OrderServiceImpl implements OrderService {
|
|
|
}
|
|
|
|
|
|
private void wxPay(SysUserEntity user, String parCode, Map resultObj, OrderVo order, OrderProcessRecordEntity processRecordEntity, OrderWXPayRecordEntity orderWXPayRecordCurrent, StoreEntity store) throws ParseException {
|
|
|
+ R r;
|
|
|
+
|
|
|
String ip = "127.0.0.1";
|
|
|
- R r = null;
|
|
|
try {
|
|
|
- InetAddress ia = InetAddress.getLocalHost();
|
|
|
- ip = ia.getHostAddress();
|
|
|
- } catch (Exception var17) {
|
|
|
- var17.printStackTrace();
|
|
|
+ InetAddress ia=InetAddress.getLocalHost();
|
|
|
+// String localname=ia.getHostName();
|
|
|
+ ip=ia.getHostAddress();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
+
|
|
|
WechatMicropayApiResult wechatMicropayApiResult = WechatUtil
|
|
|
.wxMicropay(store.getMerchName() + "-" + store.getStoreName(), order.getOrderBizType(), null,
|
|
|
orderWXPayRecordCurrent.getOutTradeNoWX(), order.getActual_price().doubleValue(),
|
|
@@ -2298,11 +2304,12 @@ public class OrderServiceImpl implements OrderService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.LOGGER.info("wechatMicropayApiResult.getTransaction_id()" + wechatMicropayApiResult.getTransaction_id());
|
|
|
+ LOGGER.info("wechatMicropayApiResult.getTransaction_id()"+wechatMicropayApiResult.getTransaction_id());
|
|
|
+
|
|
|
Map orderRaram = Maps.newHashMap();
|
|
|
orderRaram.put("payTransactionId", wechatMicropayApiResult.getTransaction_id());
|
|
|
orderRaram.put("orderId", order.getId());
|
|
|
- this.orderDao.updateOrderInfo(orderRaram);
|
|
|
+ orderDao.updateOrderInfo(orderRaram);
|
|
|
this.confirmPay(order.getId(), Dict.payFlag.item_weixin.getItem(), orderWXPayRecordCurrent.getOutTradeNoWX());
|
|
|
|
|
|
// 设置支付单完成时间
|
|
@@ -2478,10 +2485,12 @@ public class OrderServiceImpl implements OrderService {
|
|
|
// return R.error(refundResult);
|
|
|
// }
|
|
|
// } else{
|
|
|
+ LOGGER.info("微信退款开始");
|
|
|
refundResult = wxRefund(orderInfo,totalActualPrice);
|
|
|
if(org.apache.commons.lang3.StringUtils.isNotBlank(refundResult)){
|
|
|
return R.error(refundResult);
|
|
|
}
|
|
|
+ LOGGER.info("微信退款");
|
|
|
// }
|
|
|
}
|
|
|
// 支付宝的退款代码
|
|
@@ -2673,7 +2682,7 @@ public class OrderServiceImpl implements OrderService {
|
|
|
orderInfo.setCreateTime(new Date());
|
|
|
orderInfo.setModTime(new Date());
|
|
|
orderInfo.setPayMobile(loginUser.getMobile());
|
|
|
- orderInfo.setPayTransactionId("");
|
|
|
+// orderInfo.setPayTransactionId(orderInfo.getOrder_sn());
|
|
|
orderInfo.setIsScan("0");//默认未扫描
|
|
|
|
|
|
orderInfo.setPayMobile(loginUser.getMobile());
|