diff --git a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/eve/eitity/dict/SysDictTypeMation.java b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/eve/eitity/dict/SysDictTypeMation.java index f9005259..72f696ce 100644 --- a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/eve/eitity/dict/SysDictTypeMation.java +++ b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/eve/eitity/dict/SysDictTypeMation.java @@ -5,6 +5,7 @@ package com.skyeye.eve.eitity.dict; import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.skyeye.annotation.api.ApiModel; import com.skyeye.annotation.api.ApiModelProperty; @@ -26,7 +27,7 @@ import java.io.Serializable; @ApiModel("数据字典类型实体类") public class SysDictTypeMation extends CommonOperatorUserInfo implements Serializable { - @TableField("id") + @TableId("id") private String id; @TableField("dict_name") diff --git a/skyeye-promote/skyeye-web/src/main/java/com/skyeye/db/config/BaseDataSourceConfig.java b/skyeye-promote/skyeye-web/src/main/java/com/skyeye/db/config/BaseDataSourceConfig.java index 3da181fa..9e6cdd4f 100644 --- a/skyeye-promote/skyeye-web/src/main/java/com/skyeye/db/config/BaseDataSourceConfig.java +++ b/skyeye-promote/skyeye-web/src/main/java/com/skyeye/db/config/BaseDataSourceConfig.java @@ -4,6 +4,7 @@ package com.skyeye.db.config; +import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean; import com.skyeye.exception.CustomException; import org.apache.commons.collections.CollectionUtils; import org.apache.ibatis.session.SqlSessionFactory; @@ -109,18 +110,18 @@ public class BaseDataSourceConfig { @Primary @Bean(name = "baseSqlSessionFactory") public SqlSessionFactory baseSqlSessionFactory(@Qualifier("baseDataSource") DataSource dataSource) throws Exception { - SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean(); + MybatisSqlSessionFactoryBean mybatisSqlSessionFactoryBean = new MybatisSqlSessionFactoryBean(); - sqlSessionFactoryBean.setDataSource(dataSource); + mybatisSqlSessionFactoryBean.setDataSource(dataSource); String databaseType = this.initDatabaseType(dataSource); if (databaseType == null) { throw new CustomException("couldn't deduct database type"); } else { try { // 添加XML目录 - sqlSessionFactoryBean.setMapperLocations(resolveMapperLocations()); - sqlSessionFactoryBean.afterPropertiesSet(); - return sqlSessionFactoryBean.getObject(); + mybatisSqlSessionFactoryBean.setMapperLocations(resolveMapperLocations()); + mybatisSqlSessionFactoryBean.afterPropertiesSet(); + return mybatisSqlSessionFactoryBean.getObject(); } catch (Exception var5) { throw new CustomException("Could not create sqlSessionFactory", var5); }