|
@@ -1,6 +1,7 @@
|
|
|
package com.ruixuan.isc.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.kuaishou.merchant.open.api.common.utils.PlatformEventSecurityUtil;
|
|
|
import com.ruixuan.common.core.controller.BaseController;
|
|
|
import com.ruixuan.common.core.page.TableDataInfo;
|
|
|
import com.ruixuan.common.utils.Check;
|
|
@@ -13,13 +14,7 @@ import io.swagger.annotations.ApiParam;
|
|
|
import lombok.SneakyThrows;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
@@ -1882,4 +1877,21 @@ public class SupplyChainController extends BaseController {
|
|
|
supplyChainService.addList(beginDate, endDate, null);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @RestController
|
|
|
+ @RequestMapping("/event")
|
|
|
+ public class EventController {
|
|
|
+ @RequestMapping(value = "/accept", method = RequestMethod.POST)
|
|
|
+ public Map<String, Object> acceptEvent(@RequestBody String eventsEncoded) {
|
|
|
+ System.err.println(eventsEncoded);
|
|
|
+ // String events = PlatformEventSecurityUtil.decode(eventsEncoded, null);
|
|
|
+ //events为明文,这里加入自己代码逻辑
|
|
|
+
|
|
|
+ //返回成功
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ result.put("result", 1);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|