package org.springblade.system.expand.feign;

import io.swagger.annotations.ApiParam;
import org.springblade.system.expand.entity.CommonMenu;
import org.springblade.system.expand.vo.CommonMenuVO;
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-04-21
 */
@FeignClient(value = "blade-system-expand",path = "/feign/commonmenu")
public interface ICommonMenuClient  {

	/**
	 * 详情
	 */
	@GetMapping("/detail")
    CommonMenuVO detail(@SpringQueryMap CommonMenu commonMenu);

	/**
	 * 查询 常用菜单
	 */
	@GetMapping("/list")
    List<CommonMenuVO> list(@SpringQueryMap CommonMenu commonMenu);



	/**
	 * 新增 常用菜单
	 */
	@PostMapping("/save")
	boolean save(@Valid @RequestBody CommonMenu commonMenu);

	/**
	 * 修改 常用菜单
	 */
	@PostMapping("/update")
    boolean update(@Valid @RequestBody CommonMenu commonMenu);

	/**
	 * 新增或修改 常用菜单
	 */
	@PostMapping("/submit")
    boolean submit(@Valid @RequestBody CommonMenu commonMenu);


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


}
