package com.xueyi.system.api.sms.feign;

import com.alibaba.fastjson.JSONObject;
import com.xueyi.system.api.sms.domain.vo.DingdingReqEntity;
import com.xueyi.system.api.sms.domain.vo.SmsReqEntity;
import com.xueyi.system.api.sms.feign.factory.RemoteDingdingFallbackFactory;
import com.xueyi.system.api.sms.feign.factory.RemoteSmsFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 短信发送服务
 *
 * @author yrx
 */
@FeignClient(url = "${notification.dingding.url}",name = "dingding", fallbackFactory = RemoteDingdingFallbackFactory.class)
public interface RemoteDingdingService {

    @PostMapping("/robot/send")
    JSONObject send(@RequestParam(value = "access_token")String token, @RequestBody DingdingReqEntity smsReqEntity);


}