package cn.axzo.msg.center.api;

import cn.axzo.msg.center.api.fallback.MessagePushApiFallbackFactory;
import cn.axzo.msg.center.api.request.MsgBody4Guest;
import cn.azxo.framework.common.model.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


/**
 *  发送app push消息，底层使用友盟
 */
@FeignClient(value = "msg-center", url = "${server.serviceUrl:http://msg-center:8080}", fallbackFactory = MessagePushApiFallbackFactory.class)
@Component
public interface MessagePushApi {

  /**
   *  发送app系统消息，调用友盟接口
   * @param msgBody
   * @return
   */
  @PostMapping("umeng/pushMsg")
  CommonResponse<Void> sendPushMessage(@RequestBody MsgBody4Guest msgBody);

}
