package com.docus.server.api.scheduling.management;

import com.docus.infrastructure.web.request.SearchRequest;
import com.docus.infrastructure.web.response.PageResult;
import com.docus.server.dto.scheduling.management.SchCollectRecordRetryLogDTO;
import com.docus.server.vo.scheduling.management.SchCollectRecordRetryLogVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


/**
 * 采集记录表重试表 API
 *
 * @author AutoGenerator
 * @since 2023-07-14
 */
@Api(value = "采集记录表重试表任务管理接口", tags = "采集记录表重试表任务管理接口")
@FeignClient(value = "collector-scheduling-management", contextId = "collector-scheduling-management.SchCollectRecordRetryLogApi")
@RequestMapping("/schCollectRecordRetryLog")
public interface SchCollectRecordRetryLogApi {

    /**
     * 按主键查询
     *
     * @param id 主键id
     * @return 实体
     */
    @ApiOperation("按主键查询")
    @GetMapping("/find/{id}")
    SchCollectRecordRetryLogVO findById(@PathVariable(value = "id") String id);

    /**
     * 关键字搜素
     *
     * @param searchRequest 搜索参数
     * @return 分页列表
     */
    @ApiOperation("关键字搜素")
    @PostMapping("/search")
    PageResult<SchCollectRecordRetryLogVO> search(@RequestBody SearchRequest searchRequest);

    /**
     * 新增
     *
     * @param schCollectRecordRetryLogDTO 新增参数
     * @return 成功或失败
     */
    @ApiOperation("新增")
    @PostMapping("/add")
    boolean add(@RequestBody SchCollectRecordRetryLogDTO schCollectRecordRetryLogDTO);

    /**
     * 编辑
     *
     * @param schCollectRecordRetryLogDTO 编辑参数
     * @return 成功或失败
     */
    @ApiOperation("编辑")
    @PutMapping("/edit")
    boolean edit(@RequestBody SchCollectRecordRetryLogDTO schCollectRecordRetryLogDTO);

    /**
     * 批量删除
     *
     * @param ids 主键ids
     * @return 成功或失败
     */
    @ApiOperation("批量删除")
    @DeleteMapping("/delete")
    int delete(@RequestBody List<String> ids);
}
