Commit a4b485562fc27f69972243823c111f76cea95813
1 parent
dd6be0e5
feat(mybatis): 支持 likeRightIfPresent 条件拼接
Showing
13 changed files
with
21 additions
and
0 deletions
yudao-module-infra/src/main/resources/codegen/java/service/serviceImpl.vm
| 1 | package ${basePackage}.module.${table.moduleName}.service.${table.businessName}; | 1 | package ${basePackage}.module.${table.moduleName}.service.${table.businessName}; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +#set ($hasSubJoinMany = false) | ||
| 5 | +#foreach ($subTable in $subTables) | ||
| 6 | +#if ( $subTable.subJoinMany ) | ||
| 7 | +#set ($hasSubJoinMany = true) | ||
| 8 | +#end | ||
| 9 | +#end | ||
| 10 | +#if ( $subTables && $subTables.size() > 0 && $table.templateType != 11 && $hasSubJoinMany ) | ||
| 11 | +import cn.hutool.core.util.ObjectUtil; | ||
| 12 | +#end | ||
| 4 | import org.springframework.stereotype.Service; | 13 | import org.springframework.stereotype.Service; |
| 5 | import ${jakartaPackage}.annotation.Resource; | 14 | import ${jakartaPackage}.annotation.Resource; |
| 6 | import org.springframework.validation.annotation.Validated; | 15 | import org.springframework.validation.annotation.Validated; |
yudao-module-infra/src/test/resources/codegen/vben5_antd_general_master_inner/java/InfraStudentServiceImpl
| 1 | package cn.iocoder.yudao.module.infra.service.demo; | 1 | package cn.iocoder.yudao.module.infra.service.demo; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.util.ObjectUtil; | ||
| 4 | import org.springframework.stereotype.Service; | 5 | import org.springframework.stereotype.Service; |
| 5 | import jakarta.annotation.Resource; | 6 | import jakarta.annotation.Resource; |
| 6 | import org.springframework.validation.annotation.Validated; | 7 | import org.springframework.validation.annotation.Validated; |
yudao-module-infra/src/test/resources/codegen/vben5_antd_general_master_normal/java/InfraStudentServiceImpl
| 1 | package cn.iocoder.yudao.module.infra.service.demo; | 1 | package cn.iocoder.yudao.module.infra.service.demo; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.util.ObjectUtil; | ||
| 4 | import org.springframework.stereotype.Service; | 5 | import org.springframework.stereotype.Service; |
| 5 | import jakarta.annotation.Resource; | 6 | import jakarta.annotation.Resource; |
| 6 | import org.springframework.validation.annotation.Validated; | 7 | import org.springframework.validation.annotation.Validated; |
yudao-module-infra/src/test/resources/codegen/vben5_antd_schema_master_inner/java/InfraStudentServiceImpl
| 1 | package cn.iocoder.yudao.module.infra.service.demo; | 1 | package cn.iocoder.yudao.module.infra.service.demo; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.util.ObjectUtil; | ||
| 4 | import org.springframework.stereotype.Service; | 5 | import org.springframework.stereotype.Service; |
| 5 | import jakarta.annotation.Resource; | 6 | import jakarta.annotation.Resource; |
| 6 | import org.springframework.validation.annotation.Validated; | 7 | import org.springframework.validation.annotation.Validated; |
yudao-module-infra/src/test/resources/codegen/vben5_antd_schema_master_normal/java/InfraStudentServiceImpl
| 1 | package cn.iocoder.yudao.module.infra.service.demo; | 1 | package cn.iocoder.yudao.module.infra.service.demo; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.util.ObjectUtil; | ||
| 4 | import org.springframework.stereotype.Service; | 5 | import org.springframework.stereotype.Service; |
| 5 | import jakarta.annotation.Resource; | 6 | import jakarta.annotation.Resource; |
| 6 | import org.springframework.validation.annotation.Validated; | 7 | import org.springframework.validation.annotation.Validated; |
yudao-module-infra/src/test/resources/codegen/vben5_ele_general_master_inner/java/InfraStudentServiceImpl
| 1 | package cn.iocoder.yudao.module.infra.service.demo; | 1 | package cn.iocoder.yudao.module.infra.service.demo; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.util.ObjectUtil; | ||
| 4 | import org.springframework.stereotype.Service; | 5 | import org.springframework.stereotype.Service; |
| 5 | import jakarta.annotation.Resource; | 6 | import jakarta.annotation.Resource; |
| 6 | import org.springframework.validation.annotation.Validated; | 7 | import org.springframework.validation.annotation.Validated; |
yudao-module-infra/src/test/resources/codegen/vben5_ele_general_master_normal/java/InfraStudentServiceImpl
| 1 | package cn.iocoder.yudao.module.infra.service.demo; | 1 | package cn.iocoder.yudao.module.infra.service.demo; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.util.ObjectUtil; | ||
| 4 | import org.springframework.stereotype.Service; | 5 | import org.springframework.stereotype.Service; |
| 5 | import jakarta.annotation.Resource; | 6 | import jakarta.annotation.Resource; |
| 6 | import org.springframework.validation.annotation.Validated; | 7 | import org.springframework.validation.annotation.Validated; |
yudao-module-infra/src/test/resources/codegen/vben5_ele_schema_master_inner/java/InfraStudentServiceImpl
| 1 | package cn.iocoder.yudao.module.infra.service.demo; | 1 | package cn.iocoder.yudao.module.infra.service.demo; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.util.ObjectUtil; | ||
| 4 | import org.springframework.stereotype.Service; | 5 | import org.springframework.stereotype.Service; |
| 5 | import jakarta.annotation.Resource; | 6 | import jakarta.annotation.Resource; |
| 6 | import org.springframework.validation.annotation.Validated; | 7 | import org.springframework.validation.annotation.Validated; |
yudao-module-infra/src/test/resources/codegen/vben5_ele_schema_master_normal/java/InfraStudentServiceImpl
| 1 | package cn.iocoder.yudao.module.infra.service.demo; | 1 | package cn.iocoder.yudao.module.infra.service.demo; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.util.ObjectUtil; | ||
| 4 | import org.springframework.stereotype.Service; | 5 | import org.springframework.stereotype.Service; |
| 5 | import jakarta.annotation.Resource; | 6 | import jakarta.annotation.Resource; |
| 6 | import org.springframework.validation.annotation.Validated; | 7 | import org.springframework.validation.annotation.Validated; |
yudao-module-infra/src/test/resources/codegen/vue2_master_inner/java/InfraStudentServiceImpl
| 1 | package cn.iocoder.yudao.module.infra.service.demo; | 1 | package cn.iocoder.yudao.module.infra.service.demo; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.util.ObjectUtil; | ||
| 4 | import org.springframework.stereotype.Service; | 5 | import org.springframework.stereotype.Service; |
| 5 | import jakarta.annotation.Resource; | 6 | import jakarta.annotation.Resource; |
| 6 | import org.springframework.validation.annotation.Validated; | 7 | import org.springframework.validation.annotation.Validated; |
yudao-module-infra/src/test/resources/codegen/vue2_master_normal/java/InfraStudentServiceImpl
| 1 | package cn.iocoder.yudao.module.infra.service.demo; | 1 | package cn.iocoder.yudao.module.infra.service.demo; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.util.ObjectUtil; | ||
| 4 | import org.springframework.stereotype.Service; | 5 | import org.springframework.stereotype.Service; |
| 5 | import jakarta.annotation.Resource; | 6 | import jakarta.annotation.Resource; |
| 6 | import org.springframework.validation.annotation.Validated; | 7 | import org.springframework.validation.annotation.Validated; |
yudao-module-infra/src/test/resources/codegen/vue3_master_inner/java/InfraStudentServiceImpl
| 1 | package cn.iocoder.yudao.module.infra.service.demo; | 1 | package cn.iocoder.yudao.module.infra.service.demo; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.util.ObjectUtil; | ||
| 4 | import org.springframework.stereotype.Service; | 5 | import org.springframework.stereotype.Service; |
| 5 | import jakarta.annotation.Resource; | 6 | import jakarta.annotation.Resource; |
| 6 | import org.springframework.validation.annotation.Validated; | 7 | import org.springframework.validation.annotation.Validated; |
yudao-module-infra/src/test/resources/codegen/vue3_master_normal/java/InfraStudentServiceImpl
| 1 | package cn.iocoder.yudao.module.infra.service.demo; | 1 | package cn.iocoder.yudao.module.infra.service.demo; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.collection.CollUtil; | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.hutool.core.util.ObjectUtil; | ||
| 4 | import org.springframework.stereotype.Service; | 5 | import org.springframework.stereotype.Service; |
| 5 | import jakarta.annotation.Resource; | 6 | import jakarta.annotation.Resource; |
| 6 | import org.springframework.validation.annotation.Validated; | 7 | import org.springframework.validation.annotation.Validated; |