|
@@ -1,27 +1,38 @@
|
|
|
package com.ruoyi.web.controller.opt;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
import com.ruoyi.common.core.domain.R;
|
|
|
+import com.ruoyi.common.json.JSONObject;
|
|
|
import com.ruoyi.common.request.ProcessInfoReq;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
+import com.ruoyi.common.utils.http.HttpUtils;
|
|
|
import com.ruoyi.opt.service.ISysInfoConfigService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
+
|
|
|
/**
|
|
|
* @Author : wangming
|
|
|
* @CreateTime : 2022-09-06
|
|
|
* @Desc : 订单类
|
|
|
*/
|
|
|
@Controller
|
|
|
-@RequestMapping("/monitor/cache")
|
|
|
+@RequestMapping("/mo/cace")
|
|
|
@Slf4j
|
|
|
public class OptController {
|
|
|
|
|
|
+ //订单信息请求接口
|
|
|
+ @Value("processUrl")
|
|
|
+ private String processUrl;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ISysInfoConfigService sysInfoConfigService;
|
|
|
|
|
@@ -33,7 +44,7 @@ public class OptController {
|
|
|
* @param : [processId 订单id]
|
|
|
* @return : com.ruoyi.common.core.domain.AjaxResult
|
|
|
*/
|
|
|
- @PostMapping("/getValue")
|
|
|
+ @PostMapping("/gue")
|
|
|
public R chargeOrderNotice(@Param("processId") String processId){
|
|
|
try {
|
|
|
//先验证参数
|
|
@@ -42,7 +53,13 @@ public class OptController {
|
|
|
return R.paramNull("参数不可为空!");
|
|
|
}
|
|
|
//参数确认没问题以后去请求www服务进行订单信息获取
|
|
|
-
|
|
|
+ HashMap<String, String> process = new HashMap<>();
|
|
|
+// String string = JSON.toJSONString(process);
|
|
|
+ String string = JSONObject.valueAsStr(process);
|
|
|
+ String processResult = HttpUtils.sendPost(processUrl, string);
|
|
|
+ //拿到解析结果,进行解析
|
|
|
+ JSONArray objects = JSON.parseArray(processResult);
|
|
|
+// objects.
|
|
|
//入本地库
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|