From 932777e9d6dc8dc5d9edbfc9117639ae02d96956 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 14 十月 2021 11:55:07 +0800 Subject: [PATCH] 自动化代码生成优化 --- src/main/resources/generater/service/serviceImpl.template | 17 +++++++---------- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/main/resources/generater/service/serviceImpl.template b/src/main/resources/generater/service/serviceImpl.template index 52e6a13..74e8321 100644 --- a/src/main/resources/generater/service/serviceImpl.template +++ b/src/main/resources/generater/service/serviceImpl.template @@ -1,14 +1,11 @@ package ${packageName}; -import ${entity.clazz}; -import ${dao.clazz}; -import ${service.clazz}; -import ${query.clazz}; -import ${daoQuery.clazz}; -import javax.annotation.Resource; -import org.springframework.stereotype.Service; -import java.util.Date; -import org.yeshi.utils.bean.BeanUtil; +<#list importList as import> +import ${import}; +</#list> + +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; @Service public class ${service.name}Impl implements ${service.name}{ @@ -17,7 +14,7 @@ private ${dao.name} ${dao.name?uncap_first}; <#list metodInfoList as method> - ${method.visiteAccess} ${method.returnType} ${method.name}(${method.params}){ + ${method.visiteAccess} ${method.returnType} ${method.name}(${method.params}) <#if method.exceptions??> throws ${method.exceptions}</#if> { ${method.content} } -- Gitblit v1.8.0