From 0c9485a6bfa88cf667f61779ac562ad5efb88833 Mon Sep 17 00:00:00 2001 From: owen Date: Sun, 10 Sep 2023 23:36:23 +0800 Subject: [PATCH] =?UTF-8?q?infra:=20=E4=BF=AE=E6=AD=A3=20=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=AE=9E=E4=BD=93=E5=88=97=E8=A1=A8=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E4=BC=A0=E5=85=A5=E7=9A=84ID=E9=9B=86=E5=90=88?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E6=97=B6=EF=BC=8C=E4=BC=9A=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/codegen/java/service/serviceImpl.vm | 6 ++++++ 1 file changed, 6 insertions(+) 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 a732039ce..148d1fa41 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 @@ -15,6 +15,9 @@ import ${basePackage}.module.${table.moduleName}.dal.mysql.${table.businessName} import static ${ServiceExceptionUtilClassName}.exception; import static ${basePackage}.module.${table.moduleName}.enums.ErrorCodeConstants.*; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.ListUtil; + /** * ${table.classComment} Service 实现类 * @@ -61,6 +64,9 @@ public class ${table.className}ServiceImpl implements ${table.className}Service @Override public ${table.className}DO get${simpleClassName}(${primaryColumn.javaType} id) { + if (CollUtil.isEmpty(ids)) { + return ListUtil.empty(); + } return ${classNameVar}Mapper.selectById(id); }