diff --git a/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/test/TestDemoMapper.java b/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/test/TestDemoMapper.java index 130090466..7b7dd315a 100755 --- a/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/test/TestDemoMapper.java +++ b/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/test/TestDemoMapper.java @@ -40,4 +40,6 @@ public interface TestDemoMapper extends BaseMapperX { .orderByDesc(TestDemoDO::getId)); } + List selectList2(); + } diff --git a/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java b/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java index 023648f0c..8fb104318 100644 --- a/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java +++ b/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenEngine.java @@ -69,6 +69,7 @@ public class CodegenEngine { javaModuleImplMainFilePath("dal/dataobject/${table.businessName}/${table.className}DO")) .put(javaTemplatePath("dal/mapper"), javaModuleImplMainFilePath("dal/mysql/${table.businessName}/${table.className}Mapper")) + .put(javaTemplatePath("dal/mapper.xml"), mapperXmlFilePath()) .put(javaTemplatePath("service/serviceImpl"), javaModuleImplMainFilePath("service/${table.businessName}/${table.className}ServiceImpl")) .put(javaTemplatePath("service/service"), @@ -213,6 +214,12 @@ public class CodegenEngine { "src/" + src + "/java/${basePackage}/module/${table.moduleName}/" + path + ".java"; } + private static String mapperXmlFilePath() { + return "yudao-module-${table.moduleName}/" + // 顶级模块 + "yudao-module-${table.moduleName}-impl/" + // 子模块 + "src/resources/mapper/${table.businessName}/${table.className}Mapper.xml"; + } + private static String vueTemplatePath(String path) { return "codegen/vue/" + path + ".vm"; } diff --git a/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/service/test/TestDemoServiceImpl.java b/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/service/test/TestDemoServiceImpl.java index 23585312d..3014ad464 100755 --- a/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/service/test/TestDemoServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/service/test/TestDemoServiceImpl.java @@ -74,6 +74,7 @@ public class TestDemoServiceImpl implements TestDemoService { @Override public PageResult getTestDemoPage(TestDemoPageReqVO pageReqVO) { +// testDemoMapper.selectList2(); return testDemoMapper.selectPage(pageReqVO); } diff --git a/yudao-module-infra/yudao-module-infra-impl/src/main/resources/codegen/java/dal/mapper.xml.vm b/yudao-module-infra/yudao-module-infra-impl/src/main/resources/codegen/java/dal/mapper.xml.vm new file mode 100644 index 000000000..d930db916 --- /dev/null +++ b/yudao-module-infra/yudao-module-infra-impl/src/main/resources/codegen/java/dal/mapper.xml.vm @@ -0,0 +1,12 @@ + + + + + + + diff --git a/yudao-module-infra/yudao-module-infra-impl/src/main/resources/mapper/test/TestDemoMapper.xml b/yudao-module-infra/yudao-module-infra-impl/src/main/resources/mapper/test/TestDemoMapper.xml new file mode 100644 index 000000000..d65f2136f --- /dev/null +++ b/yudao-module-infra/yudao-module-infra-impl/src/main/resources/mapper/test/TestDemoMapper.xml @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/yudao-module-infra/yudao-module-infra-impl/src/main/resources/mapper/占位 b/yudao-module-infra/yudao-module-infra-impl/src/main/resources/mapper/占位 new file mode 100644 index 000000000..e69de29bb diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsCodeServiceImpl.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsCodeServiceImpl.java index c1d366584..63aa4b8a3 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsCodeServiceImpl.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsCodeServiceImpl.java @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.system.service.sms; import cn.hutool.core.lang.Assert; import cn.hutool.core.map.MapUtil; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.yudao.module.member.api.user.MemberUserApi; import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeCheckReqDTO; import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeSendReqDTO; import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeUseReqDTO; @@ -11,7 +10,6 @@ import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsCodeDO; import cn.iocoder.yudao.module.system.dal.mysql.sms.SmsCodeMapper; import cn.iocoder.yudao.module.system.enums.sms.SmsSceneEnum; import cn.iocoder.yudao.module.system.framework.sms.SmsCodeProperties; -import cn.iocoder.yudao.module.system.service.user.AdminUserService; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated;