package com.crm.manager.service.emial;

import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.entity.system.email.SysEmailTestSendEntity;
import com.crm.rely.backend.core.entity.system.email.sent.config.*;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(name = "EMAIL-SERVICE", path = "/email/sent/config/manager")
public interface EmailSentConfigFeignService {


    /**
     * 添加配置
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/add")
    BaseResultDto add(SysEmailSentConfigAddEntity entity) throws Exception;

    /**
     * 删除配置
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/delete")
    BaseResultDto delete(SysEmailSentConfigDeleteEntity entity) throws Exception;

    /**
     * 修改配置
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/update")
    BaseResultDto update(SysEmailSentConfigUpdateEntity entity) throws Exception;

    @PostMapping("/batch/update")
    BaseResultDto updateBatch(SysEmailSentConfigBatchUpdateEntity entity) throws Exception;

    /**
     * 列表查询
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/search/list")
    BaseResultDto searchList(SysEmailSentConfigSearchEntity entity) throws Exception;

    /**
     * 单个查询
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/search/single")
    BaseResultDto searchLingle(SysEmailSentConfigSingleEntity entity) throws Exception;

    @PostMapping("/list")
    BaseResultDto list() throws Exception;

    @PostMapping("/add/send/code")
    BaseResultDto addChannelSendEmailCode() throws Exception;

    @PostMapping("/update/send/code")
    BaseResultDto updateChannelSendEmailCode() throws Exception;

    @PostMapping("/batch/update/send/code")
    BaseResultDto updateBatchSendEmailCode() throws Exception;

    @PostMapping("/delete/send/code")
    BaseResultDto deleteChannelSendEmailCode() throws Exception;

    @PostMapping("/test/send")
    BaseResultDto testSendEmail(SysEmailTestSendEntity entity) throws Exception;
}
