package org.springblade.estate.feign;

import io.swagger.annotations.ApiParam;
import org.springblade.core.mp.support.BladePage;
import org.springblade.estate.dto.GuestAuthorizeDTO;
import org.springblade.estate.entity.GuestAuthorize;
import org.springblade.estate.vo.GuestAuthorizeVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.List;

/**
 * 访客授权记录 Feign
 *
 * @author lianghanqiang
 * @since 2021-05-08
 */
@FeignClient(value = "cyzh-estate",path = "/feign/guestauthorize")
public interface IGuestAuthorizeClient  {

	/**
	 * 详情
	 */
	@GetMapping("/detail")
    GuestAuthorizeVO detail(@SpringQueryMap GuestAuthorize guestAuthorize);

	/**
	 * 查询 访客授权记录
	 */
	@GetMapping("/list")
    List<GuestAuthorizeVO> list(@SpringQueryMap GuestAuthorize guestAuthorize);

	/**
	 * 查询 访客授权记录
	 */
	@GetMapping("/getListByUsers")
	List<GuestAuthorizeVO> getListByUsers(@RequestParam List<Long> userIds);



	/**
	 * 新增 访客授权记录
	 */
	@PostMapping("/save")
	GuestAuthorize save(@Valid @RequestBody GuestAuthorize guestAuthorize);

	/**
	 * 修改 访客授权记录
	 */
	@PostMapping("/update")
    boolean update(@Valid @RequestBody GuestAuthorize guestAuthorize);

	/**
	 * 新增或修改 访客授权记录
	 */
	@PostMapping("/submit")
    boolean submit(@Valid @RequestBody GuestAuthorize guestAuthorize);


	/**
	 * 删除 访客授权记录
	 */
	@PostMapping("/remove")
    boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids);

	@PostMapping("pageOfMonth")
	BladePage<GuestAuthorize> pageOfMonth(@RequestBody GuestAuthorizeDTO guestAuthorizeDTO);
}
