瀏覽代碼

生成文件模板修改

车车 4 月之前
父節點
當前提交
06e7b8f113

+ 3 - 2
yudao-module-infra/src/main/resources/codegen/java/service/service.vm

@@ -10,13 +10,14 @@ import ${basePackage}.module.${subTable.moduleName}.dal.dataobject.${subTable.bu
 #end
 import ${PageResultClassName};
 import ${PageParamClassName};
+import com.baomidou.mybatisplus.extension.service.IService;
 
 /**
  * ${table.classComment} Service 接口
  *
  * @author ${table.author}
  */
-public interface ${table.className}Service {
+public interface ${table.className}Service extends IService<${table.className}DO> {
 
     /**
      * 创建${table.classComment}
@@ -162,4 +163,4 @@ public interface ${table.className}Service {
 
 #end
 #end
-}
+}

+ 3 - 2
yudao-module-infra/src/main/resources/codegen/java/service/serviceImpl.vm

@@ -28,6 +28,7 @@ import static ${ServiceExceptionUtilClassName}.exception;
 import static ${CollectionUtilsClassName}.convertList;
 import static ${CollectionUtilsClassName}.diffList;
 import static ${basePackage}.module.${table.moduleName}.enums.ErrorCodeConstants.*;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
 /**
  * ${table.classComment} Service 实现类
@@ -36,7 +37,7 @@ import static ${basePackage}.module.${table.moduleName}.enums.ErrorCodeConstants
  */
 @Service
 @Validated
-public class ${table.className}ServiceImpl implements ${table.className}Service {
+public class ${table.className}ServiceImpl extends ServiceImpl<${table.className}Mapper, ${table.className}DO> implements ${table.className}Service {
 
     @Resource
     private ${table.className}Mapper ${classNameVar}Mapper;
@@ -424,4 +425,4 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
 #end
 
 #end
-}
+}