package org.springblade.estate.feign;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.plugins.Page;
import io.swagger.annotations.ApiParam;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.tool.api.R;
import org.springblade.estate.dto.CarDTO;
import org.springblade.estate.dto.RepairDTO;
import org.springblade.estate.entity.Car;
import org.springblade.estate.entity.Repair;
import org.springblade.estate.vo.RepairVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.Valid;
import java.util.List;

/**
 * 报事工单 Feign
 *
 * @author lianghanqiang
 * @since 2021-03-30
 */
@FeignClient(value = "cyzh-estate",path = "/feign/repair")
public interface IRepairClient  {

	/**
	 * 详情
	 */
	@GetMapping("/detail")
    RepairVO detail(@SpringQueryMap Repair repair);

	/**
	 * 查询 报事工单
	 */
	@GetMapping("/list")
    List<RepairVO> list(@SpringQueryMap Repair repair);



	/**
	 * 新增 报事工单
	 */
	@PostMapping("/save")
	boolean save(@Valid @RequestBody Repair repair);

	/**
	 * 修改 报事工单
	 */
	@PostMapping("/update")
    boolean update(@Valid @RequestBody Repair repair);

	/**
	 * 新增或修改 报事工单
	 */
	@PostMapping("/submit")
    boolean submit(@Valid @RequestBody Repair repair);


	/**
	 * 删除 报事工单
	 */
	@PostMapping("/remove")
    boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids);

	/**
	 * 分页获取物业保修
	 * @param repairDTO
	 * @return
	 */
	@PostMapping("/page")
	R<BladePage<RepairVO>> page(@RequestBody RepairDTO repairDTO);


}
