|
@@ -61,6 +61,8 @@ public class SupplyChainController extends BaseController {
|
|
|
private String dfcPrivateKey;
|
|
|
@Value("${accept.mgsPrivateKey2}")
|
|
|
private String mgsPrivateKey2;
|
|
|
+ @Value("${accept.yufuPrivateKey}")
|
|
|
+ private String yufuPrivateKey;
|
|
|
|
|
|
|
|
|
@Value("${ownership.id}")
|
|
@@ -2269,6 +2271,41 @@ public class SupplyChainController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @PostMapping(value = "/yufuAccept")
|
|
|
+ public Map<String, Object> yufuAccept(@RequestBody String eventsEncoded) {
|
|
|
+ try {
|
|
|
+ logger.info("RX食品-二团严选消息订阅");
|
|
|
+ String events = PlatformEventSecurityUtil.decode(eventsEncoded, yufuPrivateKey);
|
|
|
+ JSONObject eventJSon = JSONObject.parseObject(events);
|
|
|
+ logger.info("二团回掉返回信息:{}", eventJSon);
|
|
|
+ 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;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@GetMapping("/addListKuaishouActivityInfo")
|
|
|
@ApiOperation(value = "团长查询招商活动列表")
|
|
|
public void addListKuaishouActivityInfo() {
|