templates.service.vm Maven / Gradle / Ivy
package $!{package.Service};
import $!{package.Entity}.$!{entity};
import $!{superServiceClassPackage};
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.zj.dreamly.tool.util.PageQuery;
/**
* $!{table.comment} 服务类
*
* @author $!{author}
* @since $!{date}
*/
#if($!{kotlin})
interface $!{table.serviceName} : $!{superServiceClass}<$!{entity}>
#else
public interface $!{table.serviceName} extends $!{superServiceClass}<$!{entity}> {
/**
* 根据id查询$!{table.comment}
*
* @param id 主键id
* @return {@link $!{entity}}
*/
$!{entity} get$!{entity}ById(Long id);
/**
* 分页查询$!{table.comment}
*
* @param query {@link PageQuery}
* @return {@link $!{entity}}
*/
IPage<$!{entity}> get$!{entity}Page(PageQuery query);
/**
* 新增$!{table.comment}
*
* @param $!{table.entityPath} {@link $!{entity}}
*/
void save$!{entity}($!{entity} $!{table.entityPath});
/**
* 修改$!{table.comment}
*
* @param $!{table.entityPath} {@link $!{entity}}
*/
void update$!{entity}ById($!{entity} $!{table.entityPath});
/**
* 删除$!{table.comment}
*
* @param id 主键id
*/
void remove$!{entity}ById(Long id);
}
#end
© 2015 - 2024 Weber Informatics LLC | Privacy Policy