package com.njcn.user.api;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.user.api.fallback.SmsSendClientFallbackFactory;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author xy
 */
@FeignClient(value = ServerInfo.USER, path = "/sms", fallbackFactory = SmsSendClientFallbackFactory.class,contextId = "sms")
public interface SmsSendFeignClient {

    @PostMapping("/send/simple")
    @ApiOperation("发送短信（简化参数）")
    HttpResult<String> sendSmsSimple(@RequestParam("receiver") String receiver
            , @RequestParam("content") String content
            , @RequestParam("messageType") String messageType);

}
