/**
 * All rights Reserved, Designed By www.freemud.cn
 *
 * @Title: ShortMessageClient
 * @Package cn.freemud.service.thirdparty
 * @Description:
 * @author: liming.guo
 * @date: 2018/6/12 17:42
 * @version V1.0
 * @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
 * 注意：本内容仅限于上海非码科技内部传阅，禁止外泄以及用于其他的商业目
 */
package cn.freemud.service.thirdparty;

import cn.freemud.entities.dto.SendShortMessageCodeDto;
import cn.freemud.entities.dto.SendSmsCodeResponseDto;
import cn.freemud.hystrix.ShortMessageClientFallbackFactory;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

//测试：http://115.159.142.32:9013  生产：http://115.159.226.87:8980
@FeignClient(name = "SHORT-MESSAGESERVICE", url = "${saas.shortmessageclient.feign.url}",fallbackFactory = ShortMessageClientFallbackFactory.class)
@RequestMapping(produces = {"application/json;charset=UTF-8"})
public interface ShortMessageClient {

    @PostMapping(value = "sendsms?appid={msappid}")
    SendSmsCodeResponseDto sendSmsCode(@PathVariable("msappid") String msappid,
                                       @RequestBody SendShortMessageCodeDto sendShortMessageCodeDto);

}


