Showing
1 changed file
with
11 additions
and
0 deletions
@@ -3,6 +3,7 @@ package com.yoho.ufo.service.impl; | @@ -3,6 +3,7 @@ package com.yoho.ufo.service.impl; | ||
3 | import com.alibaba.fastjson.JSONObject; | 3 | import com.alibaba.fastjson.JSONObject; |
4 | import com.yoho.core.rest.client.ServiceCaller; | 4 | import com.yoho.core.rest.client.ServiceCaller; |
5 | import com.yoho.ufo.service.model.InboxReqVO; | 5 | import com.yoho.ufo.service.model.InboxReqVO; |
6 | +import com.yohobuy.ufo.model.message.SmsMessageReq; | ||
6 | import org.slf4j.Logger; | 7 | import org.slf4j.Logger; |
7 | import org.slf4j.LoggerFactory; | 8 | import org.slf4j.LoggerFactory; |
8 | import org.springframework.beans.factory.annotation.Autowired; | 9 | import org.springframework.beans.factory.annotation.Autowired; |
@@ -18,6 +19,7 @@ public class InboxServiceImpl { | @@ -18,6 +19,7 @@ public class InboxServiceImpl { | ||
18 | @Autowired | 19 | @Autowired |
19 | private ServiceCaller serviceCaller; | 20 | private ServiceCaller serviceCaller; |
20 | 21 | ||
22 | + // 发送站内信 | ||
21 | public void addInboxForPlatform(int uid, Integer type, Integer businessType, String params){ | 23 | public void addInboxForPlatform(int uid, Integer type, Integer businessType, String params){ |
22 | InboxReqVO reqVO = InboxReqVO.builder().businessType(businessType).params(params).type(type).uid(uid).build(); | 24 | InboxReqVO reqVO = InboxReqVO.builder().businessType(businessType).params(params).type(type).uid(uid).build(); |
23 | 25 | ||
@@ -27,4 +29,13 @@ public class InboxServiceImpl { | @@ -27,4 +29,13 @@ public class InboxServiceImpl { | ||
27 | 29 | ||
28 | LOGGER.info("addInboxForPlatform.addInbox call result is {}", jsonObject); | 30 | LOGGER.info("addInboxForPlatform.addInbox call result is {}", jsonObject); |
29 | } | 31 | } |
32 | + | ||
33 | + // 发送UFO短信 | ||
34 | + public void sendSmsMessage(SmsMessageReq req) { | ||
35 | + LOGGER.info("addInboxForPlatform.sendSmsMessage with reqVO is {}", req); | ||
36 | + | ||
37 | + String jsonObject = serviceCaller.asyncCall("ufo-gateway.sendSmsForPlatform", req, String.class).get(); | ||
38 | + | ||
39 | + LOGGER.info("addInboxForPlatform.sendSmsMessage call result is {}", jsonObject); | ||
40 | + } | ||
30 | } | 41 | } |
-
Please register or login to post a comment