package {{packageName}}.client.{{lowerCase apiEntity.api.codeName}}.feign;

import {{packageName}}.client.{{lowerCase apiEntity.api.codeName}}.feign.dto.{{apiEntity.codeName}}DTO;
import net.ibizsys.central.util.SearchContextDTO;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Collection;
import java.util.List;

/**
 * 实体[{{apiEntity.codeName}}] 服务对象接口
 *
 */
public interface {{apiEntity.codeName}}FeignClient {
{{#each apiEntity.methods}}
    @RequestMapping(method = RequestMethod.{{requestMethod}}, value = "{{requestPath}}")
    {{!行为}}
    {{#eq methodType "DEACTION"}}
    {{#eq return.type "DTO"}}{{apiEntity.codeName}}DTO{{/eq}}{{#eq return.type "DTOS"}}Page<{{apiEntity.codeName}}DTO>{{/eq}}{{#eq return.type "SIMPLE"}}Integer{{/eq}}{{#eq return.type "KEYFIELD"}}{{/eq}}{{#eq return.type "VOID"}}void{{/eq}}{{#eq return.type "USER"}}Object{{/eq}} {{camelCase name}}{{#each pathVariables}}{{#if @first}}By{{else}}And{{/if}}{{pascalCase name}}{{/each}}({{#each pathVariables}}{{#unless @first}}, {{/unless}}@PathVariable("{{camelCase name}}") {{type.java}} {{camelCase name}}{{/each}}{{#if body}}{{#if pathVariables}}, {{/if}}@RequestBody {{#eq input.type "DTO"}}{{body}}{{/eq}}{{#eq input.type "KEYFIELD"}}{{#eq pSDEAction.actionType "USERCUSTOM"}}{{body}}{{/eq}}{{/eq}}{{#eq input.type "DTOS"}}List<{{body}}>{{/eq}} {{#eq input.type "DTO"}}{{camelCase body}}{{/eq}}{{#eq input.type "KEYFIELD"}}{{#eq pSDEAction.actionType "USERCUSTOM"}}{{camelCase body}}{{/eq}}{{/eq}}{{#eq input.type "DTOS"}}list{{/eq}}{{/if}});
    {{/eq}}
    {{!数据集}}
    {{#eq methodType "FETCH"}}
    Page<{{apiEntity.codeName}}DTO> {{camelCase name}}{{#each pathVariables}}{{#if @first}}By{{else}}And{{/if}}{{pascalCase name}}{{/each}}({{#each pathVariables}}{{#unless @first}}, {{/unless}}@PathVariable("{{camelCase name}}") {{type.java}} {{camelCase name}}{{/each}}{{#if body}}{{#if pathVariables}}, {{/if}}@RequestBody SearchContextDTO context{{/if}});
    {{/eq}}
    {{!SELECT法}}
    {{#eq methodType "SELECT"}}
    Page<{{apiEntity.codeName}}DTO> {{camelCase name}}{{#each pathVariables}}{{#if @first}}By{{else}}And{{/if}}{{pascalCase name}}{{/each}}({{#each pathVariables}}{{#unless @first}}, {{/unless}}@PathVariable("{{camelCase name}}") {{type.java}} {{camelCase name}}{{/each}}{{#if body}}{{#if pathVariables}}, {{/if}}@RequestBody SearchContextDTO context{{/if}});
    {{/eq}}

{{/each}}

}