package cn.ey.biz.module.system.api.msg;

import cn.ey.biz.common.pojo.R;
import cn.ey.biz.module.system.api.msg.dto.*;
import cn.ey.biz.module.system.enums.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import javax.validation.Valid;

@FeignClient(name = ApiConstants.NAME)
@Api(tags = "消息中心")
public interface MsgApi {

    String PREFIX = ApiConstants.PREFIX + "/msg";

    @PostMapping(PREFIX + "/send-email")
    @ApiOperation("邮件发送")
    R<Boolean> sendEmail(@Valid @RequestBody SendEmailDTO sendEmailDTO);

    @PostMapping(PREFIX + "/send-sms")
    @ApiOperation("短信发送")
    R<Boolean> sendSms(@Valid @RequestBody SendSmsDTO sendSmsDTO);

    @PostMapping(PREFIX + "/send-custom-msg")
    @ApiOperation("消息发送")
    R<Boolean> sendCustomMsg(@Valid @RequestBody SendCustomMsgDTO sendSmsDTO);

    @PostMapping(PREFIX + "/alter-custom-msg")
    @ApiOperation("消息修改状态")
    R<Boolean> alterCustomMsg(@Valid @RequestBody AlterCustomMsgDTO sendSmsDTO);

    @PostMapping(PREFIX + "/delete-custom-msg")
    @ApiOperation("删除消息")
    R<Boolean> deleteCustomMsg(@Valid @RequestBody DeleteCustomMsgDTO sendSmsDTO);

    @PostMapping(PREFIX + "/msg-template")
    @ApiOperation("模板维护")
    R<Boolean> msgTemplate(@Valid @RequestBody  MsgTemplateDTO sendSmsDTO);

    @PostMapping(PREFIX + "/send-custom-message-single")
    @ApiOperation("消息发送(新)")
    R<Boolean> sendCustomMessageSingle(@Valid @RequestBody SendCustomMessageSingleDTO sendDTO);

    @PostMapping(PREFIX + "/alter-custom-message-single")
    @ApiOperation("消息修改(新)")
    R<Boolean> alterCustomMessageSingle(@Valid @RequestBody AlterCustomMessageSingleDTO  singleDTO);

    @PostMapping(PREFIX + "/delete-custom-message-single")
    @ApiOperation("消息删除(新)")
    R<Boolean> deleteCustomMessageSingle(@Valid @RequestBody  DeleteCustomMessageSingleDTO singleDTO);

}
