service.java.vm 1.52 KB
package ${package.Service}

import ${package.Entity}.${entity};
import ${superServiceClassPackage};
import ${cfg.paging};
import ${cfg.pageParamPath};
import ${cfg.queryVoPath};

/**
 * <p>
 * $!{table.comment} 服务接口
 * </p>
 *
 * @author ${author}
 * @since ${date}
 */
#if(${kotlin})
interface ${table.serviceName} : ${superServiceClass}<${entity}>
#else
public interface ${table.serviceName} extends ${superServiceClass}<${entity}> {
#if(${cfg.generatorStrategy} != 'SIMPLE')
#if(${cfg.generatorStrategy} == 'ALL')

    /**
     * 保存
     *
     * @param ${cfg.entityObjectName}
     * @return
     * @throws Exception
     */
    boolean save${entity}(${entity} ${cfg.entityObjectName}) throws Exception;

    /**
     * 修改
     *
     * @param ${cfg.entityObjectName}
     * @return
     * @throws Exception
     */
    boolean update${entity}(${entity} ${cfg.entityObjectName}) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     * @throws Exception
     */
    boolean delete${entity}(Long id) throws Exception;
#end

        /**
         * 根据ID获取查询对象
         *
         * @param id
         * @return
         * @throws Exception
         */
    ${entity}QueryVo get${entity}ById(Serializable id) throws Exception;

    /**
     * 获取分页对象
     *
     * @param ${cfg.entityObjectName}PageParam
     * @return
     * @throws Exception
     */
    Paging<${entity}QueryVo> get${entity}PageList(${entity}PageParam ${cfg.entityObjectName}PageParam) throws Exception;
#end
}
#end