|
@@ -1,21 +1,18 @@
|
|
package com.usky.dxtop.controller.web;
|
|
package com.usky.dxtop.controller.web;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
-import com.usky.dxtop.model.CallApiLog;
|
|
|
|
import com.usky.dxtop.model.Order;
|
|
import com.usky.dxtop.model.Order;
|
|
import com.usky.dxtop.service.CallApiLogService;
|
|
import com.usky.dxtop.service.CallApiLogService;
|
|
import com.usky.dxtop.service.OrderService;
|
|
import com.usky.dxtop.service.OrderService;
|
|
import com.usky.dxtop.service.api.TopApi;
|
|
import com.usky.dxtop.service.api.TopApi;
|
|
import com.usky.dxtop.service.impl.OrderServiceImpl;
|
|
import com.usky.dxtop.service.impl.OrderServiceImpl;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
-import org.apache.logging.log4j.core.util.JsonUtils;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import java.util.Optional;
|
|
|
|
import java.util.TreeMap;
|
|
import java.util.TreeMap;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -72,17 +69,17 @@ public class TopNotifyController {
|
|
tMap.put("sign",sign);
|
|
tMap.put("sign",sign);
|
|
//填入回调信息
|
|
//填入回调信息
|
|
try {
|
|
try {
|
|
- log.info("---order---notify---接受到的参数"+JSONObject.toJSONString(tMap));
|
|
|
|
|
|
+ log.info("---订单回调---接受到的参数"+JSONObject.toJSONString(tMap));
|
|
Order order = orderService.one(merchantOrderNo);
|
|
Order order = orderService.one(merchantOrderNo);
|
|
if (null == order){
|
|
if (null == order){
|
|
- log.error("---order---notify"+"订单编号不存在");
|
|
|
|
|
|
+ log.error("---订单回调"+"订单编号不存在");
|
|
}else {
|
|
}else {
|
|
callApiLogService.saveOrUpdate(merchantOrderNo,OrderServiceImpl.SCAN_PAY, TopApi.SCAN_TO_PAY_URL,null,JSONObject.toJSONString(tMap));
|
|
callApiLogService.saveOrUpdate(merchantOrderNo,OrderServiceImpl.SCAN_PAY, TopApi.SCAN_TO_PAY_URL,null,JSONObject.toJSONString(tMap));
|
|
orderService.paySuccess(order);
|
|
orderService.paySuccess(order);
|
|
}
|
|
}
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
- log.error("---order---notify"+e.getMessage());
|
|
|
|
|
|
+ log.error("---订单回调"+e.getMessage());
|
|
}
|
|
}
|
|
- log.info("---order---notify---回调成功");
|
|
|
|
|
|
+ log.info("---订单回调---回调成功");
|
|
}
|
|
}
|
|
}
|
|
}
|