Authored by mali

发站内信接口

... ... @@ -3,6 +3,7 @@ package com.yoho.ufo.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.yoho.core.rest.client.ServiceCaller;
import com.yoho.ufo.service.model.InboxReqVO;
import com.yohobuy.ufo.model.message.SmsMessageReq;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -18,6 +19,7 @@ public class InboxServiceImpl {
@Autowired
private ServiceCaller serviceCaller;
// 发送站内信
public void addInboxForPlatform(int uid, Integer type, Integer businessType, String params){
InboxReqVO reqVO = InboxReqVO.builder().businessType(businessType).params(params).type(type).uid(uid).build();
... ... @@ -27,4 +29,13 @@ public class InboxServiceImpl {
LOGGER.info("addInboxForPlatform.addInbox call result is {}", jsonObject);
}
// 发送UFO短信
public void sendSmsMessage(SmsMessageReq req) {
LOGGER.info("addInboxForPlatform.sendSmsMessage with reqVO is {}", req);
String jsonObject = serviceCaller.asyncCall("ufo-gateway.sendSmsForPlatform", req, String.class).get();
LOGGER.info("addInboxForPlatform.sendSmsMessage call result is {}", jsonObject);
}
}
... ...