yumeng hai 11 meses
pai
achega
399da12c56

+ 4 - 44
ruixuan-live/src/main/java/com/ruixuan/isc/controller/SupplyChainController.java

@@ -52,10 +52,6 @@ public class SupplyChainController extends BaseController {
 
     @Value("${accept.ruiXuanPrivateKey}")
     private String ruiXuanPrivateKey;
-
-    @Value("${accept.zhiShuiPrivateKey}")
-    private String zhiShuiPrivateKey;
-
     @Value("${accept.rocketPrivateKey}")
     private String rocketPrivateKey;
 
@@ -69,8 +65,8 @@ public class SupplyChainController extends BaseController {
     @Value("${accept.yuXiuPrivateKey}")
     private String yuXiuPrivateKey;
 
-    @Value("${accept.zhishuiPrivateKey}")
-    private String zhishuiPrivateKey;
+    @Value("${accept.zhiShuiPrivateKey}")
+    private String zhiShuiPrivateKey;
 
 
     @Value("${ownership.id}")
@@ -2181,42 +2177,6 @@ public class SupplyChainController extends BaseController {
 
     }
 
-
-
-    // 止水
-    @PostMapping(value = "/mgsAccept")
-    public Map<String, Object> mgsAccept(@RequestBody String eventsEncoded) {
-        try {
-            logger.info("止水优选消息订阅");
-            String events = PlatformEventSecurityUtil.decode(eventsEncoded, zhiShuiPrivateKey);
-            JSONObject eventJSon = JSONObject.parseObject(events);
-            fxNowService.submit(new Runnable() {
-                @Override
-                public void run() {
-                    try {
-                        if (!Check.isNull(eventJSon)) {
-                            String event = eventJSon.getString("event");
-                            if ("kwaishop_distribute_order_change_notify".equals(event)) {
-                                supplyChainService.updateOrder(eventJSon);
-                            } else if ("kwaishop_distribute_activity_item_change".equals(event)) {
-                                supplyChainService.updateItem(eventJSon);
-                            }
-                        }
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-                }
-            });
-        } catch (KsMerchantApiException e) {
-            e.printStackTrace();
-        }
-        //返回成功
-        Map<String, Object> result = new HashMap<>();
-        result.put("result", 1);
-        return result;
-
-    }
-
     @PostMapping(value = "/rocketAccept")
     public Map<String, Object> rocketAccept(@RequestBody String eventsEncoded) {
         try {
@@ -2388,11 +2348,11 @@ public class SupplyChainController extends BaseController {
     }
 
 
-    @PostMapping(value = "/zhishuiAccept")
+    @PostMapping(value = "/zhiShuiAccept")
     public Map<String, Object> zhishuiAccept(@RequestBody String eventsEncoded) {
         try {
             logger.info("止水优选消息订阅");
-            String events = PlatformEventSecurityUtil.decode(eventsEncoded, zhishuiPrivateKey);
+            String events = PlatformEventSecurityUtil.decode(eventsEncoded, zhiShuiPrivateKey);
             JSONObject eventJSon = JSONObject.parseObject(events);
             fxNowService.submit(new Runnable() {
                 @Override