|
@@ -1,10 +1,13 @@
|
|
|
package com.ruoyi.web.controller.opt;
|
|
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
+import com.ruoyi.common.core.domain.R;
|
|
|
+import com.ruoyi.common.request.ProcessInfoReq;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
/**
|
|
@@ -19,24 +22,66 @@ public class OptController {
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * @desc :
|
|
|
+ * @desc : 此接口用来接收订单推送服务,只用来判断是否成功
|
|
|
* @author : wangming
|
|
|
* @createTime : 2022/9/6 11:04
|
|
|
* @param : [processId 订单id]
|
|
|
* @return : com.ruoyi.common.core.domain.AjaxResult
|
|
|
*/
|
|
|
- public AjaxResult chargeOrderNotice(@Param("processId") String processId){
|
|
|
+ @PostMapping("/getValue")
|
|
|
+ public R chargeOrderNotice(@Param("processId") String processId){
|
|
|
try {
|
|
|
//先验证参数
|
|
|
if (StringUtils.isEmpty(processId)){
|
|
|
//返回接收失败
|
|
|
-// return AjaxResult
|
|
|
+ return R.paramNull("参数不可为空!");
|
|
|
}
|
|
|
+ //参数确认没问题以后去请求www服务进行订单信息获取
|
|
|
+
|
|
|
+ //入本地库
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
- log.error("订单接收出错" + e.getLocalizedMessage());
|
|
|
+ log.error("订单接收出错:" + e.getLocalizedMessage());
|
|
|
+ return R.fail();
|
|
|
+ }
|
|
|
+ return R.okwww();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 此接口用来接收到订单推送以后去获取订单信息,然后入库使用
|
|
|
+ * @author : wangming
|
|
|
+ * @createTime : 2022/9/6 11:34
|
|
|
+ * @param : [processId]
|
|
|
+ * @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;
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 此接口为给www推送状态修改数据
|
|
|
+ * @author : wangming
|
|
|
+ * @createTime : 2022/9/6 11:40
|
|
|
+ * @param : []
|
|
|
+ * @return : com.ruoyi.common.core.domain.R
|
|
|
+ */
|
|
|
+
|
|
|
+ public R pushProcessStatus(){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
}
|