package ${package.Service};

import com.orion.lang.define.wrapper.DataGrid;
#foreach($pkg in ${customModuleFilePackages})
import ${pkg}.*;
#end

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * $!{table.comment} 服务类
 *
 * @author ${author}
 * @version ${version}
 * @since ${date}
 */
public interface ${table.serviceName} {

    /**
     * ${apiComment.create}
     *
     * @param request request
     * @return id
     */
    Long create${type}(${type}CreateRequest request);

    /**
     * ${apiComment.updateById}
     *
     * @param request request
     * @return effect
     */
    Integer update${type}ById(${type}UpdateRequest request);

    /**
     * ${apiComment.updateAll}
     *
     * @param query  query
     * @param update update
     * @return effect
     */
    Integer update${type}(${type}QueryRequest query, ${type}UpdateRequest update);

    /**
     * ${apiComment.getById}
     *
     * @param id id
     * @return row
     */
    ${type}VO get${type}ById(Long id);

    /**
     * ${apiComment.getByIdList}
     *
     * @param idList idList
     * @return rows
     */
    List<${type}VO> get${type}ByIdList(List<Long> idList);

    /**
     * ${apiComment.queryList}
     *
     * @param request request
     * @return rows
     */
    List<${type}VO> get${type}List(${type}QueryRequest request);

    #if($meta.enableCache)
    /**
     * ${apiComment.queryListByCache}
     *
     * @return rows
     */
    List<${type}VO> get${type}ListByCache();

    #end
    /**
     * ${apiComment.queryCount}
     *
     * @param request request
     * @return count
     */
    Long get${type}Count(${type}QueryRequest request);

    /**
     * ${apiComment.queryPage}
     *
     * @param request request
     * @return rows
     */
    DataGrid<${type}VO> get${type}Page(${type}QueryRequest request);

    /**
     * ${apiComment.deleteById}
     *
     * @param id id
     * @return effect
     */
    Integer delete${type}ById(Long id);

    /**
     * ${apiComment.batchDelete}
     *
     * @param idList idList
     * @return effect
     */
    Integer delete${type}ByIdList(List<Long> idList);

    /**
     * ${apiComment.deleteAll}
     *
     * @param request request
     * @return effect
     */
    Integer delete${type}(${type}QueryRequest request);

}
