Incorrect table definition; there can be only one auto column and it must be defined as a key 解决办法
. ____ _ __ _ _
/\\ / ___‘_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | ‘_ | ‘_| | ‘_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
‘ |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.3.RELEASE)
{com.gildata.threebody.tbm.dao.mapper.middleground.HwNewsInfoMapper.selectById} Has been loaded by XML or SqlProvider, ignoring the injection of the SQL.
2021-01-07 20:44:10.193|ERROR|main|64|liquibase liquibase/*.xml: classpath:liquibase/*.xml:
Change Set classpath:liquibase/*.xml:
:malin failed. Error: Incorrect table definition; there can be only one auto column and it must be defined as a key [Failed SQL: CREATE TABLE npp.npp_event_tags (id BIGINT AUTO_INCREMENT NULL COMMENT ‘主键id’, event_id BIGINT NULL COMMENT ‘事件id’, category_code VARCHAR(100) NULL COMMENT ‘标签类别编码’, category_name VARCHAR(200) NULL COMMENT ‘标签类别编码名称’, tag_name VARCHAR(64) NULL COMMENT ‘标签名称’, tag_weight DOUBLE NULL COMMENT ‘标签权重’, business_id VARCHAR(100) NULL COMMENT ‘标签业务id’, match_key VARCHAR(200) NULL COMMENT ‘标签匹配的关键字’, frequency INT NULL COMMENT ‘标签频次’, ned_type TINYINT NULL COMMENT ‘是否消岐识别 0否1是’, main TINYINT DEFAULT 0 NULL COMMENT ‘主体标识,1:是,0:否’, news_id BIGINT NULL COMMENT ‘舆情资讯id’, main_basis VARCHAR(1000) NULL COMMENT ‘主体依据’, business_code VARCHAR(100) NULL COMMENT ‘标签编码’, ai_create TINYINT NULL COMMENT ‘1AI打标,2人工新增’, enable TINYINT DEFAULT 0 NULL COMMENT ‘逻辑删除标志位1:逻辑删除’, update_time timestamp DEFAULT NOW() ON UPDATE NOW() NULL COMMENT ‘更新时间’, create_time timestamp DEFAULT NOW() NULL COMMENT ‘创建时间’) COMMENT=’舆情事件的标签表’]
2021-01-07 20:44:12.860|ERROR|main|842|o.s.boot.SpringApplication :Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘liquibase’ defined in file [E:\workcode\doubleCOde\three-body-audit\tbm-compose\tbm-dao\target\classes\spring\spring-mybatis.xml]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set classpath:liquibase/*.xml:
Reason: liquibase.exception.DatabaseException: Incorrect table definition; there can be only one auto column and it must be defined as a key [Failed SQL: CREATE TABLE npp.npp_event_tags (id BIGINT AUTO_INCREMENT NULL COMMENT ‘主键id’, event_id BIGINT NULL COMMENT ‘事件id’, category_code VARCHAR(100) NULL COMMENT ‘标签类别编码’, category_name VARCHAR(200) NULL COMMENT ‘标签类别编码名称’, tag_name VARCHAR(64) NULL COMMENT ‘标签名称’, tag_weight DOUBLE NULL COMMENT ‘标签权重’, business_id VARCHAR(100) NULL COMMENT ‘标签业务id’, match_key VARCHAR(200) NULL COMMENT ‘标签匹配的关键字’, frequency INT NULL COMMENT ‘标签频次’, ned_type TINYINT NULL COMMENT ‘是否消岐识别 0否1是’, main TINYINT DEFAULT 0 NULL COMMENT ‘主体标识,1:是,0:否’, news_id BIGINT NULL COMMENT ‘舆情资讯id’, main_basis VARCHAR(1000) NULL COMMENT ‘主体依据’, business_code VARCHAR(100) NULL COMMENT ‘标签编码’, ai_create TINYINT NULL COMMENT ‘1AI打标,2人工新增’, enable TINYINT DEFAULT 0 NULL COMMENT ‘逻辑删除标志位1:逻辑删除’, update_time timestamp DEFAULT NOW() ON UPDATE NOW() NULL COMMENT ‘更新时间’, create_time timestamp DEFAULT NOW() NULL COMMENT ‘创建时间’) COMMENT=’舆情事件的标签表’]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1708)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
at com.gildata.threebody.tbm.starter.bootstrap.Application.main(Application.java:27)
Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set classpath:liquibase/*.xml:
Reason: liquibase.exception.DatabaseException: Incorrect table definition; there can be only one auto column and it must be defined as a key [Failed SQL: CREATE TABLE npp.npp_event_tags (id BIGINT AUTO_INCREMENT NULL COMMENT ‘主键id’, event_id BIGINT NULL COMMENT ‘事件id’, category_code VARCHAR(100) NULL COMMENT ‘标签类别编码’, category_name VARCHAR(200) NULL COMMENT ‘标签类别编码名称’, tag_name VARCHAR(64) NULL COMMENT ‘标签名称’, tag_weight DOUBLE NULL COMMENT ‘标签权重’, business_id VARCHAR(100) NULL COMMENT ‘标签业务id’, match_key VARCHAR(200) NULL COMMENT ‘标签匹配的关键字’, frequency INT NULL COMMENT ‘标签频次’, ned_type TINYINT NULL COMMENT ‘是否消岐识别 0否1是’, main TINYINT DEFAULT 0 NULL COMMENT ‘主体标识,1:是,0:否’, news_id BIGINT NULL COMMENT ‘舆情资讯id’, main_basis VARCHAR(1000) NULL COMMENT ‘主体依据’, business_code VARCHAR(100) NULL COMMENT ‘标签编码’, ai_create TINYINT NULL COMMENT ‘1AI打标,2人工新增’, enable TINYINT DEFAULT 0 NULL COMMENT ‘逻辑删除标志位1:逻辑删除’, update_time timestamp DEFAULT NOW() ON UPDATE NOW() NULL COMMENT ‘更新时间’, create_time timestamp DEFAULT NOW() NULL COMMENT ‘创建时间’) COMMENT=’舆情事件的标签表’]
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:619)
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:79)
at liquibase.Liquibase.update(Liquibase.java:214)
at liquibase.Liquibase.update(Liquibase.java:192)
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:431)
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:388)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1767)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1704)
… 14 common frames omitted
Caused by: liquibase.exception.DatabaseException: Incorrect table definition; there can be only one auto column and it must be defined as a key [Failed SQL: CREATE TABLE npp.npp_event_tags (id BIGINT AUTO_INCREMENT NULL COMMENT ‘主键id’, event_id BIGINT NULL COMMENT ‘事件id’, category_code VARCHAR(100) NULL COMMENT ‘标签类别编码’, category_name VARCHAR(200) NULL COMMENT ‘标签类别编码名称’, tag_name VARCHAR(64) NULL COMMENT ‘标签名称’, tag_weight DOUBLE NULL COMMENT ‘标签权重’, business_id VARCHAR(100) NULL COMMENT ‘标签业务id’, match_key VARCHAR(200) NULL COMMENT ‘标签匹配的关键字’, frequency INT NULL COMMENT ‘标签频次’, ned_type TINYINT NULL COMMENT ‘是否消岐识别 0否1是’, main TINYINT DEFAULT 0 NULL COMMENT ‘主体标识,1:是,0:否’, news_id BIGINT NULL COMMENT ‘舆情资讯id’, main_basis VARCHAR(1000) NULL COMMENT ‘主体依据’, business_code VARCHAR(100) NULL COMMENT ‘标签编码’, ai_create TINYINT NULL COMMENT ‘1AI打标,2人工新增’, enable TINYINT DEFAULT 0 NULL COMMENT ‘逻辑删除标志位1:逻辑删除’, update_time timestamp DEFAULT NOW() ON UPDATE NOW() NULL COMMENT ‘更新时间’, create_time timestamp DEFAULT NOW() NULL COMMENT ‘创建时间’) COMMENT=’舆情事件的标签表’]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:309)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:113)
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1277)
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1259)
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:582)
… 22 common frames omitted
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Incorrect table definition; there can be only one auto column and it must be defined as a key
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3976)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2482)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2440)
at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:845)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:745)
at com.alibaba.druid.filter.FilterChainImpl.statement_execute(FilterChainImpl.java:2958)
at com.alibaba.druid.filter.FilterAdapter.statement_execute(FilterAdapter.java:2473)
at com.alibaba.druid.filter.FilterEventAdapter.statement_execute(FilterEventAdapter.java:188)
at com.alibaba.druid.filter.FilterChainImpl.statement_execute(FilterChainImpl.java:2956)
at com.alibaba.druid.proxy.jdbc.StatementProxyImpl.execute(StatementProxyImpl.java:147)
at com.alibaba.druid.pool.DruidPooledStatement.execute(DruidPooledStatement.java:619)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:307)
… 27 common frames omitted
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘liquibase’ defined in file [E:\workcode\doubleCOde\three-body-audit\tbm-compose\tbm-dao\target\classes\spring\spring-mybatis.xml]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set classpath:liquibase/*.xml:
Reason: liquibase.exception.DatabaseException: Incorrect table definition; there can be only one auto column and it must be defined as a key [Failed SQL: CREATE TABLE npp.npp_event_tags (id BIGINT AUTO_INCREMENT NULL COMMENT ‘主键id’, event_id BIGINT NULL COMMENT ‘事件id’, category_code VARCHAR(100) NULL COMMENT ‘标签类别编码’, category_name VARCHAR(200) NULL COMMENT ‘标签类别编码名称’, tag_name VARCHAR(64) NULL COMMENT ‘标签名称’, tag_weight DOUBLE NULL COMMENT ‘标签权重’, business_id VARCHAR(100) NULL COMMENT ‘标签业务id’, match_key VARCHAR(200) NULL COMMENT ‘标签匹配的关键字’, frequency INT NULL COMMENT ‘标签频次’, ned_type TINYINT NULL COMMENT ‘是否消岐识别 0否1是’, main TINYINT DEFAULT 0 NULL COMMENT ‘主体标识,1:是,0:否’, news_id BIGINT NULL COMMENT ‘舆情资讯id’, main_basis VARCHAR(1000) NULL COMMENT ‘主体依据’, business_code VARCHAR(100) NULL COMMENT ‘标签编码’, ai_create TINYINT NULL COMMENT ‘1AI打标,2人工新增’, enable TINYINT DEFAULT 0 NULL COMMENT ‘逻辑删除标志位1:逻辑删除’, update_time timestamp DEFAULT NOW() ON UPDATE NOW() NULL COMMENT ‘更新时间’, create_time timestamp DEFAULT NOW() NULL COMMENT ‘创建时间’) COMMENT=’舆情事件的标签表’]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1708)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
at com.gildata.threebody.tbm.starter.bootstrap.Application.main(Application.java:27)
Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set classpath:liquibase/*.xml:
Reason: liquibase.exception.DatabaseException: Incorrect table definition; there can be only one auto column and it must be defined as a key [Failed SQL: CREATE TABLE npp.npp_event_tags (id BIGINT AUTO_INCREMENT NULL COMMENT ‘主键id’, event_id BIGINT NULL COMMENT ‘事件id’, category_code VARCHAR(100) NULL COMMENT ‘标签类别编码’, category_name VARCHAR(200) NULL COMMENT ‘标签类别编码名称’, tag_name VARCHAR(64) NULL COMMENT ‘标签名称’, tag_weight DOUBLE NULL COMMENT ‘标签权重’, business_id VARCHAR(100) NULL COMMENT ‘标签业务id’, match_key VARCHAR(200) NULL COMMENT ‘标签匹配的关键字’, frequency INT NULL COMMENT ‘标签频次’, ned_type TINYINT NULL COMMENT ‘是否消岐识别 0否1是’, main TINYINT DEFAULT 0 NULL COMMENT ‘主体标识,1:是,0:否’, news_id BIGINT NULL COMMENT ‘舆情资讯id’, main_basis VARCHAR(1000) NULL COMMENT ‘主体依据’, business_code VARCHAR(100) NULL COMMENT ‘标签编码’, ai_create TINYINT NULL COMMENT ‘1AI打标,2人工新增’, enable TINYINT DEFAULT 0 NULL COMMENT ‘逻辑删除标志位1:逻辑删除’, update_time timestamp DEFAULT NOW() ON UPDATE NOW() NULL COMMENT ‘更新时间’, create_time timestamp DEFAULT NOW() NULL COMMENT ‘创建时间’) COMMENT=’舆情事件的标签表’]
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:619)
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:79)
at liquibase.Liquibase.update(Liquibase.java:214)
at liquibase.Liquibase.update(Liquibase.java:192)
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:431)
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:388)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1767)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1704)
… 14 more
Caused by: liquibase.exception.DatabaseException: Incorrect table definition; there can be only one auto column and it must be defined as a key [Failed SQL: CREATE TABLE npp.npp_event_tags (id BIGINT AUTO_INCREMENT NULL COMMENT ‘主键id’, event_id BIGINT NULL COMMENT ‘事件id’, category_code VARCHAR(100) NULL COMMENT ‘标签类别编码’, category_name VARCHAR(200) NULL COMMENT ‘标签类别编码名称’, tag_name VARCHAR(64) NULL COMMENT ‘标签名称’, tag_weight DOUBLE NULL COMMENT ‘标签权重’, business_id VARCHAR(100) NULL COMMENT ‘标签业务id’, match_key VARCHAR(200) NULL COMMENT ‘标签匹配的关键字’, frequency INT NULL COMMENT ‘标签频次’, ned_type TINYINT NULL COMMENT ‘是否消岐识别 0否1是’, main TINYINT DEFAULT 0 NULL COMMENT ‘主体标识,1:是,0:否’, news_id BIGINT NULL COMMENT ‘舆情资讯id’, main_basis VARCHAR(1000) NULL COMMENT ‘主体依据’, business_code VARCHAR(100) NULL COMMENT ‘标签编码’, ai_create TINYINT NULL COMMENT ‘1AI打标,2人工新增’, enable TINYINT DEFAULT 0 NULL COMMENT ‘逻辑删除标志位1:逻辑删除’, update_time timestamp DEFAULT NOW() ON UPDATE NOW() NULL COMMENT ‘更新时间’, create_time timestamp DEFAULT NOW() NULL COMMENT ‘创建时间’) COMMENT=’舆情事件的标签表’]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:309)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:113)
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1277)
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1259)
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:582)
… 22 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Incorrect table definition; there can be only one auto column and it must be defined as a key
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3976)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2482)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2440)
at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:845)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:745)
at com.alibaba.druid.filter.FilterChainImpl.statement_execute(FilterChainImpl.java:2958)
at com.alibaba.druid.filter.FilterAdapter.statement_execute(FilterAdapter.java:2473)
at com.alibaba.druid.filter.FilterEventAdapter.statement_execute(FilterEventAdapter.java:188)
at com.alibaba.druid.filter.FilterChainImpl.statement_execute(FilterChainImpl.java:2956)
at com.alibaba.druid.proxy.jdbc.StatementProxyImpl.execute(StatementProxyImpl.java:147)
at com.alibaba.druid.pool.DruidPooledStatement.execute(DruidPooledStatement.java:619)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:307)
… 27 more
{com.gildata.threebody.tbm.dao.mapper.middleground.HwNewsInfoMapper.selectById} Has been loaded by XML or SqlProvider, ignoring the injection of the SQL.
主要是设置主键唯一性默认,自增,非空,下面这句定义是不可行的。
<addPrimaryKey columnNames="id,create_time" constraintName="pk_id_create_time" tableName="npp_event_tags"/>
改成id主键,
<column name="id" type="BIGINT" autoIncrement="true" remarks="主键id" > <constraints primaryKey="true" nullable="false"/> </column>
create_time不做主键,做索引
<createIndex indexName="index_create_time" tableName="npp_event_tags"> <column name="create_time"/> </createIndex>
还没有评论,来说两句吧...