package com.crm.manager.service.activity;

import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
import com.crm.rely.backend.core.dto.web.notice.WebNoticeDto;
import com.crm.rely.backend.core.dto.web.notice.record.WebNoticeRecordDto;
import com.crm.rely.backend.core.dto.web.upload.WebUploadCidDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.system.email.SysEmailSendEntity;
import com.crm.rely.backend.core.entity.web.notice.WebNoticeAddEntity;
import com.crm.rely.backend.core.entity.web.notice.WebNoticeSearchPageEntity;
import com.crm.rely.backend.core.entity.web.notice.record.WebNoticeRecordSearchPageEntity;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @description:
 * @author: houn
 * @create: 2020-07-19 16:25
 **/
@FeignClient(name = "ACTIVITY-SERVICE", path = "/web/notice/manager")
public interface WebNoticeFeignService {

    @PostMapping("/add")
    BaseResultDto add(@RequestBody @Validated WebNoticeAddEntity entity) throws Exception;

    @PostMapping("/add/upload/cid")
    BaseResultDto<List<WebUploadCidDto>> getUploadCidList() throws Exception;

    @PostMapping("/search/list")
    ResultWithPagerDto<WebNoticeDto> pageList(WebNoticeSearchPageEntity entity) throws Exception;

    @PostMapping("/search/single")
    BaseResultDto<WebNoticeDto> single(SingleLongEntity entity) throws Exception;

    @PostMapping("/search/list/record")
    ResultWithPagerDto<WebNoticeRecordDto> pageListRecord(WebNoticeRecordSearchPageEntity entity) throws Exception;

    @PostMapping("/add/Record/{cId}")
    BaseResultDto addRecord(SysEmailSendEntity emailSendEntity, @PathVariable("cId") Long cId) throws Exception;
}
