|
@@ -25,26 +25,32 @@ import java.util.HashMap;
|
|
* @Desc : 订单类
|
|
* @Desc : 订单类
|
|
*/
|
|
*/
|
|
@Controller
|
|
@Controller
|
|
-@RequestMapping("/mo/cace")
|
|
|
|
|
|
+@RequestMapping("/process/operation")
|
|
@Slf4j
|
|
@Slf4j
|
|
public class OptController {
|
|
public class OptController {
|
|
|
|
|
|
//订单信息请求接口
|
|
//订单信息请求接口
|
|
@Value("processUrl")
|
|
@Value("processUrl")
|
|
private String processUrl;
|
|
private String processUrl;
|
|
|
|
+ //审核通知接口
|
|
|
|
+ @Value("checkUrl")
|
|
|
|
+ private String checklUrl;
|
|
|
|
+ //支付通知接口
|
|
|
|
+ @Value("payUrl")
|
|
|
|
+ private String payUrl;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private ISysInfoConfigService sysInfoConfigService;
|
|
private ISysInfoConfigService sysInfoConfigService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @desc : 此接口用来接收订单推送服务,只用来判断是否成功
|
|
|
|
|
|
+ * @desc : 此接口用来接收订单推送服务,只用来判断是否成功,,入库操作
|
|
* @author : wangming
|
|
* @author : wangming
|
|
* @createTime : 2022/9/6 11:04
|
|
* @createTime : 2022/9/6 11:04
|
|
* @param : [processId 订单id]
|
|
* @param : [processId 订单id]
|
|
* @return : com.ruoyi.common.core.domain.AjaxResult
|
|
* @return : com.ruoyi.common.core.domain.AjaxResult
|
|
*/
|
|
*/
|
|
- @PostMapping("/gue")
|
|
|
|
|
|
+ @PostMapping("/put_in_storage")
|
|
public R chargeOrderNotice(@Param("processId") String processId){
|
|
public R chargeOrderNotice(@Param("processId") String processId){
|
|
try {
|
|
try {
|
|
//先验证参数
|
|
//先验证参数
|
|
@@ -54,55 +60,55 @@ public class OptController {
|
|
}
|
|
}
|
|
//参数确认没问题以后去请求www服务进行订单信息获取
|
|
//参数确认没问题以后去请求www服务进行订单信息获取
|
|
HashMap<String, String> process = new HashMap<>();
|
|
HashMap<String, String> process = new HashMap<>();
|
|
-// String string = JSON.toJSONString(process);
|
|
|
|
|
|
+ process.put("processId", processId);
|
|
String string = JSONObject.valueAsStr(process);
|
|
String string = JSONObject.valueAsStr(process);
|
|
String processResult = HttpUtils.sendPost(processUrl, string);
|
|
String processResult = HttpUtils.sendPost(processUrl, string);
|
|
//拿到解析结果,进行解析
|
|
//拿到解析结果,进行解析
|
|
- JSONArray objects = JSON.parseArray(processResult);
|
|
|
|
-// objects.
|
|
|
|
- //入本地库
|
|
|
|
|
|
+ ProcessInfoReq processInfoReq = JSON.parseObject(processResult, ProcessInfoReq.class);
|
|
|
|
+ if (StringUtils.isNotNull(processInfoReq)){
|
|
|
|
+ //入本地库
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ log.info("订单数据为空,请求失败,请求id为:" + processId);
|
|
|
|
+ return R.failwww("订单数据为空,接收失败");
|
|
|
|
+ }
|
|
|
|
+
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
log.error("订单接收出错:" + e.getLocalizedMessage());
|
|
log.error("订单接收出错:" + e.getLocalizedMessage());
|
|
- return R.fail();
|
|
|
|
|
|
+ return R.failwww("订单接收时程序出错");
|
|
}
|
|
}
|
|
return R.okwww();
|
|
return R.okwww();
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
- * @desc : 此接口用来接收到订单推送以后去获取订单信息,然后入库使用
|
|
|
|
|
|
+ * @desc : 此接口为给www推送审核状态通知
|
|
* @author : wangming
|
|
* @author : wangming
|
|
- * @createTime : 2022/9/6 11:34
|
|
|
|
- * @param : [processId]
|
|
|
|
|
|
+ * @createTime : 2022/9/6 11:40
|
|
|
|
+ * @param : []
|
|
* @return : com.ruoyi.common.core.domain.R
|
|
* @return : com.ruoyi.common.core.domain.R
|
|
*/
|
|
*/
|
|
- @PostMapping("/sadfsaf")
|
|
|
|
- public R getProcessInfo(@Param("processId") String processId){
|
|
|
|
- try {
|
|
|
|
- //首先对参数进行判断
|
|
|
|
- if (StringUtils.isEmpty(processId)){
|
|
|
|
- return R.paramNull("参数不可为空!");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- log.error("订单入库失败:" + e.getLocalizedMessage());
|
|
|
|
- return null;
|
|
|
|
- }
|
|
|
|
|
|
+ @PostMapping("/check_inform")
|
|
|
|
+ public R checkInform(){
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
- * @desc : 此接口为给www推送状态修改数据
|
|
|
|
|
|
+ * @desc : 此接口为支付通知
|
|
* @author : wangming
|
|
* @author : wangming
|
|
- * @createTime : 2022/9/6 11:40
|
|
|
|
|
|
+ * @createTime : 2022/9/6 15:48
|
|
* @param : []
|
|
* @param : []
|
|
* @return : com.ruoyi.common.core.domain.R
|
|
* @return : com.ruoyi.common.core.domain.R
|
|
*/
|
|
*/
|
|
|
|
+ @PostMapping("/pay_inform")
|
|
|
|
+ public R payInform(){
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
|
|
- public R pushProcessStatus(){
|
|
|
|
|
|
+ @PostMapping("fill_template")
|
|
|
|
+ public R fillTemplate(){
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|