|
|
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 org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
/**
|
|
|
* Created by li.ma on 2019/3/19.
|
|
|
*/
|
|
|
@Service
|
|
|
public class InboxServiceImpl {
|
|
|
private static final Logger LOGGER = LoggerFactory.getLogger(InboxServiceImpl.class);
|
|
|
@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();
|
|
|
|
|
|
LOGGER.info("addInboxForPlatform.addInbox with reqVO is {}", reqVO);
|
|
|
|
|
|
JSONObject jsonObject = serviceCaller.asyncCall("ufo-gateway.addInboxForPlatform", reqVO, JSONObject.class).get();
|
|
|
|
|
|
LOGGER.info("addInboxForPlatform.addInbox call result is {}", jsonObject);
|
|
|
}
|
|
|
} |
...
|
...
|
|