|
|
1
|
+package com.yohoufo.inboxclient.controller;
|
|
|
2
|
+
|
|
|
3
|
+import com.yohoufo.common.annotation.IgnoreSession;
|
|
|
4
|
+import com.yohoufo.common.annotation.IgnoreSignature;
|
|
|
5
|
+import com.yohoufo.inboxclient.model.InBoxResponse;
|
|
|
6
|
+import com.yohoufo.inboxclient.model.InboxReqVO;
|
|
|
7
|
+import com.yohoufo.inboxclient.sdk.InBoxSDK;
|
|
|
8
|
+import org.slf4j.Logger;
|
|
|
9
|
+import org.slf4j.LoggerFactory;
|
|
|
10
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
11
|
+import org.springframework.stereotype.Controller;
|
|
|
12
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
13
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
14
|
+
|
|
|
15
|
+/**
|
|
|
16
|
+ * Created by li.ma on 2019/3/19.
|
|
|
17
|
+ * 供后台调用发站内信
|
|
|
18
|
+ */
|
|
|
19
|
+@RequestMapping("/erp")
|
|
|
20
|
+@Controller
|
|
|
21
|
+public class InboxController {
|
|
|
22
|
+ private final Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
23
|
+
|
|
|
24
|
+ @Autowired
|
|
|
25
|
+ private InBoxSDK inBoxSDK;
|
|
|
26
|
+
|
|
|
27
|
+ @RequestMapping(value = "/addInboxForPlatform")
|
|
|
28
|
+ @IgnoreSession
|
|
|
29
|
+ @IgnoreSignature
|
|
|
30
|
+ public InBoxResponse addInboxForPlatform(@RequestBody InboxReqVO reqVO){
|
|
|
31
|
+ logger.info("InboxController.addInbox with param is {}", reqVO);
|
|
|
32
|
+ InBoxResponse result = inBoxSDK.addInbox(reqVO);
|
|
|
33
|
+ logger.info("InboxController.addInbox call result is {}",result);
|
|
|
34
|
+ return result;
|
|
|
35
|
+ }
|
|
|
36
|
+} |