|
|
@ -7,10 +7,7 @@ import com.hai.common.exception.ErrorHelp; |
|
|
|
import com.hai.common.exception.SysCode; |
|
|
|
import com.hai.common.exception.SysCode; |
|
|
|
import com.hai.common.pay.util.XmlUtil; |
|
|
|
import com.hai.common.pay.util.XmlUtil; |
|
|
|
import com.hai.common.pay.util.sdk.WXPayConstants; |
|
|
|
import com.hai.common.pay.util.sdk.WXPayConstants; |
|
|
|
import com.hai.common.utils.DateUtil; |
|
|
|
import com.hai.common.utils.*; |
|
|
|
import com.hai.common.utils.HttpsUtils; |
|
|
|
|
|
|
|
import com.hai.common.utils.IDGenerator; |
|
|
|
|
|
|
|
import com.hai.common.utils.WxUtils; |
|
|
|
|
|
|
|
import com.hai.config.CommonSysConfig; |
|
|
|
import com.hai.config.CommonSysConfig; |
|
|
|
import com.hai.config.CommonSysConst; |
|
|
|
import com.hai.config.CommonSysConst; |
|
|
|
import com.hai.config.HuiLianTongUnionCardConfig; |
|
|
|
import com.hai.config.HuiLianTongUnionCardConfig; |
|
|
@ -347,7 +344,10 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
order.setPaySerialNo(consumptionResult.getString("orderId")); // 支付流水号
|
|
|
|
order.setPaySerialNo(consumptionResult.getString("orderId")); // 支付流水号
|
|
|
|
order.setPayRealPrice(order.getPayPrice()); // 实付金额
|
|
|
|
order.setPayRealPrice(order.getPayPrice()); // 实付金额
|
|
|
|
if (order.getRechargeType() != null && order.getRechargeType() == 1) { |
|
|
|
if (order.getRechargeType() != null && order.getRechargeType() == 1) { |
|
|
|
outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo()); |
|
|
|
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo()); |
|
|
|
|
|
|
|
if (object.getInteger("code") != 200) { |
|
|
|
|
|
|
|
outRechargeOrderService.rechargeOrderToRefund(orderId); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
order.setStatus(2); |
|
|
|
order.setStatus(2); |
|
|
|
order.setPayType(2); |
|
|
|
order.setPayType(2); |
|
|
@ -371,7 +371,10 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
order.setPayRealPrice(order.getPayPrice()); // 实付金额
|
|
|
|
order.setPayRealPrice(order.getPayPrice()); // 实付金额
|
|
|
|
order.setStatus(2); |
|
|
|
order.setStatus(2); |
|
|
|
if (order.getRechargeType() != null && order.getRechargeType() == 1) { |
|
|
|
if (order.getRechargeType() != null && order.getRechargeType() == 1) { |
|
|
|
outRechargeOrderService.getMobile(order.getRechargeContent() , order.getPayPrice().intValue() , order.getOrderNo()); |
|
|
|
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo()); |
|
|
|
|
|
|
|
if (object.getInteger("code") != 200) { |
|
|
|
|
|
|
|
outRechargeOrderService.rechargeOrderToRefund(orderId); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
order.setPayType(3); |
|
|
|
order.setPayType(3); |
|
|
|
order.setPayTime(new Date()); // 支付时间
|
|
|
|
order.setPayTime(new Date()); // 支付时间
|
|
|
@ -406,9 +409,10 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
|
|
|
|
|
|
|
|
map.put("sign" , signStr); |
|
|
|
map.put("sign" , signStr); |
|
|
|
|
|
|
|
|
|
|
|
return HttpsUtils.doPost(CommonSysConst.getSysConfig().getCzUrl() , map); |
|
|
|
return HttpsUtils.doPost(CommonSysConst.getSysConfig().getCzUrl() + "createOrder" , map); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void rechargeOrderToRefund(Long orderId) throws Exception { |
|
|
|
public void rechargeOrderToRefund(Long orderId) throws Exception { |
|
|
|
OutRechargeOrder order = outRechargeOrderService.findByOrderId(orderId); |
|
|
|
OutRechargeOrder order = outRechargeOrderService.findByOrderId(orderId); |
|
|
|