#set($packegeFeign=$package.Entity.replace("entity","feign"))
package $!{packegeFeign};

import io.swagger.annotations.ApiParam;
import $!{package.Entity}.$!{entity};
#set($voPackage=$package.Entity.replace("entity","vo"))
import $!{voPackage}.$!{entity}VO;
import org.springframework.cloud.openfeign.FeignClient;
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;

/**
 * $!{table.comment} Feign
 *
 * @author lianghanqiang
 * @since $!{date}
 */
@FeignClient(value = "$!{cfg.serviceName}",path = "/feign#if($!{package.ModuleName})/$!{package.ModuleName}#end/$!{cfg.entityKey}")
public interface I$!{entity}Client  {

#if($!{cfg.hasWrapper})
	/**
	 * 详情
	 */
	@GetMapping("/detail")
    $!{entity}VO detail($!{entity} $!{table.entityPath});

	/**
	 * 查询 $!{table.comment}
	 */
	@GetMapping("/list")
    List<$!{entity}VO> list($!{entity} $!{table.entityPath});

#else
	/**
	 * 详情
	 */
	@GetMapping("/detail")
	$!{entity} detail($!{entity} $!{table.entityPath});

	/**
	 * 查询 $!{table.comment}
	 */
	@GetMapping("/list")
    List<$!{entity}> list($!{entity} $!{table.entityPath});
#end


	/**
	 * 新增 $!{table.comment}
	 */
	@PostMapping("/save")
	boolean save(@Valid @RequestBody $!{entity} $!{table.entityPath});

	/**
	 * 修改 $!{table.comment}
	 */
	@PostMapping("/update")
    boolean update(@Valid @RequestBody $!{entity} $!{table.entityPath});

	/**
	 * 新增或修改 $!{table.comment}
	 */
	@PostMapping("/submit")
    boolean submit(@Valid @RequestBody $!{entity} $!{table.entityPath});

	#if($!{superEntityClass})

	/**
	 * 删除 $!{table.comment}
	 */
	@PostMapping("/remove")
    boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids);

	#else

	/**
	 * 删除 $!{table.comment}
	 */
	@PostMapping("/remove")
    boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids);
	#end

}
