24282 11 tháng trước cách đây
mục cha
commit
2b54cff76d

+ 3 - 7
jy-generator/src/main/resources/templates/controller.java.btl

@@ -9,9 +9,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 <% if(isNotEmpty(superControllerClassPackage)){ %>
 import ${superControllerClassPackage};
 <% } %>
-<% if(isNotEmpty(controllerMethods.detail) || isNotEmpty(controllerMethods.delete)){ %>
-import base.model.com.jy.framework.BaseSelectDto;
-<% } %>
 <% if(isNotEmpty(controllerMethods.create) || isNotEmpty(controllerMethods.update)){ %>
 import ${entityPath}.dto.${table.entityName}Dto;
 <% } %>
@@ -19,13 +16,14 @@ import ${entityPath}.dto.${table.entityName}Dto;
 import ${entityPath}.dto.${table.entityName}SelectDto;
 import ${entityPath}.vo.${table.entityName}Vo;
 <% } %>
-<% if(isNotEmpty(controllerMethods.hasMethod)){  %>
 import ${package.Service}.${table.serviceName};
+<% if(isNotEmpty(controllerMethods.detail) || isNotEmpty(controllerMethods.delete)){ %>
+import com.jy.framework.model.base.BaseSelectDto;
+<% } %>
 import jakarta.annotation.Resource;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
-<% } %>
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 <% if(isNotEmpty(controllerMethods.list)){  %>
@@ -44,11 +42,9 @@ import java.util.List;
 @RestController
 @RequestMapping("/${table.entityPath}")
 public class ${table.controllerName} {
-<% if(isNotEmpty(controllerMethods.hasMethod)){  %>
 
     @Resource
     private ${table.serviceName} ${serviceInstanceName};
-<% } %>
 
 <% if(isNotEmpty(controllerMethods.list)){  %>
     /**

+ 1 - 1
jy-generator/src/main/resources/templates/dao.java.btl

@@ -4,12 +4,12 @@
 package ${daoPath};
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import base.model.com.jy.framework.BaseDao;
 import ${package.Mapper}.${table.mapperName};
 import ${entityPath}.dto.${table.entityName}SelectDto;
 import ${package.Entity}.${entity};
 import ${entityPath}.table.${entity}Table;
 import ${entityPath}.vo.${table.entityName}Vo;
+import com.jy.framework.model.base.BaseDao;
 import org.springframework.stereotype.Service;
 
 <% if(isNotEmpty(controllerMethods.list)){  %>

+ 1 - 1
jy-generator/src/main/resources/templates/selectDto.java.btl

@@ -1,6 +1,6 @@
 package ${entityPath}.dto;
 
-import base.model.com.jy.framework.BaseSelectDto;
+import com.jy.framework.model.base.BaseSelectDto;
 import lombok.Getter;
 import lombok.Setter;
 

+ 3 - 3
jy-generator/src/main/resources/templates/serviceImpl.java.btl

@@ -9,9 +9,6 @@ package ${package.ServiceImpl};
 <% if(isNotEmpty(controllerMethods.page)){  %>
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 <% } %>
-<% if(isNotEmpty(controllerMethods.detail)){ %>
-import utils.com.jy.framework.AssertUtil;
-<% } %>
 import ${daoPath}.${table.entityName}Dao;
 <% if(isNotEmpty(controllerMethods.create) || isNotEmpty(controllerMethods.update)){ %>
 import ${entityPath}.dto.${table.entityName}Dto;
@@ -25,6 +22,9 @@ import ${entityPath}.vo.${table.entityName}Vo;
 <% if(table.serviceInterface){ %>
 import ${package.Service}.${table.serviceName};
 <% } %>
+<% if(isNotEmpty(controllerMethods.detail)){ %>
+import com.jy.framework.utils.AssertUtil;
+<% } %>
 import jakarta.annotation.Resource;
 import org.springframework.stereotype.Service;
 <% if(isNotEmpty(controllerMethods.delete)){  %>

+ 2 - 2
jy-generator/src/main/resources/templates/table.java.btl

@@ -3,9 +3,9 @@
 %>
 package ${entityPath}.table;
 
-import join.mybatis.com.jy.framework.QueryColumn;
-import join.mybatis.com.jy.framework.Table;
 import ${package.Entity}.${entity};
+import com.jy.framework.mybatis.join.QueryColumn;
+import com.jy.framework.mybatis.join.Table;
 
 public class ${entity}Table extends Table<${entity}> {