|
|
@ -40,10 +40,7 @@ import javax.annotation.Resource; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.*; |
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Controller |
|
|
|
@Controller |
|
|
|
@RequestMapping(value = "/outRechargeOrder") |
|
|
|
@RequestMapping(value = "/outRechargeOrder") |
|
|
@ -265,9 +262,15 @@ public class OutRechargeOrderController { |
|
|
|
|
|
|
|
|
|
|
|
if (order.getPayType() == 2) { |
|
|
|
if (order.getPayType() == 2) { |
|
|
|
JSONObject jsonObject = HuiLianTongUnionCardConfig.refund( "HFR"+new Date().getTime() , order.getOrderNo()); |
|
|
|
JSONObject jsonObject = HuiLianTongUnionCardConfig.refund( "HFR"+new Date().getTime() , order.getOrderNo()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (jsonObject == null) { |
|
|
|
|
|
|
|
log.error("orderToPay error!", "请求超时"); |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请求超时,请重新点击"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
JSONObject dataObject = HuiLianTongUnionCardConfig.resolveResponse(jsonObject.getString("data")); |
|
|
|
JSONObject dataObject = HuiLianTongUnionCardConfig.resolveResponse(jsonObject.getString("data")); |
|
|
|
|
|
|
|
|
|
|
|
if (dataObject.getBoolean("success")) { |
|
|
|
if (dataObject.getBoolean("success") || Objects.equals(dataObject.getString("message"), "原交易已撤销,不可再次操作")) { |
|
|
|
order.setStatus(5); |
|
|
|
order.setStatus(5); |
|
|
|
order.setRefundTime(new Date()); |
|
|
|
order.setRefundTime(new Date()); |
|
|
|
order.setOutRefundNo("HFR"+new Date().getTime() ); |
|
|
|
order.setOutRefundNo("HFR"+new Date().getTime() ); |
|
|
|