退款请求超时

dev-discount
袁野 3 years ago
parent eb8c609281
commit 85943a5260
  1. 13
      hai-bweb/src/main/java/com/bweb/controller/OutRechargeOrderController.java

@ -40,10 +40,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
@Controller
@RequestMapping(value = "/outRechargeOrder")
@ -265,9 +262,15 @@ public class OutRechargeOrderController {
if (order.getPayType() == 2) {
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"));
if (dataObject.getBoolean("success")) {
if (dataObject.getBoolean("success") || Objects.equals(dataObject.getString("message"), "原交易已撤销,不可再次操作")) {
order.setStatus(5);
order.setRefundTime(new Date());
order.setOutRefundNo("HFR"+new Date().getTime() );

Loading…
Cancel
Save