From 6d4bd9e85bba945df3351b9c8bdddaf2bf501dc7 Mon Sep 17 00:00:00 2001 From: Roan Date: Thu, 28 Nov 2024 15:35:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90-?= =?UTF-8?q?=E7=94=9F=E6=88=90=E7=9A=84mapper=E5=92=8Cservice=E4=BD=BF?= =?UTF-8?q?=E7=94=A8mybatis-plus=E5=A2=9E=E5=BC=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/codegen/java/service/service.vm | 3 ++- .../src/main/resources/codegen/java/service/serviceImpl.vm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/service/service.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/service/service.vm index c4ee4f0f6..84d26b235 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/service/service.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/service/service.vm @@ -1,6 +1,7 @@ package ${basePackage}.module.${table.moduleName}.service.${table.businessName}; import java.util.*; +import com.baomidou.mybatisplus.extension.service.IService; import ${jakartaPackage}.validation.*; import ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo.*; import ${basePackage}.module.${table.moduleName}.dal.dataobject.${table.businessName}.${table.className}DO; @@ -16,7 +17,7 @@ import ${PageParamClassName}; * * @author ${table.author} */ -public interface ${table.className}Service { +public interface ${table.className}Service extends IService<${table.className}DO>{ /** * 创建${table.classComment} diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/service/serviceImpl.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/service/serviceImpl.vm index 80bc71b02..4393d8d4a 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/service/serviceImpl.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/service/serviceImpl.vm @@ -4,6 +4,7 @@ import org.springframework.stereotype.Service; import ${jakartaPackage}.annotation.Resource; import org.springframework.validation.annotation.Validated; import org.springframework.transaction.annotation.Transactional; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import java.util.*; import ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo.*; @@ -33,7 +34,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;