From 6d6423cdc452a9c557026bffe2367ac3554db9b3 Mon Sep 17 00:00:00 2001 From: czw Date: Fri, 6 Nov 2020 18:35:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B6=88=E6=81=AF=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/web/wps/config/PassUrl.java | 2 +- .../controller/NotifyCallBackController.java | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/web/wps/logic/controller/NotifyCallBackController.java diff --git a/src/main/java/com/web/wps/config/PassUrl.java b/src/main/java/com/web/wps/config/PassUrl.java index 2596675..dc6ed41 100644 --- a/src/main/java/com/web/wps/config/PassUrl.java +++ b/src/main/java/com/web/wps/config/PassUrl.java @@ -2,7 +2,7 @@ package com.web.wps.config; public enum PassUrl { - v1_3rd_user,v1_3rd_file,v1_api_file; + v1_3rd_user,v1_3rd,v1_3rd_file,v1_api_file; public static boolean checkCode(String code){ for (PassUrl mode : PassUrl.values()){ diff --git a/src/main/java/com/web/wps/logic/controller/NotifyCallBackController.java b/src/main/java/com/web/wps/logic/controller/NotifyCallBackController.java new file mode 100644 index 0000000..4061658 --- /dev/null +++ b/src/main/java/com/web/wps/logic/controller/NotifyCallBackController.java @@ -0,0 +1,34 @@ +package com.web.wps.logic.controller; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.web.wps.base.BaseController; +import com.web.wps.base.Response; +import org.springframework.http.ResponseEntity; +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.RestController; + +/** + * @author czw + * 消息回调接口 + */ +@RestController +@RequestMapping("v1/3rd") +public class NotifyCallBackController extends BaseController { + + /** + * 回调通知 + */ + @PostMapping("onnotify") + public ResponseEntity onNotify( + @RequestBody JSONObject obj + ){ + logger.info("回调通知param:{}",JSON.toJSONString(obj)); + // TODO + // 返回数据暂不处理 + return Response.success(); + } + +} -- Gitee