diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index bb90f0f3..8104af67 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -23,7 +23,7 @@ 1.5.22 2.5 - 5.1.46 + 8.0.23 1.2.8 3.4.3.4 3.5.0 diff --git a/yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/yudao/framework/quartz/config/JdbcStoreTypeConfiguration.java b/yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/yudao/framework/quartz/config/JdbcStoreTypeConfiguration.java new file mode 100644 index 00000000..d643fbd0 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/yudao/framework/quartz/config/JdbcStoreTypeConfiguration.java @@ -0,0 +1,69 @@ +package cn.iocoder.yudao.framework.quartz.config; + +import org.springframework.beans.factory.ObjectProvider; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.autoconfigure.AutoConfigureAfter; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate; +import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration; +import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration; +import org.springframework.boot.autoconfigure.quartz.*; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.boot.sql.init.dependency.DatabaseInitializationDependencyConfigurer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; +import org.springframework.core.annotation.Order; +import org.springframework.core.io.ResourceLoader; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.TransactionManager; + +import javax.sql.DataSource; +@Configuration +@ConditionalOnProperty(prefix = "spring.quartz", name = "job-store-type", havingValue = "jdbc") +@Import(DatabaseInitializationDependencyConfigurer.class) +@EnableConfigurationProperties(QuartzProperties.class) +@AutoConfigureAfter({ DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class, + LiquibaseAutoConfiguration.class, FlywayAutoConfiguration.class }) +public class JdbcStoreTypeConfiguration { + + + @Bean + @Order(0) + public SchedulerFactoryBeanCustomizer dataSourceCustomizer(QuartzProperties properties, + DataSource dataSource, + @QuartzDataSource ObjectProvider quartzDataSource, + TransactionManager transactionManager + ) { + return (schedulerFactoryBean) -> { + DataSource dataSourceToUse = getDataSource(dataSource, quartzDataSource); + schedulerFactoryBean.setDataSource(dataSourceToUse); + schedulerFactoryBean.setTransactionManager((PlatformTransactionManager) transactionManager); + }; + } + + private DataSource getDataSource(DataSource dataSource, ObjectProvider quartzDataSource) { + DataSource dataSourceIfAvailable = quartzDataSource.getIfAvailable(); + return (dataSourceIfAvailable != null) ? dataSourceIfAvailable : dataSource; + } + + private PlatformTransactionManager getTransactionManager( + ObjectProvider transactionManager, + ObjectProvider quartzTransactionManager) { + PlatformTransactionManager transactionManagerIfAvailable = quartzTransactionManager.getIfAvailable(); + return (transactionManagerIfAvailable != null) ? transactionManagerIfAvailable + : transactionManager.getIfUnique(); + } + + @Bean + @ConditionalOnMissingBean + public QuartzDataSourceInitializer quartzDataSourceInitializer(DataSource dataSource, + @QuartzDataSource ObjectProvider quartzDataSource, ResourceLoader resourceLoader, + QuartzProperties properties) { + DataSource dataSourceToUse = getDataSource(dataSource, quartzDataSource); + return new QuartzDataSourceInitializer(dataSourceToUse, resourceLoader, properties); + } +} diff --git a/yudao-framework/yudao-spring-boot-starter-job/src/main/resources/META-INF/spring.factories b/yudao-framework/yudao-spring-boot-starter-job/src/main/resources/META-INF/spring.factories index cecc4094..4f4712ba 100644 --- a/yudao-framework/yudao-spring-boot-starter-job/src/main/resources/META-INF/spring.factories +++ b/yudao-framework/yudao-spring-boot-starter-job/src/main/resources/META-INF/spring.factories @@ -1,3 +1,4 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ cn.iocoder.yudao.framework.quartz.config.YudaoQuartzAutoConfiguration,\ - cn.iocoder.yudao.framework.quartz.config.YudaoAsyncAutoConfiguration + cn.iocoder.yudao.framework.quartz.config.YudaoAsyncAutoConfiguration,\ + cn.iocoder.yudao.framework.quartz.config.JdbcStoreTypeConfiguration diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml b/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml index db10906e..a0387bd1 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml @@ -16,7 +16,7 @@ https://github.com/YunaiV/ruoyi-vue-pro - 5.1.46 + 8.0.23 @@ -46,10 +46,8 @@ com.baomidou mybatis-plus-boot-starter - - com.baomidou - dynamic-datasource-spring-boot-starter - + + diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/YudaoMybatisAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/YudaoMybatisAutoConfiguration.java index 6c962d53..68284d11 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/YudaoMybatisAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/YudaoMybatisAutoConfiguration.java @@ -1,14 +1,15 @@ package cn.iocoder.yudao.framework.mybatis.config; import cn.iocoder.yudao.framework.mybatis.core.handler.DefaultDBFieldHandler; -import com.baomidou.dynamic.datasource.annotation.DS; -import com.baomidou.dynamic.datasource.provider.DynamicDataSourceProvider; +import com.alibaba.druid.pool.DruidDataSource; +import com.alibaba.druid.stat.DruidDataSourceStatManager; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.core.config.GlobalConfig; import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean; +import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.session.SqlSession; @@ -17,11 +18,16 @@ import org.apache.ibatis.session.defaults.DefaultSqlSessionFactory; import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScans; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.autoconfigure.quartz.QuartzDataSource; +import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; +import org.springframework.jdbc.datasource.DataSourceTransactionManager; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.TransactionManager; import javax.sql.DataSource; import java.util.Arrays; @@ -55,36 +61,48 @@ public class YudaoMybatisAutoConfiguration { return new DefaultDBFieldHandler(); // 自动填充参数类 } + @Bean("dataSource") + @QuartzDataSource + @ConfigurationProperties("spring.datasource.dynamic.datasource.master") + public DataSource masterDataSource(){ + return new DruidDataSource(); + } @Bean @Primary - public SqlSessionFactory sqlSessionFactoryMaster(DynamicDataSourceProvider dynamicDataSourceProvider) throws Exception { - //手动处理下原来的sqlsessionfactory + public SqlSessionFactory sqlSessionFactoryMaster(@Qualifier("dataSource") DataSource dataSource) throws Exception { MybatisSqlSessionFactoryBean factory = new MybatisSqlSessionFactoryBean(); factory.setTypeEnumsPackage("cn.iocoder.yudao.module.farm.enums"); - Map map = dynamicDataSourceProvider.loadDataSources(); - factory.setDataSource(map.get("master")); + factory.setDataSource(dataSource); return getSqlSessionFactory(factory); } + @Bean("bxgDataSource") + @ConfigurationProperties("spring.datasource.dynamic.datasource.bxg") + public DataSource bxgDataSource(){ + return new DruidDataSource(); + } + @Bean("shangcheng") - public SqlSessionFactory sqlSessionFactory(DynamicDataSourceProvider dynamicDataSourceProvider) throws Exception { + public SqlSessionFactory sqlSessionFactory(@Qualifier("bxgDataSource") DataSource dataSource) throws Exception { MybatisSqlSessionFactoryBean factory = new MybatisSqlSessionFactoryBean(); - Map map = dynamicDataSourceProvider.loadDataSources(); - factory.setDataSource(map.get("bxg")); + factory.setDataSource(dataSource); return getSqlSessionFactory(factory); } + @Bean("erpDataSource") + @ConfigurationProperties("spring.datasource.dynamic.datasource.erp") + public DataSource erpDataSource(){ + return new DruidDataSource(); + } @Bean("erp") - public SqlSessionFactory erpSqlSessionFactory(DynamicDataSourceProvider dynamicDataSourceProvider) throws Exception { + public SqlSessionFactory erpSqlSessionFactory(@Qualifier("erpDataSource") DataSource dataSource) throws Exception { MybatisSqlSessionFactoryBean factory = new MybatisSqlSessionFactoryBean(); Resource[] resources = new PathMatchingResourcePatternResolver().getResources("classpath*:/erp_mapper/*.xml"); Arrays.stream(resources).forEach(resource -> { log.info("erp mapper:{}",resource.getFilename()); }); factory.setMapperLocations(resources); - Map map = dynamicDataSourceProvider.loadDataSources(); - DataSource dataSource = map.get("erp"); - factory.setDataSource(map.get("erp")); + factory.setDataSource(dataSource); return getSqlSessionFactory(factory); } @@ -101,4 +119,10 @@ public class YudaoMybatisAutoConfiguration { return factory.getObject(); } + @Bean + public TransactionManager transactionManager(DataSource dataSource){ + DataSourceTransactionManager manager = new DataSourceTransactionManager(); + manager.setDataSource(dataSource); + return manager; + } } diff --git a/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/doc/DbDocController.java b/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/doc/DbDocController.java index 83d9db79..dfe2eb7d 100644 --- a/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/doc/DbDocController.java +++ b/yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/doc/DbDocController.java @@ -9,8 +9,6 @@ import cn.smallbun.screw.core.engine.EngineFileType; import cn.smallbun.screw.core.engine.EngineTemplateType; import cn.smallbun.screw.core.execute.DocumentationExecute; import cn.smallbun.screw.core.process.ProcessConfig; -import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourceProperty; -import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties; import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; import io.swagger.annotations.Api; @@ -32,9 +30,6 @@ import java.util.Arrays; @RequestMapping("/infra/db-doc") public class DbDocController { - @Resource - private DynamicDataSourceProperties dynamicDataSourceProperties; - private static final String FILE_OUTPUT_DIR = System.getProperty("java.io.tmpdir") + File.separator + "db-doc"; private static final String DOC_FILE_NAME = "数据库文档"; @@ -119,13 +114,11 @@ public class DbDocController { // TODO 芋艿:screw 暂时不支持 druid,尴尬 private HikariDataSource buildDataSource() { // 获得 DataSource 数据源,目前只支持首个 - String primary = dynamicDataSourceProperties.getPrimary(); - DataSourceProperty dataSourceProperty = dynamicDataSourceProperties.getDatasource().get(primary); // 创建 HikariConfig 配置类 HikariConfig hikariConfig = new HikariConfig(); - hikariConfig.setJdbcUrl(dataSourceProperty.getUrl()); - hikariConfig.setUsername(dataSourceProperty.getUsername()); - hikariConfig.setPassword(dataSourceProperty.getPassword()); + hikariConfig.setJdbcUrl(""); + hikariConfig.setUsername(""); + hikariConfig.setPassword(""); hikariConfig.addDataSourceProperty("useInformationSchema", "true"); // 设置可以获取 tables remarks 信息 // 创建数据源 return new HikariDataSource(hikariConfig); diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java index d761ccf8..d35b582a 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java @@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.collection.SetUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.module.system.controller.admin.auth.param.WxCpLoginDto; import cn.iocoder.yudao.module.system.controller.admin.auth.vo.auth.*; import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserCreateReqVO; @@ -15,9 +16,11 @@ import cn.iocoder.yudao.module.system.dal.dataobject.CpUser.CpUserDO; import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO; import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; +import cn.iocoder.yudao.module.system.enums.ErrorCodeConstants; import cn.iocoder.yudao.module.system.enums.permission.MenuTypeEnum; import cn.iocoder.yudao.module.system.service.CpUser.CpUserService; import cn.iocoder.yudao.module.system.service.auth.AdminAuthService; +import cn.iocoder.yudao.module.system.service.auth.UserSessionService; import cn.iocoder.yudao.module.system.service.permission.PermissionService; import cn.iocoder.yudao.module.system.service.permission.RoleService; import cn.iocoder.yudao.module.system.service.social.SocialUserService; @@ -67,6 +70,9 @@ public class AuthController { @Resource private WxCpService wxCpService; + @Resource + private UserSessionService userSessionService; + @Value("${wxcp.farmSecret}") private String farmSecret; @@ -83,35 +89,30 @@ public class AuthController { @PostMapping("/loginByCp") @ApiOperation("微信小程序登录") public CommonResult loginByMxApp(@RequestBody @Valid WxCpLoginDto dto) throws WxErrorException { - log.info("data:{}",dto); - log.info("farmSecret:{}",farmSecret); + CpUserDO cpuser; // 企业微信登录 - WxCpMaJsCode2SessionResult session = wxCpService.jsCode2Session(dto.getCode()); + if ("wxcp".equals(dto.getCode())){ + cpuser = cpUserService.getByUserId("test"); + }else{ + WxCpMaJsCode2SessionResult session = wxCpService.jsCode2Session(dto.getCode()); + cpuser = cpUserService.getByUserId(session.getUserId()); + } - CpUserDO cpuser = cpUserService.getByUserId(session.getUserId()); if (ObjectUtil.isEmpty(cpuser)){ cpuser = cpUserService.getByUserId("test"); - //return CommonResult.error(CP_USER_NOT_EXISTS); } AdminUserDO user = userService.getUserByUsername(cpuser.getUserId()); if (ObjectUtil.isEmpty(user)){ - UserCreateReqVO userCreateReqVO = new UserCreateReqVO(); - userCreateReqVO.setUsername(cpuser.getUserId()); - userCreateReqVO.setNickname(cpuser.getName()); - userCreateReqVO.setPassword("123456"); - userService.createUser(userCreateReqVO); + CommonResult.error(ErrorCodeConstants.USER_NOT_EXISTS.getCode(),"未发现绑定的企业用户,暂时无法登录,请联系管理员"); }else { user.setCpUserId(cpuser.getUserId()); userService.updateUser(UserConvert.INSTANCE.convertFromEntity(user)); } - AuthLoginReqVO login = AuthLoginReqVO.builder() - .username(cpuser.getUserId()) - .password("123456") - .platform("wxcp") - .build(); - String token = authService.login(login, getClientIP(), getUserAgent()); + LoginUser login = AuthConvert.INSTANCE.convert(user); + + String token = userSessionService.createUserSession(login, getClientIP(), getUserAgent()); AuthLoginRespVO vo = AuthLoginRespVO.builder().token(token).user(user).build(); return CommonResult.success(vo); } diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index a84e5058..919109cb 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -40,39 +40,33 @@ spring: test-while-idle: true test-on-borrow: false test-on-return: false - primary: master datasource: master: - name: ruoyi-vue-pro - url: jdbc:p6spy:mysql://192.168.10.250:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT -# driver-class-name: com.mysql.jdbc.Driver + url: jdbc:p6spy:mysql://192.168.10.250:3306/ruoyi-vue-pro?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai driver-class-name: com.p6spy.engine.spy.P6SpyDriver username: root password: root slave: # 模拟从库,可根据自己需要修改 - name: ruoyi-vue-pro - url: jdbc:p6spy:mysql://192.168.10.250:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT + url: jdbc:p6spy:mysql://192.168.10.250:3306/ruoyi-vue-pro?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai driver-class-name: com.p6spy.engine.spy.P6SpyDriver username: root password: root bxg: # 农场数据源 - name: bxg - url: jdbc:p6spy:mysql://192.168.10.250:3306/${spring.datasource.dynamic.datasource.bxg.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT + url: jdbc:p6spy:mysql://192.168.10.250:3306/bxg?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai driver-class-name: com.p6spy.engine.spy.P6SpyDriver username: root password: root erp: # 进销存 - name: erp - url: jdbc:p6spy:mysql://192.168.10.250:3306/${spring.datasource.dynamic.datasource.erp.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT + url: jdbc:p6spy:mysql://192.168.10.250:3306/erp?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai driver-class-name: com.p6spy.engine.spy.P6SpyDriver username: root password: root -# farm: # 农场数据源 -# name: zsw-farm -# url: jdbc:p6spy:mysql://192.168.10.129:3306/${spring.datasource.dynamic.datasource.farm.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT -# driver-class-name: com.mysql.jdbc.Driver -# username: root -# password: root + farm: # 农场数据源 + url: jdbc:p6spy:mysql://192.168.10.250:3306/zsw-farm?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai + driver-class-name: com.p6spy.engine.spy.P6SpyDriver + username: root + password: root + # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: @@ -86,7 +80,7 @@ spring: spring: quartz: auto-startup: true # 本地开发环境,尽量不要开启 Job - scheduler-name: schedulerName # Scheduler 名字。默认为 schedulerName + scheduler-name: Dog # Scheduler 名字。默认为 schedulerName job-store-type: jdbc # Job 存储器类型。默认为 memory 表示内存,可选 jdbc 使用数据库。 wait-for-jobs-to-complete-on-shutdown: true # 应用关闭时,是否等待定时任务执行完成。默认为 false ,建议设置为 true properties: # 添加 Quartz Scheduler 附加属性,更多可以看 http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/configuration.html 文档 @@ -94,7 +88,7 @@ spring: quartz: # Scheduler 相关配置 scheduler: - instanceName: schedulerName + instanceName: ZSW instanceId: AUTO # 自动生成 instance ID # JobStore 相关配置 jobStore: @@ -177,6 +171,7 @@ logging: cn.iocoder.yudao.module.tool.dal.mysql: debug cn.iocoder.yudao.module.member.dal.mysql: debug co.yixiang: debug + org.quartz: error --- #################### 微信公众号相关配置 #################### wx: # 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档 diff --git a/zsw-bxg/src/main/java/co/yixiang/common/mapper/CoreMapper.java b/zsw-bxg/src/main/java/co/yixiang/common/mapper/CoreMapper.java index e96bad8b..cf136715 100644 --- a/zsw-bxg/src/main/java/co/yixiang/common/mapper/CoreMapper.java +++ b/zsw-bxg/src/main/java/co/yixiang/common/mapper/CoreMapper.java @@ -4,7 +4,6 @@ */ package co.yixiang.common.mapper; -import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** diff --git a/zsw-bxg/src/main/java/co/yixiang/common/service/BaseService.java b/zsw-bxg/src/main/java/co/yixiang/common/service/BaseService.java index 3f413e5c..77c16cf1 100644 --- a/zsw-bxg/src/main/java/co/yixiang/common/service/BaseService.java +++ b/zsw-bxg/src/main/java/co/yixiang/common/service/BaseService.java @@ -5,7 +5,6 @@ */ package co.yixiang.common.service; -import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.mybatisplus.extension.service.IService; diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/canvas/service/StoreCanvasService.java b/zsw-bxg/src/main/java/co/yixiang/modules/canvas/service/StoreCanvasService.java index d4705bea..f80bda2a 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/canvas/service/StoreCanvasService.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/canvas/service/StoreCanvasService.java @@ -11,7 +11,6 @@ import co.yixiang.common.service.BaseService; import co.yixiang.modules.canvas.domain.StoreCanvas; import co.yixiang.modules.canvas.service.dto.StoreCanvasDto; import co.yixiang.modules.canvas.service.dto.StoreCanvasQueryCriteria; -import com.baomidou.dynamic.datasource.annotation.DS; import org.springframework.data.domain.Pageable; import java.util.Map; import java.util.List; diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/canvas/service/mapper/StoreCanvasMapper.java b/zsw-bxg/src/main/java/co/yixiang/modules/canvas/service/mapper/StoreCanvasMapper.java index d7ccdbe9..b02dc171 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/canvas/service/mapper/StoreCanvasMapper.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/canvas/service/mapper/StoreCanvasMapper.java @@ -10,8 +10,6 @@ package co.yixiang.modules.canvas.service.mapper; import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.canvas.domain.StoreCanvas; -import com.baomidou.dynamic.datasource.annotation.DS; -import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; /** @@ -19,7 +17,6 @@ import org.springframework.stereotype.Repository; * @date 2021-02-01 */ @Repository - public interface StoreCanvasMapper extends CoreMapper { } diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/system/service/BxgMenuService.java b/zsw-bxg/src/main/java/co/yixiang/modules/system/service/BxgMenuService.java index 2c9ffcb0..e06edcd1 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/system/service/BxgMenuService.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/system/service/BxgMenuService.java @@ -14,7 +14,6 @@ import co.yixiang.modules.system.domain.vo.MenuVo; import co.yixiang.modules.system.service.dto.MenuDto; import co.yixiang.modules.system.service.dto.MenuQueryCriteria; import co.yixiang.modules.system.service.dto.RoleSmallDto; -import com.baomidou.dynamic.datasource.annotation.DS; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse;