From f2a2c2d4074541b35251c0bc5397717e26c28968 Mon Sep 17 00:00:00 2001 From: konbai <1527468660@qq.com> Date: Fri, 18 Mar 2022 20:38:17 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8Ddemo=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/demo/controller/TestBatchController.java | 4 ++-- .../main/java/com/ruoyi/demo/domain/TestDemo.java | 2 +- script/sql/test.sql | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestBatchController.java b/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestBatchController.java index 1bb9d9fa..aa1f064a 100644 --- a/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestBatchController.java +++ b/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestBatchController.java @@ -45,7 +45,7 @@ public class TestBatchController extends BaseController { List list = new ArrayList<>(); for (int i = 0; i < 1000; i++) { TestDemo testDemo = new TestDemo(); - testDemo.setOrderNum(-1L); + testDemo.setOrderNum(-1); testDemo.setTestKey("批量新增"); testDemo.setValue("测试新增"); list.add(testDemo); @@ -65,7 +65,7 @@ public class TestBatchController extends BaseController { List list = new ArrayList<>(); for (int i = 0; i < 1000; i++) { TestDemo testDemo = new TestDemo(); - testDemo.setOrderNum(-1L); + testDemo.setOrderNum(-1); testDemo.setTestKey("批量新增"); testDemo.setValue("测试新增"); list.add(testDemo); } diff --git a/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/TestDemo.java b/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/TestDemo.java index c079d122..dc19ce2c 100644 --- a/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/TestDemo.java +++ b/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/TestDemo.java @@ -39,7 +39,7 @@ public class TestDemo extends BaseEntity { * 排序号 */ @OrderBy(asc = false, sort = 1) - private Long orderNum; + private Integer orderNum; /** * key键 diff --git a/script/sql/test.sql b/script/sql/test.sql index fd547e73..cfe3add9 100644 --- a/script/sql/test.sql +++ b/script/sql/test.sql @@ -1,9 +1,9 @@ DROP TABLE if EXISTS test_demo; CREATE TABLE test_demo ( - id int(0) NOT NULL COMMENT '主键', - dept_id int(0) NULL DEFAULT NULL COMMENT '部门id', - user_id int(0) NULL DEFAULT NULL COMMENT '用户id', + id bigint(20) NOT NULL COMMENT '主键', + dept_id bigint(20) NULL DEFAULT NULL COMMENT '部门id', + user_id bigint(20) NULL DEFAULT NULL COMMENT '用户id', order_num int(0) NULL DEFAULT 0 COMMENT '排序号', test_key varchar(255) NULL DEFAULT NULL COMMENT 'key键', value varchar(255) NULL DEFAULT NULL COMMENT '值', @@ -19,10 +19,10 @@ CREATE TABLE test_demo DROP TABLE if EXISTS test_tree; CREATE TABLE test_tree ( - id int(0) NOT NULL COMMENT '主键', - parent_id int(0) NULL DEFAULT 0 COMMENT '父id', - dept_id int(0) NULL DEFAULT NULL COMMENT '部门id', - user_id int(0) NULL DEFAULT NULL COMMENT '用户id', + id bigint(20) NOT NULL COMMENT '主键', + parent_id bigint(20) NULL DEFAULT 0 COMMENT '父id', + dept_id bigint(20) NULL DEFAULT NULL COMMENT '部门id', + user_id bigint(20) NULL DEFAULT NULL COMMENT '用户id', tree_name varchar(255) NULL DEFAULT NULL COMMENT '值', version int(0) NULL DEFAULT 0 COMMENT '版本', create_time datetime(0) NULL DEFAULT NULL COMMENT '创建时间',