From 2f0b6462dc65c54e5d1e6d480250e34401ccb077 Mon Sep 17 00:00:00 2001 From: liding <756868258@qq.com> Date: 星期四, 08 五月 2025 11:00:08 +0800 Subject: [PATCH] 客户档案完善 --- /dev/null | 91 --------------- src/main/java/com/ruoyi/basic/pojo/Customer.java | 157 ++++++-------------------- src/main/java/com/ruoyi/basic/controller/CustomerController.java | 40 +++--- src/main/java/com/ruoyi/basic/service/ICustomerService.java | 8 - pom.xml | 2 src/main/resources/application.yml | 5 src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java | 33 +++- 7 files changed, 84 insertions(+), 252 deletions(-) diff --git "a/doc/\350\213\245\344\276\235\347\216\257\345\242\203\344\275\277\347\224\250\346\211\213\345\206\214.docx" "b/doc/\350\213\245\344\276\235\347\216\257\345\242\203\344\275\277\347\224\250\346\211\213\345\206\214.docx" deleted file mode 100644 index 9e4daef..0000000 --- "a/doc/\350\213\245\344\276\235\347\216\257\345\242\203\344\275\277\347\224\250\346\211\213\345\206\214.docx" +++ /dev/null Binary files differ diff --git a/pom.xml b/pom.xml index 871bb56..ae85289 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ <jwt.version>0.9.1</jwt.version> <kaptcha.version>2.3.3</kaptcha.version> <swagger.version>3.0.0</swagger.version> - <poi.version>4.1.2</poi.version> + <poi.version>5.2.3</poi.version> <oshi.version>6.6.5</oshi.version> <velocity.version>2.3</velocity.version> <!-- override dependency version --> diff --git a/sql/quartz.sql b/sql/quartz.sql deleted file mode 100644 index 5f99bfb..0000000 --- a/sql/quartz.sql +++ /dev/null @@ -1,174 +0,0 @@ -DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS; -DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE; -DROP TABLE IF EXISTS QRTZ_LOCKS; -DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_JOB_DETAILS; -DROP TABLE IF EXISTS QRTZ_CALENDARS; - --- ---------------------------- --- 1銆佸瓨鍌ㄦ瘡涓�涓凡閰嶇疆鐨� jobDetail 鐨勮缁嗕俊鎭� --- ---------------------------- -create table QRTZ_JOB_DETAILS ( - sched_name varchar(120) not null comment '璋冨害鍚嶇О', - job_name varchar(200) not null comment '浠诲姟鍚嶇О', - job_group varchar(200) not null comment '浠诲姟缁勫悕', - description varchar(250) null comment '鐩稿叧浠嬬粛', - job_class_name varchar(250) not null comment '鎵ц浠诲姟绫诲悕绉�', - is_durable varchar(1) not null comment '鏄惁鎸佷箙鍖�', - is_nonconcurrent varchar(1) not null comment '鏄惁骞跺彂', - is_update_data varchar(1) not null comment '鏄惁鏇存柊鏁版嵁', - requests_recovery varchar(1) not null comment '鏄惁鎺ュ彈鎭㈠鎵ц', - job_data blob null comment '瀛樻斁鎸佷箙鍖杍ob瀵硅薄', - primary key (sched_name, job_name, job_group) -) engine=innodb comment = '浠诲姟璇︾粏淇℃伅琛�'; - --- ---------------------------- --- 2銆� 瀛樺偍宸查厤缃殑 Trigger 鐨勪俊鎭� --- ---------------------------- -create table QRTZ_TRIGGERS ( - sched_name varchar(120) not null comment '璋冨害鍚嶇О', - trigger_name varchar(200) not null comment '瑙﹀彂鍣ㄧ殑鍚嶅瓧', - trigger_group varchar(200) not null comment '瑙﹀彂鍣ㄦ墍灞炵粍鐨勫悕瀛�', - job_name varchar(200) not null comment 'qrtz_job_details琛╦ob_name鐨勫閿�', - job_group varchar(200) not null comment 'qrtz_job_details琛╦ob_group鐨勫閿�', - description varchar(250) null comment '鐩稿叧浠嬬粛', - next_fire_time bigint(13) null comment '涓婁竴娆¤Е鍙戞椂闂达紙姣锛�', - prev_fire_time bigint(13) null comment '涓嬩竴娆¤Е鍙戞椂闂达紙榛樿涓�-1琛ㄧず涓嶈Е鍙戯級', - priority integer null comment '浼樺厛绾�', - trigger_state varchar(16) not null comment '瑙﹀彂鍣ㄧ姸鎬�', - trigger_type varchar(8) not null comment '瑙﹀彂鍣ㄧ殑绫诲瀷', - start_time bigint(13) not null comment '寮�濮嬫椂闂�', - end_time bigint(13) null comment '缁撴潫鏃堕棿', - calendar_name varchar(200) null comment '鏃ョ▼琛ㄥ悕绉�', - misfire_instr smallint(2) null comment '琛ュ伩鎵ц鐨勭瓥鐣�', - job_data blob null comment '瀛樻斁鎸佷箙鍖杍ob瀵硅薄', - primary key (sched_name, trigger_name, trigger_group), - foreign key (sched_name, job_name, job_group) references QRTZ_JOB_DETAILS(sched_name, job_name, job_group) -) engine=innodb comment = '瑙﹀彂鍣ㄨ缁嗕俊鎭〃'; - --- ---------------------------- --- 3銆� 瀛樺偍绠�鍗曠殑 Trigger锛屽寘鎷噸澶嶆鏁帮紝闂撮殧锛屼互鍙婂凡瑙﹀彂鐨勬鏁� --- ---------------------------- -create table QRTZ_SIMPLE_TRIGGERS ( - sched_name varchar(120) not null comment '璋冨害鍚嶇О', - trigger_name varchar(200) not null comment 'qrtz_triggers琛╰rigger_name鐨勫閿�', - trigger_group varchar(200) not null comment 'qrtz_triggers琛╰rigger_group鐨勫閿�', - repeat_count bigint(7) not null comment '閲嶅鐨勬鏁扮粺璁�', - repeat_interval bigint(12) not null comment '閲嶅鐨勯棿闅旀椂闂�', - times_triggered bigint(10) not null comment '宸茬粡瑙﹀彂鐨勬鏁�', - primary key (sched_name, trigger_name, trigger_group), - foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) -) engine=innodb comment = '绠�鍗曡Е鍙戝櫒鐨勪俊鎭〃'; - --- ---------------------------- --- 4銆� 瀛樺偍 Cron Trigger锛屽寘鎷� Cron 琛ㄨ揪寮忓拰鏃跺尯淇℃伅 --- ---------------------------- -create table QRTZ_CRON_TRIGGERS ( - sched_name varchar(120) not null comment '璋冨害鍚嶇О', - trigger_name varchar(200) not null comment 'qrtz_triggers琛╰rigger_name鐨勫閿�', - trigger_group varchar(200) not null comment 'qrtz_triggers琛╰rigger_group鐨勫閿�', - cron_expression varchar(200) not null comment 'cron琛ㄨ揪寮�', - time_zone_id varchar(80) comment '鏃跺尯', - primary key (sched_name, trigger_name, trigger_group), - foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) -) engine=innodb comment = 'Cron绫诲瀷鐨勮Е鍙戝櫒琛�'; - --- ---------------------------- --- 5銆� Trigger 浣滀负 Blob 绫诲瀷瀛樺偍(鐢ㄤ簬 Quartz 鐢ㄦ埛鐢� JDBC 鍒涘缓浠栦滑鑷繁瀹氬埗鐨� Trigger 绫诲瀷锛孞obStore 骞朵笉鐭ラ亾濡備綍瀛樺偍瀹炰緥鐨勬椂鍊�) --- ---------------------------- -create table QRTZ_BLOB_TRIGGERS ( - sched_name varchar(120) not null comment '璋冨害鍚嶇О', - trigger_name varchar(200) not null comment 'qrtz_triggers琛╰rigger_name鐨勫閿�', - trigger_group varchar(200) not null comment 'qrtz_triggers琛╰rigger_group鐨勫閿�', - blob_data blob null comment '瀛樻斁鎸佷箙鍖朤rigger瀵硅薄', - primary key (sched_name, trigger_name, trigger_group), - foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) -) engine=innodb comment = 'Blob绫诲瀷鐨勮Е鍙戝櫒琛�'; - --- ---------------------------- --- 6銆� 浠� Blob 绫诲瀷瀛樺偍瀛樻斁鏃ュ巻淇℃伅锛� quartz鍙厤缃竴涓棩鍘嗘潵鎸囧畾涓�涓椂闂磋寖鍥� --- ---------------------------- -create table QRTZ_CALENDARS ( - sched_name varchar(120) not null comment '璋冨害鍚嶇О', - calendar_name varchar(200) not null comment '鏃ュ巻鍚嶇О', - calendar blob not null comment '瀛樻斁鎸佷箙鍖朿alendar瀵硅薄', - primary key (sched_name, calendar_name) -) engine=innodb comment = '鏃ュ巻淇℃伅琛�'; - --- ---------------------------- --- 7銆� 瀛樺偍宸叉殏鍋滅殑 Trigger 缁勭殑淇℃伅 --- ---------------------------- -create table QRTZ_PAUSED_TRIGGER_GRPS ( - sched_name varchar(120) not null comment '璋冨害鍚嶇О', - trigger_group varchar(200) not null comment 'qrtz_triggers琛╰rigger_group鐨勫閿�', - primary key (sched_name, trigger_group) -) engine=innodb comment = '鏆傚仠鐨勮Е鍙戝櫒琛�'; - --- ---------------------------- --- 8銆� 瀛樺偍涓庡凡瑙﹀彂鐨� Trigger 鐩稿叧鐨勭姸鎬佷俊鎭紝浠ュ強鐩歌仈 Job 鐨勬墽琛屼俊鎭� --- ---------------------------- -create table QRTZ_FIRED_TRIGGERS ( - sched_name varchar(120) not null comment '璋冨害鍚嶇О', - entry_id varchar(95) not null comment '璋冨害鍣ㄥ疄渚媔d', - trigger_name varchar(200) not null comment 'qrtz_triggers琛╰rigger_name鐨勫閿�', - trigger_group varchar(200) not null comment 'qrtz_triggers琛╰rigger_group鐨勫閿�', - instance_name varchar(200) not null comment '璋冨害鍣ㄥ疄渚嬪悕', - fired_time bigint(13) not null comment '瑙﹀彂鐨勬椂闂�', - sched_time bigint(13) not null comment '瀹氭椂鍣ㄥ埗瀹氱殑鏃堕棿', - priority integer not null comment '浼樺厛绾�', - state varchar(16) not null comment '鐘舵��', - job_name varchar(200) null comment '浠诲姟鍚嶇О', - job_group varchar(200) null comment '浠诲姟缁勫悕', - is_nonconcurrent varchar(1) null comment '鏄惁骞跺彂', - requests_recovery varchar(1) null comment '鏄惁鎺ュ彈鎭㈠鎵ц', - primary key (sched_name, entry_id) -) engine=innodb comment = '宸茶Е鍙戠殑瑙﹀彂鍣ㄨ〃'; - --- ---------------------------- --- 9銆� 瀛樺偍灏戦噺鐨勬湁鍏� Scheduler 鐨勭姸鎬佷俊鎭紝鍋囧鏄敤浜庨泦缇や腑锛屽彲浠ョ湅鍒板叾浠栫殑 Scheduler 瀹炰緥 --- ---------------------------- -create table QRTZ_SCHEDULER_STATE ( - sched_name varchar(120) not null comment '璋冨害鍚嶇О', - instance_name varchar(200) not null comment '瀹炰緥鍚嶇О', - last_checkin_time bigint(13) not null comment '涓婃妫�鏌ユ椂闂�', - checkin_interval bigint(13) not null comment '妫�鏌ラ棿闅旀椂闂�', - primary key (sched_name, instance_name) -) engine=innodb comment = '璋冨害鍣ㄧ姸鎬佽〃'; - --- ---------------------------- --- 10銆� 瀛樺偍绋嬪簭鐨勬偛瑙傞攣鐨勪俊鎭�(鍋囧浣跨敤浜嗘偛瑙傞攣) --- ---------------------------- -create table QRTZ_LOCKS ( - sched_name varchar(120) not null comment '璋冨害鍚嶇О', - lock_name varchar(40) not null comment '鎮茶閿佸悕绉�', - primary key (sched_name, lock_name) -) engine=innodb comment = '瀛樺偍鐨勬偛瑙傞攣淇℃伅琛�'; - --- ---------------------------- --- 11銆� Quartz闆嗙兢瀹炵幇鍚屾鏈哄埗鐨勮閿佽〃 --- ---------------------------- -create table QRTZ_SIMPROP_TRIGGERS ( - sched_name varchar(120) not null comment '璋冨害鍚嶇О', - trigger_name varchar(200) not null comment 'qrtz_triggers琛╰rigger_name鐨勫閿�', - trigger_group varchar(200) not null comment 'qrtz_triggers琛╰rigger_group鐨勫閿�', - str_prop_1 varchar(512) null comment 'String绫诲瀷鐨則rigger鐨勭涓�涓弬鏁�', - str_prop_2 varchar(512) null comment 'String绫诲瀷鐨則rigger鐨勭浜屼釜鍙傛暟', - str_prop_3 varchar(512) null comment 'String绫诲瀷鐨則rigger鐨勭涓変釜鍙傛暟', - int_prop_1 int null comment 'int绫诲瀷鐨則rigger鐨勭涓�涓弬鏁�', - int_prop_2 int null comment 'int绫诲瀷鐨則rigger鐨勭浜屼釜鍙傛暟', - long_prop_1 bigint null comment 'long绫诲瀷鐨則rigger鐨勭涓�涓弬鏁�', - long_prop_2 bigint null comment 'long绫诲瀷鐨則rigger鐨勭浜屼釜鍙傛暟', - dec_prop_1 numeric(13,4) null comment 'decimal绫诲瀷鐨則rigger鐨勭涓�涓弬鏁�', - dec_prop_2 numeric(13,4) null comment 'decimal绫诲瀷鐨則rigger鐨勭浜屼釜鍙傛暟', - bool_prop_1 varchar(1) null comment 'Boolean绫诲瀷鐨則rigger鐨勭涓�涓弬鏁�', - bool_prop_2 varchar(1) null comment 'Boolean绫诲瀷鐨則rigger鐨勭浜屼釜鍙傛暟', - primary key (sched_name, trigger_name, trigger_group), - foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) -) engine=innodb comment = '鍚屾鏈哄埗鐨勮閿佽〃'; - -commit; \ No newline at end of file diff --git a/sql/ry_20250417.sql b/sql/ry_20250417.sql deleted file mode 100644 index 8ee19de..0000000 --- a/sql/ry_20250417.sql +++ /dev/null @@ -1,701 +0,0 @@ --- ---------------------------- --- 1銆侀儴闂ㄨ〃 --- ---------------------------- -drop table if exists sys_dept; -create table sys_dept ( - dept_id bigint(20) not null auto_increment comment '閮ㄩ棬id', - parent_id bigint(20) default 0 comment '鐖堕儴闂╥d', - ancestors varchar(50) default '' comment '绁栫骇鍒楄〃', - dept_name varchar(30) default '' comment '閮ㄩ棬鍚嶇О', - order_num int(4) default 0 comment '鏄剧ず椤哄簭', - leader varchar(20) default null comment '璐熻矗浜�', - phone varchar(11) default null comment '鑱旂郴鐢佃瘽', - email varchar(50) default null comment '閭', - status char(1) default '0' comment '閮ㄩ棬鐘舵�侊紙0姝e父 1鍋滅敤锛�', - del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', - create_by varchar(64) default '' comment '鍒涘缓鑰�', - create_time datetime comment '鍒涘缓鏃堕棿', - update_by varchar(64) default '' comment '鏇存柊鑰�', - update_time datetime comment '鏇存柊鏃堕棿', - primary key (dept_id) -) engine=innodb auto_increment=200 comment = '閮ㄩ棬琛�'; - --- ---------------------------- --- 鍒濆鍖�-閮ㄩ棬琛ㄦ暟鎹� --- ---------------------------- -insert into sys_dept values(100, 0, '0', '鑻ヤ緷绉戞妧', 0, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(101, 100, '0,100', '娣卞湷鎬诲叕鍙�', 1, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(102, 100, '0,100', '闀挎矙鍒嗗叕鍙�', 2, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(103, 101, '0,100,101', '鐮斿彂閮ㄩ棬', 1, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(104, 101, '0,100,101', '甯傚満閮ㄩ棬', 2, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(105, 101, '0,100,101', '娴嬭瘯閮ㄩ棬', 3, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(106, 101, '0,100,101', '璐㈠姟閮ㄩ棬', 4, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(107, 101, '0,100,101', '杩愮淮閮ㄩ棬', 5, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(108, 102, '0,100,102', '甯傚満閮ㄩ棬', 1, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(109, 102, '0,100,102', '璐㈠姟閮ㄩ棬', 2, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); - - --- ---------------------------- --- 2銆佺敤鎴蜂俊鎭〃 --- ---------------------------- -drop table if exists sys_user; -create table sys_user ( - user_id bigint(20) not null auto_increment comment '鐢ㄦ埛ID', - dept_id bigint(20) default null comment '閮ㄩ棬ID', - user_name varchar(30) not null comment '鐢ㄦ埛璐﹀彿', - nick_name varchar(30) not null comment '鐢ㄦ埛鏄电О', - user_type varchar(2) default '00' comment '鐢ㄦ埛绫诲瀷锛�00绯荤粺鐢ㄦ埛锛�', - email varchar(50) default '' comment '鐢ㄦ埛閭', - phonenumber varchar(11) default '' comment '鎵嬫満鍙风爜', - sex char(1) default '0' comment '鐢ㄦ埛鎬у埆锛�0鐢� 1濂� 2鏈煡锛�', - avatar varchar(100) default '' comment '澶村儚鍦板潃', - password varchar(100) default '' comment '瀵嗙爜', - status char(1) default '0' comment '璐﹀彿鐘舵�侊紙0姝e父 1鍋滅敤锛�', - del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', - login_ip varchar(128) default '' comment '鏈�鍚庣櫥褰旾P', - login_date datetime comment '鏈�鍚庣櫥褰曟椂闂�', - create_by varchar(64) default '' comment '鍒涘缓鑰�', - create_time datetime comment '鍒涘缓鏃堕棿', - update_by varchar(64) default '' comment '鏇存柊鑰�', - update_time datetime comment '鏇存柊鏃堕棿', - remark varchar(500) default null comment '澶囨敞', - primary key (user_id) -) engine=innodb auto_increment=100 comment = '鐢ㄦ埛淇℃伅琛�'; - --- ---------------------------- --- 鍒濆鍖�-鐢ㄦ埛淇℃伅琛ㄦ暟鎹� --- ---------------------------- -insert into sys_user values(1, 103, 'admin', '鑻ヤ緷', '00', 'ry@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 'admin', sysdate(), '', null, '绠$悊鍛�'); -insert into sys_user values(2, 105, 'ry', '鑻ヤ緷', '00', 'ry@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 'admin', sysdate(), '', null, '娴嬭瘯鍛�'); - - --- ---------------------------- --- 3銆佸矖浣嶄俊鎭〃 --- ---------------------------- -drop table if exists sys_post; -create table sys_post -( - post_id bigint(20) not null auto_increment comment '宀椾綅ID', - post_code varchar(64) not null comment '宀椾綅缂栫爜', - post_name varchar(50) not null comment '宀椾綅鍚嶇О', - post_sort int(4) not null comment '鏄剧ず椤哄簭', - status char(1) not null comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�', - create_by varchar(64) default '' comment '鍒涘缓鑰�', - create_time datetime comment '鍒涘缓鏃堕棿', - update_by varchar(64) default '' comment '鏇存柊鑰�', - update_time datetime comment '鏇存柊鏃堕棿', - remark varchar(500) default null comment '澶囨敞', - primary key (post_id) -) engine=innodb comment = '宀椾綅淇℃伅琛�'; - --- ---------------------------- --- 鍒濆鍖�-宀椾綅淇℃伅琛ㄦ暟鎹� --- ---------------------------- -insert into sys_post values(1, 'ceo', '钁d簨闀�', 1, '0', 'admin', sysdate(), '', null, ''); -insert into sys_post values(2, 'se', '椤圭洰缁忕悊', 2, '0', 'admin', sysdate(), '', null, ''); -insert into sys_post values(3, 'hr', '浜哄姏璧勬簮', 3, '0', 'admin', sysdate(), '', null, ''); -insert into sys_post values(4, 'user', '鏅�氬憳宸�', 4, '0', 'admin', sysdate(), '', null, ''); - - --- ---------------------------- --- 4銆佽鑹蹭俊鎭〃 --- ---------------------------- -drop table if exists sys_role; -create table sys_role ( - role_id bigint(20) not null auto_increment comment '瑙掕壊ID', - role_name varchar(30) not null comment '瑙掕壊鍚嶇О', - role_key varchar(100) not null comment '瑙掕壊鏉冮檺瀛楃涓�', - role_sort int(4) not null comment '鏄剧ず椤哄簭', - data_scope char(1) default '1' comment '鏁版嵁鑼冨洿锛�1锛氬叏閮ㄦ暟鎹潈闄� 2锛氳嚜瀹氭暟鎹潈闄� 3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺 4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級', - menu_check_strictly tinyint(1) default 1 comment '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�', - dept_check_strictly tinyint(1) default 1 comment '閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�', - status char(1) not null comment '瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛�', - del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', - create_by varchar(64) default '' comment '鍒涘缓鑰�', - create_time datetime comment '鍒涘缓鏃堕棿', - update_by varchar(64) default '' comment '鏇存柊鑰�', - update_time datetime comment '鏇存柊鏃堕棿', - remark varchar(500) default null comment '澶囨敞', - primary key (role_id) -) engine=innodb auto_increment=100 comment = '瑙掕壊淇℃伅琛�'; - --- ---------------------------- --- 鍒濆鍖�-瑙掕壊淇℃伅琛ㄦ暟鎹� --- ---------------------------- -insert into sys_role values('1', '瓒呯骇绠$悊鍛�', 'admin', 1, 1, 1, 1, '0', '0', 'admin', sysdate(), '', null, '瓒呯骇绠$悊鍛�'); -insert into sys_role values('2', '鏅�氳鑹�', 'common', 2, 2, 1, 1, '0', '0', 'admin', sysdate(), '', null, '鏅�氳鑹�'); - - --- ---------------------------- --- 5銆佽彍鍗曟潈闄愯〃 --- ---------------------------- -drop table if exists sys_menu; -create table sys_menu ( - menu_id bigint(20) not null auto_increment comment '鑿滃崟ID', - menu_name varchar(50) not null comment '鑿滃崟鍚嶇О', - parent_id bigint(20) default 0 comment '鐖惰彍鍗旾D', - order_num int(4) default 0 comment '鏄剧ず椤哄簭', - path varchar(200) default '' comment '璺敱鍦板潃', - component varchar(255) default null comment '缁勪欢璺緞', - query varchar(255) default null comment '璺敱鍙傛暟', - route_name varchar(50) default '' comment '璺敱鍚嶇О', - is_frame int(1) default 1 comment '鏄惁涓哄閾撅紙0鏄� 1鍚︼級', - is_cache int(1) default 0 comment '鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級', - menu_type char(1) default '' comment '鑿滃崟绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛�', - visible char(1) default 0 comment '鑿滃崟鐘舵�侊紙0鏄剧ず 1闅愯棌锛�', - status char(1) default 0 comment '鑿滃崟鐘舵�侊紙0姝e父 1鍋滅敤锛�', - perms varchar(100) default null comment '鏉冮檺鏍囪瘑', - icon varchar(100) default '#' comment '鑿滃崟鍥炬爣', - create_by varchar(64) default '' comment '鍒涘缓鑰�', - create_time datetime comment '鍒涘缓鏃堕棿', - update_by varchar(64) default '' comment '鏇存柊鑰�', - update_time datetime comment '鏇存柊鏃堕棿', - remark varchar(500) default '' comment '澶囨敞', - primary key (menu_id) -) engine=innodb auto_increment=2000 comment = '鑿滃崟鏉冮檺琛�'; - --- ---------------------------- --- 鍒濆鍖�-鑿滃崟淇℃伅琛ㄦ暟鎹� --- ---------------------------- --- 涓�绾ц彍鍗� -insert into sys_menu values('1', '绯荤粺绠$悊', '0', '1', 'system', null, '', '', 1, 0, 'M', '0', '0', '', 'system', 'admin', sysdate(), '', null, '绯荤粺绠$悊鐩綍'); -insert into sys_menu values('2', '绯荤粺鐩戞帶', '0', '2', 'monitor', null, '', '', 1, 0, 'M', '0', '0', '', 'monitor', 'admin', sysdate(), '', null, '绯荤粺鐩戞帶鐩綍'); -insert into sys_menu values('3', '绯荤粺宸ュ叿', '0', '3', 'tool', null, '', '', 1, 0, 'M', '0', '0', '', 'tool', 'admin', sysdate(), '', null, '绯荤粺宸ュ叿鐩綍'); -insert into sys_menu values('4', '鑻ヤ緷瀹樼綉', '0', '4', 'http://ruoyi.vip', null, '', '', 0, 0, 'M', '0', '0', '', 'guide', 'admin', sysdate(), '', null, '鑻ヤ緷瀹樼綉鍦板潃'); --- 浜岀骇鑿滃崟 -insert into sys_menu values('100', '鐢ㄦ埛绠$悊', '1', '1', 'user', 'system/user/index', '', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 'admin', sysdate(), '', null, '鐢ㄦ埛绠$悊鑿滃崟'); -insert into sys_menu values('101', '瑙掕壊绠$悊', '1', '2', 'role', 'system/role/index', '', '', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 'admin', sysdate(), '', null, '瑙掕壊绠$悊鑿滃崟'); -insert into sys_menu values('102', '鑿滃崟绠$悊', '1', '3', 'menu', 'system/menu/index', '', '', 1, 0, 'C', '0', '0', 'system:menu:list', 'tree-table', 'admin', sysdate(), '', null, '鑿滃崟绠$悊鑿滃崟'); -insert into sys_menu values('103', '閮ㄩ棬绠$悊', '1', '4', 'dept', 'system/dept/index', '', '', 1, 0, 'C', '0', '0', 'system:dept:list', 'tree', 'admin', sysdate(), '', null, '閮ㄩ棬绠$悊鑿滃崟'); -insert into sys_menu values('104', '宀椾綅绠$悊', '1', '5', 'post', 'system/post/index', '', '', 1, 0, 'C', '0', '0', 'system:post:list', 'post', 'admin', sysdate(), '', null, '宀椾綅绠$悊鑿滃崟'); -insert into sys_menu values('105', '瀛楀吀绠$悊', '1', '6', 'dict', 'system/dict/index', '', '', 1, 0, 'C', '0', '0', 'system:dict:list', 'dict', 'admin', sysdate(), '', null, '瀛楀吀绠$悊鑿滃崟'); -insert into sys_menu values('106', '鍙傛暟璁剧疆', '1', '7', 'config', 'system/config/index', '', '', 1, 0, 'C', '0', '0', 'system:config:list', 'edit', 'admin', sysdate(), '', null, '鍙傛暟璁剧疆鑿滃崟'); -insert into sys_menu values('107', '閫氱煡鍏憡', '1', '8', 'notice', 'system/notice/index', '', '', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 'admin', sysdate(), '', null, '閫氱煡鍏憡鑿滃崟'); -insert into sys_menu values('108', '鏃ュ織绠$悊', '1', '9', 'log', '', '', '', 1, 0, 'M', '0', '0', '', 'log', 'admin', sysdate(), '', null, '鏃ュ織绠$悊鑿滃崟'); -insert into sys_menu values('109', '鍦ㄧ嚎鐢ㄦ埛', '2', '1', 'online', 'monitor/online/index', '', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 'admin', sysdate(), '', null, '鍦ㄧ嚎鐢ㄦ埛鑿滃崟'); -insert into sys_menu values('110', '瀹氭椂浠诲姟', '2', '2', 'job', 'monitor/job/index', '', '', 1, 0, 'C', '0', '0', 'monitor:job:list', 'job', 'admin', sysdate(), '', null, '瀹氭椂浠诲姟鑿滃崟'); -insert into sys_menu values('111', '鏁版嵁鐩戞帶', '2', '3', 'druid', 'monitor/druid/index', '', '', 1, 0, 'C', '0', '0', 'monitor:druid:list', 'druid', 'admin', sysdate(), '', null, '鏁版嵁鐩戞帶鑿滃崟'); -insert into sys_menu values('112', '鏈嶅姟鐩戞帶', '2', '4', 'server', 'monitor/server/index', '', '', 1, 0, 'C', '0', '0', 'monitor:server:list', 'server', 'admin', sysdate(), '', null, '鏈嶅姟鐩戞帶鑿滃崟'); -insert into sys_menu values('113', '缂撳瓨鐩戞帶', '2', '5', 'cache', 'monitor/cache/index', '', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 'admin', sysdate(), '', null, '缂撳瓨鐩戞帶鑿滃崟'); -insert into sys_menu values('114', '缂撳瓨鍒楄〃', '2', '6', 'cacheList', 'monitor/cache/list', '', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis-list', 'admin', sysdate(), '', null, '缂撳瓨鍒楄〃鑿滃崟'); -insert into sys_menu values('115', '琛ㄥ崟鏋勫缓', '3', '1', 'build', 'tool/build/index', '', '', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 'admin', sysdate(), '', null, '琛ㄥ崟鏋勫缓鑿滃崟'); -insert into sys_menu values('116', '浠g爜鐢熸垚', '3', '2', 'gen', 'tool/gen/index', '', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 'admin', sysdate(), '', null, '浠g爜鐢熸垚鑿滃崟'); -insert into sys_menu values('117', '绯荤粺鎺ュ彛', '3', '3', 'swagger', 'tool/swagger/index', '', '', 1, 0, 'C', '0', '0', 'tool:swagger:list', 'swagger', 'admin', sysdate(), '', null, '绯荤粺鎺ュ彛鑿滃崟'); --- 涓夌骇鑿滃崟 -insert into sys_menu values('500', '鎿嶄綔鏃ュ織', '108', '1', 'operlog', 'monitor/operlog/index', '', '', 1, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', 'admin', sysdate(), '', null, '鎿嶄綔鏃ュ織鑿滃崟'); -insert into sys_menu values('501', '鐧诲綍鏃ュ織', '108', '2', 'logininfor', 'monitor/logininfor/index', '', '', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', 'admin', sysdate(), '', null, '鐧诲綍鏃ュ織鑿滃崟'); --- 鐢ㄦ埛绠$悊鎸夐挳 -insert into sys_menu values('1000', '鐢ㄦ埛鏌ヨ', '100', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1001', '鐢ㄦ埛鏂板', '100', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1002', '鐢ㄦ埛淇敼', '100', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1003', '鐢ㄦ埛鍒犻櫎', '100', '4', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1004', '鐢ㄦ埛瀵煎嚭', '100', '5', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:export', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1005', '鐢ㄦ埛瀵煎叆', '100', '6', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:import', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1006', '閲嶇疆瀵嗙爜', '100', '7', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd', '#', 'admin', sysdate(), '', null, ''); --- 瑙掕壊绠$悊鎸夐挳 -insert into sys_menu values('1007', '瑙掕壊鏌ヨ', '101', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1008', '瑙掕壊鏂板', '101', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1009', '瑙掕壊淇敼', '101', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1010', '瑙掕壊鍒犻櫎', '101', '4', '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1011', '瑙掕壊瀵煎嚭', '101', '5', '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:export', '#', 'admin', sysdate(), '', null, ''); --- 鑿滃崟绠$悊鎸夐挳 -insert into sys_menu values('1012', '鑿滃崟鏌ヨ', '102', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1013', '鑿滃崟鏂板', '102', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1014', '鑿滃崟淇敼', '102', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1015', '鑿滃崟鍒犻櫎', '102', '4', '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:remove', '#', 'admin', sysdate(), '', null, ''); --- 閮ㄩ棬绠$悊鎸夐挳 -insert into sys_menu values('1016', '閮ㄩ棬鏌ヨ', '103', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1017', '閮ㄩ棬鏂板', '103', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1018', '閮ㄩ棬淇敼', '103', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1019', '閮ㄩ棬鍒犻櫎', '103', '4', '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:remove', '#', 'admin', sysdate(), '', null, ''); --- 宀椾綅绠$悊鎸夐挳 -insert into sys_menu values('1020', '宀椾綅鏌ヨ', '104', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1021', '宀椾綅鏂板', '104', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1022', '宀椾綅淇敼', '104', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1023', '宀椾綅鍒犻櫎', '104', '4', '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1024', '宀椾綅瀵煎嚭', '104', '5', '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:export', '#', 'admin', sysdate(), '', null, ''); --- 瀛楀吀绠$悊鎸夐挳 -insert into sys_menu values('1025', '瀛楀吀鏌ヨ', '105', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1026', '瀛楀吀鏂板', '105', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1027', '瀛楀吀淇敼', '105', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1028', '瀛楀吀鍒犻櫎', '105', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1029', '瀛楀吀瀵煎嚭', '105', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:export', '#', 'admin', sysdate(), '', null, ''); --- 鍙傛暟璁剧疆鎸夐挳 -insert into sys_menu values('1030', '鍙傛暟鏌ヨ', '106', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1031', '鍙傛暟鏂板', '106', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1032', '鍙傛暟淇敼', '106', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1033', '鍙傛暟鍒犻櫎', '106', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1034', '鍙傛暟瀵煎嚭', '106', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:export', '#', 'admin', sysdate(), '', null, ''); --- 閫氱煡鍏憡鎸夐挳 -insert into sys_menu values('1035', '鍏憡鏌ヨ', '107', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1036', '鍏憡鏂板', '107', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1037', '鍏憡淇敼', '107', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1038', '鍏憡鍒犻櫎', '107', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:remove', '#', 'admin', sysdate(), '', null, ''); --- 鎿嶄綔鏃ュ織鎸夐挳 -insert into sys_menu values('1039', '鎿嶄綔鏌ヨ', '500', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1040', '鎿嶄綔鍒犻櫎', '500', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1041', '鏃ュ織瀵煎嚭', '500', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:export', '#', 'admin', sysdate(), '', null, ''); --- 鐧诲綍鏃ュ織鎸夐挳 -insert into sys_menu values('1042', '鐧诲綍鏌ヨ', '501', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1043', '鐧诲綍鍒犻櫎', '501', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1044', '鏃ュ織瀵煎嚭', '501', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:export', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1045', '璐︽埛瑙i攣', '501', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:unlock', '#', 'admin', sysdate(), '', null, ''); --- 鍦ㄧ嚎鐢ㄦ埛鎸夐挳 -insert into sys_menu values('1046', '鍦ㄧ嚎鏌ヨ', '109', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:online:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1047', '鎵归噺寮洪��', '109', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1048', '鍗曟潯寮洪��', '109', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 'admin', sysdate(), '', null, ''); --- 瀹氭椂浠诲姟鎸夐挳 -insert into sys_menu values('1049', '浠诲姟鏌ヨ', '110', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1050', '浠诲姟鏂板', '110', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1051', '浠诲姟淇敼', '110', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1052', '浠诲姟鍒犻櫎', '110', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1053', '鐘舵�佷慨鏀�', '110', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:changeStatus', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1054', '浠诲姟瀵煎嚭', '110', '6', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:export', '#', 'admin', sysdate(), '', null, ''); --- 浠g爜鐢熸垚鎸夐挳 -insert into sys_menu values('1055', '鐢熸垚鏌ヨ', '116', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1056', '鐢熸垚淇敼', '116', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1057', '鐢熸垚鍒犻櫎', '116', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1058', '瀵煎叆浠g爜', '116', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1059', '棰勮浠g爜', '116', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1060', '鐢熸垚浠g爜', '116', '6', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 'admin', sysdate(), '', null, ''); - - --- ---------------------------- --- 6銆佺敤鎴峰拰瑙掕壊鍏宠仈琛� 鐢ㄦ埛N-1瑙掕壊 --- ---------------------------- -drop table if exists sys_user_role; -create table sys_user_role ( - user_id bigint(20) not null comment '鐢ㄦ埛ID', - role_id bigint(20) not null comment '瑙掕壊ID', - primary key(user_id, role_id) -) engine=innodb comment = '鐢ㄦ埛鍜岃鑹插叧鑱旇〃'; - --- ---------------------------- --- 鍒濆鍖�-鐢ㄦ埛鍜岃鑹插叧鑱旇〃鏁版嵁 --- ---------------------------- -insert into sys_user_role values ('1', '1'); -insert into sys_user_role values ('2', '2'); - - --- ---------------------------- --- 7銆佽鑹插拰鑿滃崟鍏宠仈琛� 瑙掕壊1-N鑿滃崟 --- ---------------------------- -drop table if exists sys_role_menu; -create table sys_role_menu ( - role_id bigint(20) not null comment '瑙掕壊ID', - menu_id bigint(20) not null comment '鑿滃崟ID', - primary key(role_id, menu_id) -) engine=innodb comment = '瑙掕壊鍜岃彍鍗曞叧鑱旇〃'; - --- ---------------------------- --- 鍒濆鍖�-瑙掕壊鍜岃彍鍗曞叧鑱旇〃鏁版嵁 --- ---------------------------- -insert into sys_role_menu values ('2', '1'); -insert into sys_role_menu values ('2', '2'); -insert into sys_role_menu values ('2', '3'); -insert into sys_role_menu values ('2', '4'); -insert into sys_role_menu values ('2', '100'); -insert into sys_role_menu values ('2', '101'); -insert into sys_role_menu values ('2', '102'); -insert into sys_role_menu values ('2', '103'); -insert into sys_role_menu values ('2', '104'); -insert into sys_role_menu values ('2', '105'); -insert into sys_role_menu values ('2', '106'); -insert into sys_role_menu values ('2', '107'); -insert into sys_role_menu values ('2', '108'); -insert into sys_role_menu values ('2', '109'); -insert into sys_role_menu values ('2', '110'); -insert into sys_role_menu values ('2', '111'); -insert into sys_role_menu values ('2', '112'); -insert into sys_role_menu values ('2', '113'); -insert into sys_role_menu values ('2', '114'); -insert into sys_role_menu values ('2', '115'); -insert into sys_role_menu values ('2', '116'); -insert into sys_role_menu values ('2', '117'); -insert into sys_role_menu values ('2', '500'); -insert into sys_role_menu values ('2', '501'); -insert into sys_role_menu values ('2', '1000'); -insert into sys_role_menu values ('2', '1001'); -insert into sys_role_menu values ('2', '1002'); -insert into sys_role_menu values ('2', '1003'); -insert into sys_role_menu values ('2', '1004'); -insert into sys_role_menu values ('2', '1005'); -insert into sys_role_menu values ('2', '1006'); -insert into sys_role_menu values ('2', '1007'); -insert into sys_role_menu values ('2', '1008'); -insert into sys_role_menu values ('2', '1009'); -insert into sys_role_menu values ('2', '1010'); -insert into sys_role_menu values ('2', '1011'); -insert into sys_role_menu values ('2', '1012'); -insert into sys_role_menu values ('2', '1013'); -insert into sys_role_menu values ('2', '1014'); -insert into sys_role_menu values ('2', '1015'); -insert into sys_role_menu values ('2', '1016'); -insert into sys_role_menu values ('2', '1017'); -insert into sys_role_menu values ('2', '1018'); -insert into sys_role_menu values ('2', '1019'); -insert into sys_role_menu values ('2', '1020'); -insert into sys_role_menu values ('2', '1021'); -insert into sys_role_menu values ('2', '1022'); -insert into sys_role_menu values ('2', '1023'); -insert into sys_role_menu values ('2', '1024'); -insert into sys_role_menu values ('2', '1025'); -insert into sys_role_menu values ('2', '1026'); -insert into sys_role_menu values ('2', '1027'); -insert into sys_role_menu values ('2', '1028'); -insert into sys_role_menu values ('2', '1029'); -insert into sys_role_menu values ('2', '1030'); -insert into sys_role_menu values ('2', '1031'); -insert into sys_role_menu values ('2', '1032'); -insert into sys_role_menu values ('2', '1033'); -insert into sys_role_menu values ('2', '1034'); -insert into sys_role_menu values ('2', '1035'); -insert into sys_role_menu values ('2', '1036'); -insert into sys_role_menu values ('2', '1037'); -insert into sys_role_menu values ('2', '1038'); -insert into sys_role_menu values ('2', '1039'); -insert into sys_role_menu values ('2', '1040'); -insert into sys_role_menu values ('2', '1041'); -insert into sys_role_menu values ('2', '1042'); -insert into sys_role_menu values ('2', '1043'); -insert into sys_role_menu values ('2', '1044'); -insert into sys_role_menu values ('2', '1045'); -insert into sys_role_menu values ('2', '1046'); -insert into sys_role_menu values ('2', '1047'); -insert into sys_role_menu values ('2', '1048'); -insert into sys_role_menu values ('2', '1049'); -insert into sys_role_menu values ('2', '1050'); -insert into sys_role_menu values ('2', '1051'); -insert into sys_role_menu values ('2', '1052'); -insert into sys_role_menu values ('2', '1053'); -insert into sys_role_menu values ('2', '1054'); -insert into sys_role_menu values ('2', '1055'); -insert into sys_role_menu values ('2', '1056'); -insert into sys_role_menu values ('2', '1057'); -insert into sys_role_menu values ('2', '1058'); -insert into sys_role_menu values ('2', '1059'); -insert into sys_role_menu values ('2', '1060'); - --- ---------------------------- --- 8銆佽鑹插拰閮ㄩ棬鍏宠仈琛� 瑙掕壊1-N閮ㄩ棬 --- ---------------------------- -drop table if exists sys_role_dept; -create table sys_role_dept ( - role_id bigint(20) not null comment '瑙掕壊ID', - dept_id bigint(20) not null comment '閮ㄩ棬ID', - primary key(role_id, dept_id) -) engine=innodb comment = '瑙掕壊鍜岄儴闂ㄥ叧鑱旇〃'; - --- ---------------------------- --- 鍒濆鍖�-瑙掕壊鍜岄儴闂ㄥ叧鑱旇〃鏁版嵁 --- ---------------------------- -insert into sys_role_dept values ('2', '100'); -insert into sys_role_dept values ('2', '101'); -insert into sys_role_dept values ('2', '105'); - - --- ---------------------------- --- 9銆佺敤鎴蜂笌宀椾綅鍏宠仈琛� 鐢ㄦ埛1-N宀椾綅 --- ---------------------------- -drop table if exists sys_user_post; -create table sys_user_post -( - user_id bigint(20) not null comment '鐢ㄦ埛ID', - post_id bigint(20) not null comment '宀椾綅ID', - primary key (user_id, post_id) -) engine=innodb comment = '鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃'; - --- ---------------------------- --- 鍒濆鍖�-鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃鏁版嵁 --- ---------------------------- -insert into sys_user_post values ('1', '1'); -insert into sys_user_post values ('2', '2'); - - --- ---------------------------- --- 10銆佹搷浣滄棩蹇楄褰� --- ---------------------------- -drop table if exists sys_oper_log; -create table sys_oper_log ( - oper_id bigint(20) not null auto_increment comment '鏃ュ織涓婚敭', - title varchar(50) default '' comment '妯″潡鏍囬', - business_type int(2) default 0 comment '涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�', - method varchar(200) default '' comment '鏂规硶鍚嶇О', - request_method varchar(10) default '' comment '璇锋眰鏂瑰紡', - operator_type int(1) default 0 comment '鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級', - oper_name varchar(50) default '' comment '鎿嶄綔浜哄憳', - dept_name varchar(50) default '' comment '閮ㄩ棬鍚嶇О', - oper_url varchar(255) default '' comment '璇锋眰URL', - oper_ip varchar(128) default '' comment '涓绘満鍦板潃', - oper_location varchar(255) default '' comment '鎿嶄綔鍦扮偣', - oper_param varchar(2000) default '' comment '璇锋眰鍙傛暟', - json_result varchar(2000) default '' comment '杩斿洖鍙傛暟', - status int(1) default 0 comment '鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛�', - error_msg varchar(2000) default '' comment '閿欒娑堟伅', - oper_time datetime comment '鎿嶄綔鏃堕棿', - cost_time bigint(20) default 0 comment '娑堣�楁椂闂�', - primary key (oper_id), - key idx_sys_oper_log_bt (business_type), - key idx_sys_oper_log_s (status), - key idx_sys_oper_log_ot (oper_time) -) engine=innodb auto_increment=100 comment = '鎿嶄綔鏃ュ織璁板綍'; - - --- ---------------------------- --- 11銆佸瓧鍏哥被鍨嬭〃 --- ---------------------------- -drop table if exists sys_dict_type; -create table sys_dict_type -( - dict_id bigint(20) not null auto_increment comment '瀛楀吀涓婚敭', - dict_name varchar(100) default '' comment '瀛楀吀鍚嶇О', - dict_type varchar(100) default '' comment '瀛楀吀绫诲瀷', - status char(1) default '0' comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�', - create_by varchar(64) default '' comment '鍒涘缓鑰�', - create_time datetime comment '鍒涘缓鏃堕棿', - update_by varchar(64) default '' comment '鏇存柊鑰�', - update_time datetime comment '鏇存柊鏃堕棿', - remark varchar(500) default null comment '澶囨敞', - primary key (dict_id), - unique (dict_type) -) engine=innodb auto_increment=100 comment = '瀛楀吀绫诲瀷琛�'; - -insert into sys_dict_type values(1, '鐢ㄦ埛鎬у埆', 'sys_user_sex', '0', 'admin', sysdate(), '', null, '鐢ㄦ埛鎬у埆鍒楄〃'); -insert into sys_dict_type values(2, '鑿滃崟鐘舵��', 'sys_show_hide', '0', 'admin', sysdate(), '', null, '鑿滃崟鐘舵�佸垪琛�'); -insert into sys_dict_type values(3, '绯荤粺寮�鍏�', 'sys_normal_disable', '0', 'admin', sysdate(), '', null, '绯荤粺寮�鍏冲垪琛�'); -insert into sys_dict_type values(4, '浠诲姟鐘舵��', 'sys_job_status', '0', 'admin', sysdate(), '', null, '浠诲姟鐘舵�佸垪琛�'); -insert into sys_dict_type values(5, '浠诲姟鍒嗙粍', 'sys_job_group', '0', 'admin', sysdate(), '', null, '浠诲姟鍒嗙粍鍒楄〃'); -insert into sys_dict_type values(6, '绯荤粺鏄惁', 'sys_yes_no', '0', 'admin', sysdate(), '', null, '绯荤粺鏄惁鍒楄〃'); -insert into sys_dict_type values(7, '閫氱煡绫诲瀷', 'sys_notice_type', '0', 'admin', sysdate(), '', null, '閫氱煡绫诲瀷鍒楄〃'); -insert into sys_dict_type values(8, '閫氱煡鐘舵��', 'sys_notice_status', '0', 'admin', sysdate(), '', null, '閫氱煡鐘舵�佸垪琛�'); -insert into sys_dict_type values(9, '鎿嶄綔绫诲瀷', 'sys_oper_type', '0', 'admin', sysdate(), '', null, '鎿嶄綔绫诲瀷鍒楄〃'); -insert into sys_dict_type values(10, '绯荤粺鐘舵��', 'sys_common_status', '0', 'admin', sysdate(), '', null, '鐧诲綍鐘舵�佸垪琛�'); - - --- ---------------------------- --- 12銆佸瓧鍏告暟鎹〃 --- ---------------------------- -drop table if exists sys_dict_data; -create table sys_dict_data -( - dict_code bigint(20) not null auto_increment comment '瀛楀吀缂栫爜', - dict_sort int(4) default 0 comment '瀛楀吀鎺掑簭', - dict_label varchar(100) default '' comment '瀛楀吀鏍囩', - dict_value varchar(100) default '' comment '瀛楀吀閿��', - dict_type varchar(100) default '' comment '瀛楀吀绫诲瀷', - css_class varchar(100) default null comment '鏍峰紡灞炴�э紙鍏朵粬鏍峰紡鎵╁睍锛�', - list_class varchar(100) default null comment '琛ㄦ牸鍥炴樉鏍峰紡', - is_default char(1) default 'N' comment '鏄惁榛樿锛圷鏄� N鍚︼級', - status char(1) default '0' comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�', - create_by varchar(64) default '' comment '鍒涘缓鑰�', - create_time datetime comment '鍒涘缓鏃堕棿', - update_by varchar(64) default '' comment '鏇存柊鑰�', - update_time datetime comment '鏇存柊鏃堕棿', - remark varchar(500) default null comment '澶囨敞', - primary key (dict_code) -) engine=innodb auto_increment=100 comment = '瀛楀吀鏁版嵁琛�'; - -insert into sys_dict_data values(1, 1, '鐢�', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', sysdate(), '', null, '鎬у埆鐢�'); -insert into sys_dict_data values(2, 2, '濂�', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', sysdate(), '', null, '鎬у埆濂�'); -insert into sys_dict_data values(3, 3, '鏈煡', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', sysdate(), '', null, '鎬у埆鏈煡'); -insert into sys_dict_data values(4, 1, '鏄剧ず', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '鏄剧ず鑿滃崟'); -insert into sys_dict_data values(5, 2, '闅愯棌', '1', 'sys_show_hide', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '闅愯棌鑿滃崟'); -insert into sys_dict_data values(6, 1, '姝e父', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '姝e父鐘舵��'); -insert into sys_dict_data values(7, 2, '鍋滅敤', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '鍋滅敤鐘舵��'); -insert into sys_dict_data values(8, 1, '姝e父', '0', 'sys_job_status', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '姝e父鐘舵��'); -insert into sys_dict_data values(9, 2, '鏆傚仠', '1', 'sys_job_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '鍋滅敤鐘舵��'); -insert into sys_dict_data values(10, 1, '榛樿', 'DEFAULT', 'sys_job_group', '', '', 'Y', '0', 'admin', sysdate(), '', null, '榛樿鍒嗙粍'); -insert into sys_dict_data values(11, 2, '绯荤粺', 'SYSTEM', 'sys_job_group', '', '', 'N', '0', 'admin', sysdate(), '', null, '绯荤粺鍒嗙粍'); -insert into sys_dict_data values(12, 1, '鏄�', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '绯荤粺榛樿鏄�'); -insert into sys_dict_data values(13, 2, '鍚�', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '绯荤粺榛樿鍚�'); -insert into sys_dict_data values(14, 1, '閫氱煡', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', sysdate(), '', null, '閫氱煡'); -insert into sys_dict_data values(15, 2, '鍏憡', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', sysdate(), '', null, '鍏憡'); -insert into sys_dict_data values(16, 1, '姝e父', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '姝e父鐘舵��'); -insert into sys_dict_data values(17, 2, '鍏抽棴', '1', 'sys_notice_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '鍏抽棴鐘舵��'); -insert into sys_dict_data values(18, 99, '鍏朵粬', '0', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '鍏朵粬鎿嶄綔'); -insert into sys_dict_data values(19, 1, '鏂板', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '鏂板鎿嶄綔'); -insert into sys_dict_data values(20, 2, '淇敼', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '淇敼鎿嶄綔'); -insert into sys_dict_data values(21, 3, '鍒犻櫎', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '鍒犻櫎鎿嶄綔'); -insert into sys_dict_data values(22, 4, '鎺堟潈', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', sysdate(), '', null, '鎺堟潈鎿嶄綔'); -insert into sys_dict_data values(23, 5, '瀵煎嚭', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '瀵煎嚭鎿嶄綔'); -insert into sys_dict_data values(24, 6, '瀵煎叆', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '瀵煎叆鎿嶄綔'); -insert into sys_dict_data values(25, 7, '寮洪��', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '寮洪��鎿嶄綔'); -insert into sys_dict_data values(26, 8, '鐢熸垚浠g爜', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '鐢熸垚鎿嶄綔'); -insert into sys_dict_data values(27, 9, '娓呯┖鏁版嵁', '9', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '娓呯┖鎿嶄綔'); -insert into sys_dict_data values(28, 1, '鎴愬姛', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', sysdate(), '', null, '姝e父鐘舵��'); -insert into sys_dict_data values(29, 2, '澶辫触', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '鍋滅敤鐘舵��'); - - --- ---------------------------- --- 13銆佸弬鏁伴厤缃〃 --- ---------------------------- -drop table if exists sys_config; -create table sys_config ( - config_id int(5) not null auto_increment comment '鍙傛暟涓婚敭', - config_name varchar(100) default '' comment '鍙傛暟鍚嶇О', - config_key varchar(100) default '' comment '鍙傛暟閿悕', - config_value varchar(500) default '' comment '鍙傛暟閿��', - config_type char(1) default 'N' comment '绯荤粺鍐呯疆锛圷鏄� N鍚︼級', - create_by varchar(64) default '' comment '鍒涘缓鑰�', - create_time datetime comment '鍒涘缓鏃堕棿', - update_by varchar(64) default '' comment '鏇存柊鑰�', - update_time datetime comment '鏇存柊鏃堕棿', - remark varchar(500) default null comment '澶囨敞', - primary key (config_id) -) engine=innodb auto_increment=100 comment = '鍙傛暟閰嶇疆琛�'; - -insert into sys_config values(1, '涓绘鏋堕〉-榛樿鐨偆鏍峰紡鍚嶇О', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', sysdate(), '', null, '钃濊壊 skin-blue銆佺豢鑹� skin-green銆佺传鑹� skin-purple銆佺孩鑹� skin-red銆侀粍鑹� skin-yellow' ); -insert into sys_config values(2, '鐢ㄦ埛绠$悊-璐﹀彿鍒濆瀵嗙爜', 'sys.user.initPassword', '123456', 'Y', 'admin', sysdate(), '', null, '鍒濆鍖栧瘑鐮� 123456' ); -insert into sys_config values(3, '涓绘鏋堕〉-渚ц竟鏍忎富棰�', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', sysdate(), '', null, '娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light' ); -insert into sys_config values(4, '璐﹀彿鑷姪-楠岃瘉鐮佸紑鍏�', 'sys.account.captchaEnabled', 'true', 'Y', 'admin', sysdate(), '', null, '鏄惁寮�鍚獙璇佺爜鍔熻兘锛坱rue寮�鍚紝false鍏抽棴锛�'); -insert into sys_config values(5, '璐﹀彿鑷姪-鏄惁寮�鍚敤鎴锋敞鍐屽姛鑳�', 'sys.account.registerUser', 'false', 'Y', 'admin', sysdate(), '', null, '鏄惁寮�鍚敞鍐岀敤鎴峰姛鑳斤紙true寮�鍚紝false鍏抽棴锛�'); -insert into sys_config values(6, '鐢ㄦ埛鐧诲綍-榛戝悕鍗曞垪琛�', 'sys.login.blackIPList', '', 'Y', 'admin', sysdate(), '', null, '璁剧疆鐧诲綍IP榛戝悕鍗曢檺鍒讹紝澶氫釜鍖归厤椤逛互;鍒嗛殧锛屾敮鎸佸尮閰嶏紙*閫氶厤銆佺綉娈碉級'); - - --- ---------------------------- --- 14銆佺郴缁熻闂褰� --- ---------------------------- -drop table if exists sys_logininfor; -create table sys_logininfor ( - info_id bigint(20) not null auto_increment comment '璁块棶ID', - user_name varchar(50) default '' comment '鐢ㄦ埛璐﹀彿', - ipaddr varchar(128) default '' comment '鐧诲綍IP鍦板潃', - login_location varchar(255) default '' comment '鐧诲綍鍦扮偣', - browser varchar(50) default '' comment '娴忚鍣ㄧ被鍨�', - os varchar(50) default '' comment '鎿嶄綔绯荤粺', - status char(1) default '0' comment '鐧诲綍鐘舵�侊紙0鎴愬姛 1澶辫触锛�', - msg varchar(255) default '' comment '鎻愮ず娑堟伅', - login_time datetime comment '璁块棶鏃堕棿', - primary key (info_id), - key idx_sys_logininfor_s (status), - key idx_sys_logininfor_lt (login_time) -) engine=innodb auto_increment=100 comment = '绯荤粺璁块棶璁板綍'; - - --- ---------------------------- --- 15銆佸畾鏃朵换鍔¤皟搴﹁〃 --- ---------------------------- -drop table if exists sys_job; -create table sys_job ( - job_id bigint(20) not null auto_increment comment '浠诲姟ID', - job_name varchar(64) default '' comment '浠诲姟鍚嶇О', - job_group varchar(64) default 'DEFAULT' comment '浠诲姟缁勫悕', - invoke_target varchar(500) not null comment '璋冪敤鐩爣瀛楃涓�', - cron_expression varchar(255) default '' comment 'cron鎵ц琛ㄨ揪寮�', - misfire_policy varchar(20) default '3' comment '璁″垝鎵ц閿欒绛栫暐锛�1绔嬪嵆鎵ц 2鎵ц涓�娆� 3鏀惧純鎵ц锛�', - concurrent char(1) default '1' comment '鏄惁骞跺彂鎵ц锛�0鍏佽 1绂佹锛�', - status char(1) default '0' comment '鐘舵�侊紙0姝e父 1鏆傚仠锛�', - create_by varchar(64) default '' comment '鍒涘缓鑰�', - create_time datetime comment '鍒涘缓鏃堕棿', - update_by varchar(64) default '' comment '鏇存柊鑰�', - update_time datetime comment '鏇存柊鏃堕棿', - remark varchar(500) default '' comment '澶囨敞淇℃伅', - primary key (job_id, job_name, job_group) -) engine=innodb auto_increment=100 comment = '瀹氭椂浠诲姟璋冨害琛�'; - -insert into sys_job values(1, '绯荤粺榛樿锛堟棤鍙傦級', 'DEFAULT', 'ryTask.ryNoParams', '0/10 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, ''); -insert into sys_job values(2, '绯荤粺榛樿锛堟湁鍙傦級', 'DEFAULT', 'ryTask.ryParams(\'ry\')', '0/15 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, ''); -insert into sys_job values(3, '绯荤粺榛樿锛堝鍙傦級', 'DEFAULT', 'ryTask.ryMultipleParams(\'ry\', true, 2000L, 316.50D, 100)', '0/20 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, ''); - - --- ---------------------------- --- 16銆佸畾鏃朵换鍔¤皟搴︽棩蹇楄〃 --- ---------------------------- -drop table if exists sys_job_log; -create table sys_job_log ( - job_log_id bigint(20) not null auto_increment comment '浠诲姟鏃ュ織ID', - job_name varchar(64) not null comment '浠诲姟鍚嶇О', - job_group varchar(64) not null comment '浠诲姟缁勫悕', - invoke_target varchar(500) not null comment '璋冪敤鐩爣瀛楃涓�', - job_message varchar(500) comment '鏃ュ織淇℃伅', - status char(1) default '0' comment '鎵ц鐘舵�侊紙0姝e父 1澶辫触锛�', - exception_info varchar(2000) default '' comment '寮傚父淇℃伅', - create_time datetime comment '鍒涘缓鏃堕棿', - primary key (job_log_id) -) engine=innodb comment = '瀹氭椂浠诲姟璋冨害鏃ュ織琛�'; - - --- ---------------------------- --- 17銆侀�氱煡鍏憡琛� --- ---------------------------- -drop table if exists sys_notice; -create table sys_notice ( - notice_id int(4) not null auto_increment comment '鍏憡ID', - notice_title varchar(50) not null comment '鍏憡鏍囬', - notice_type char(1) not null comment '鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛�', - notice_content longblob default null comment '鍏憡鍐呭', - status char(1) default '0' comment '鍏憡鐘舵�侊紙0姝e父 1鍏抽棴锛�', - create_by varchar(64) default '' comment '鍒涘缓鑰�', - create_time datetime comment '鍒涘缓鏃堕棿', - update_by varchar(64) default '' comment '鏇存柊鑰�', - update_time datetime comment '鏇存柊鏃堕棿', - remark varchar(255) default null comment '澶囨敞', - primary key (notice_id) -) engine=innodb auto_increment=10 comment = '閫氱煡鍏憡琛�'; - --- ---------------------------- --- 鍒濆鍖�-鍏憡淇℃伅琛ㄦ暟鎹� --- ---------------------------- -insert into sys_notice values('1', '娓╅Θ鎻愰啋锛�2018-07-01 鑻ヤ緷鏂扮増鏈彂甯冨暒', '2', '鏂扮増鏈唴瀹�', '0', 'admin', sysdate(), '', null, '绠$悊鍛�'); -insert into sys_notice values('2', '缁存姢閫氱煡锛�2018-07-01 鑻ヤ緷绯荤粺鍑屾櫒缁存姢', '1', '缁存姢鍐呭', '0', 'admin', sysdate(), '', null, '绠$悊鍛�'); - - --- ---------------------------- --- 18銆佷唬鐮佺敓鎴愪笟鍔¤〃 --- ---------------------------- -drop table if exists gen_table; -create table gen_table ( - table_id bigint(20) not null auto_increment comment '缂栧彿', - table_name varchar(200) default '' comment '琛ㄥ悕绉�', - table_comment varchar(500) default '' comment '琛ㄦ弿杩�', - sub_table_name varchar(64) default null comment '鍏宠仈瀛愯〃鐨勮〃鍚�', - sub_table_fk_name varchar(64) default null comment '瀛愯〃鍏宠仈鐨勫閿悕', - class_name varchar(100) default '' comment '瀹炰綋绫诲悕绉�', - tpl_category varchar(200) default 'crud' comment '浣跨敤鐨勬ā鏉匡紙crud鍗曡〃鎿嶄綔 tree鏍戣〃鎿嶄綔锛�', - tpl_web_type varchar(30) default '' comment '鍓嶇妯℃澘绫诲瀷锛坋lement-ui妯$増 element-plus妯$増锛�', - package_name varchar(100) comment '鐢熸垚鍖呰矾寰�', - module_name varchar(30) comment '鐢熸垚妯″潡鍚�', - business_name varchar(30) comment '鐢熸垚涓氬姟鍚�', - function_name varchar(50) comment '鐢熸垚鍔熻兘鍚�', - function_author varchar(50) comment '鐢熸垚鍔熻兘浣滆��', - gen_type char(1) default '0' comment '鐢熸垚浠g爜鏂瑰紡锛�0zip鍘嬬缉鍖� 1鑷畾涔夎矾寰勶級', - gen_path varchar(200) default '/' comment '鐢熸垚璺緞锛堜笉濉粯璁ら」鐩矾寰勶級', - options varchar(1000) comment '鍏跺畠鐢熸垚閫夐」', - create_by varchar(64) default '' comment '鍒涘缓鑰�', - create_time datetime comment '鍒涘缓鏃堕棿', - update_by varchar(64) default '' comment '鏇存柊鑰�', - update_time datetime comment '鏇存柊鏃堕棿', - remark varchar(500) default null comment '澶囨敞', - primary key (table_id) -) engine=innodb auto_increment=1 comment = '浠g爜鐢熸垚涓氬姟琛�'; - - --- ---------------------------- --- 19銆佷唬鐮佺敓鎴愪笟鍔¤〃瀛楁 --- ---------------------------- -drop table if exists gen_table_column; -create table gen_table_column ( - column_id bigint(20) not null auto_increment comment '缂栧彿', - table_id bigint(20) comment '褰掑睘琛ㄧ紪鍙�', - column_name varchar(200) comment '鍒楀悕绉�', - column_comment varchar(500) comment '鍒楁弿杩�', - column_type varchar(100) comment '鍒楃被鍨�', - java_type varchar(500) comment 'JAVA绫诲瀷', - java_field varchar(200) comment 'JAVA瀛楁鍚�', - is_pk char(1) comment '鏄惁涓婚敭锛�1鏄級', - is_increment char(1) comment '鏄惁鑷锛�1鏄級', - is_required char(1) comment '鏄惁蹇呭~锛�1鏄級', - is_insert char(1) comment '鏄惁涓烘彃鍏ュ瓧娈碉紙1鏄級', - is_edit char(1) comment '鏄惁缂栬緫瀛楁锛�1鏄級', - is_list char(1) comment '鏄惁鍒楄〃瀛楁锛�1鏄級', - is_query char(1) comment '鏄惁鏌ヨ瀛楁锛�1鏄級', - query_type varchar(200) default 'EQ' comment '鏌ヨ鏂瑰紡锛堢瓑浜庛�佷笉绛変簬銆佸ぇ浜庛�佸皬浜庛�佽寖鍥达級', - html_type varchar(200) comment '鏄剧ず绫诲瀷锛堟枃鏈銆佹枃鏈煙銆佷笅鎷夋銆佸閫夋銆佸崟閫夋銆佹棩鏈熸帶浠讹級', - dict_type varchar(200) default '' comment '瀛楀吀绫诲瀷', - sort int comment '鎺掑簭', - create_by varchar(64) default '' comment '鍒涘缓鑰�', - create_time datetime comment '鍒涘缓鏃堕棿', - update_by varchar(64) default '' comment '鏇存柊鑰�', - update_time datetime comment '鏇存柊鏃堕棿', - primary key (column_id) -) engine=innodb auto_increment=1 comment = '浠g爜鐢熸垚涓氬姟琛ㄥ瓧娈�'; \ No newline at end of file diff --git a/src/main/java/com/ruoyi/basic/controller/CustomerController.java b/src/main/java/com/ruoyi/basic/controller/CustomerController.java index 1a81652..102517c 100644 --- a/src/main/java/com/ruoyi/basic/controller/CustomerController.java +++ b/src/main/java/com/ruoyi/basic/controller/CustomerController.java @@ -23,23 +23,21 @@ /** * 瀹㈡埛妗fController - * + * * @author ruoyi * @date 2025-05-07 */ @RestController -@RequestMapping("/system/customer") +@RequestMapping("/basic/customer") @AllArgsConstructor -public class CustomerController extends BaseController -{ +public class CustomerController extends BaseController { private ICustomerService customerService; /** * 鏌ヨ瀹㈡埛妗f鍒楄〃 */ @GetMapping("/list") - public TableDataInfo list(Customer customer) - { + public TableDataInfo list(Customer customer) { startPage(); List<Customer> list = customerService.selectCustomerList(customer); return getDataTable(list); @@ -50,9 +48,15 @@ */ @Log(title = "瀹㈡埛妗f", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, Customer customer) - { - List<Customer> list = customerService.selectCustomerList(customer); + public void export(HttpServletResponse response, Customer customer) { + Long[] ids = customer.getIds(); + List<Customer> list; + if (ids != null && ids.length > 0) { + list = customerService.selectCustomerListByIds(ids); + } else { + + list = customerService.selectCustomerList(customer); + } ExcelUtil<Customer> util = new ExcelUtil<Customer>(Customer.class); util.exportExcel(response, list, "瀹㈡埛妗f鏁版嵁"); } @@ -61,8 +65,7 @@ * 鑾峰彇瀹㈡埛妗f璇︾粏淇℃伅 */ @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + public AjaxResult getInfo(@PathVariable("id") Long id) { return success(customerService.selectCustomerById(id)); } @@ -70,9 +73,8 @@ * 鏂板瀹㈡埛妗f */ @Log(title = "瀹㈡埛妗f", businessType = BusinessType.INSERT) - @PostMapping ("/addCustomer") - public AjaxResult add(@RequestBody Customer customer) - { + @PostMapping("/addCustomer") + public AjaxResult add(@RequestBody Customer customer) { return toAjax(customerService.insertCustomer(customer)); } @@ -80,9 +82,8 @@ * 淇敼瀹㈡埛妗f */ @Log(title = "瀹㈡埛妗f", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody Customer customer) - { + @PutMapping ("/updateCustomer") + public AjaxResult edit(@RequestBody Customer customer) { return toAjax(customerService.updateCustomer(customer)); } @@ -90,9 +91,8 @@ * 鍒犻櫎瀹㈡埛妗f */ @Log(title = "瀹㈡埛妗f", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(customerService.deleteCustomerByIds(ids)); } } diff --git a/src/main/java/com/ruoyi/basic/pojo/Customer.java b/src/main/java/com/ruoyi/basic/pojo/Customer.java index 6340aec..ebfd63f 100644 --- a/src/main/java/com/ruoyi/basic/pojo/Customer.java +++ b/src/main/java/com/ruoyi/basic/pojo/Customer.java @@ -1,165 +1,82 @@ package com.ruoyi.basic.pojo; +import java.io.Serializable; import java.util.Date; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.framework.aspectj.lang.annotation.Excel; -import com.ruoyi.framework.web.domain.BaseEntity; /** * 瀹㈡埛妗f瀵硅薄 customer - * + * * @author ruoyi * @date 2025-05-07 */ @TableName(value = "customer") @Data -public class Customer extends BaseEntity -{ +public class Customer implements Serializable { private static final long serialVersionUID = 1L; - /** $column.columnComment */ + /** + * 搴忓彿 + */ + @TableId(type = IdType.AUTO) private Long id; - /** 瀹㈡埛鍚嶇О */ + /** + * 瀹㈡埛鍚嶇О + */ @Excel(name = "瀹㈡埛鍚嶇О") private String customerName; - /** 绾崇◣浜鸿瘑鍒彿 */ + /** + * 绾崇◣浜鸿瘑鍒彿 + */ @Excel(name = "绾崇◣浜鸿瘑鍒彿") private String taxpayerIdentificationNumber; - /** 鍏徃鍦板潃 */ + /** + * 鍏徃鍦板潃 + */ @Excel(name = "鍏徃鍦板潃") private String companyAddress; - /** 鍏徃鐢佃瘽 */ + /** + * 鍏徃鐢佃瘽 + */ @Excel(name = "鍏徃鐢佃瘽") private String companyPhone; - /** 鑱旂郴浜� */ + /** + * 鑱旂郴浜� + */ @Excel(name = "鑱旂郴浜�") private String contactPerson; - /** 鑱旂郴鐢佃瘽 */ + /** + * 鑱旂郴鐢佃瘽 + */ @Excel(name = "鑱旂郴鐢佃瘽") private String contactPhone; - /** 缁存姢浜� */ + /** + * 缁存姢浜� + */ @Excel(name = "缁存姢浜�") private String maintainer; - /** 缁存姢鏃堕棿 */ + /** + * 缁存姢鏃堕棿 + */ @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "缁存姢鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd") + @Excel(name = "缁存姢鏃堕棿" , width = 30, dateFormat = "yyyy-MM-dd") private Date maintenanceTime; - public void setId(Long id) - { - this.id = id; - } + @TableField(fill = FieldFill.INSERT) + private Long tenantId; - public Long getId() - { - return id; - } - - public void setCustomerName(String customerName) - { - this.customerName = customerName; - } - - public String getCustomerName() - { - return customerName; - } - - public void setTaxpayerIdentificationNumber(String taxpayerIdentificationNumber) - { - this.taxpayerIdentificationNumber = taxpayerIdentificationNumber; - } - - public String getTaxpayerIdentificationNumber() - { - return taxpayerIdentificationNumber; - } - - public void setCompanyAddress(String companyAddress) - { - this.companyAddress = companyAddress; - } - - public String getCompanyAddress() - { - return companyAddress; - } - - public void setCompanyPhone(String companyPhone) - { - this.companyPhone = companyPhone; - } - - public String getCompanyPhone() - { - return companyPhone; - } - - public void setContactPerson(String contactPerson) - { - this.contactPerson = contactPerson; - } - - public String getContactPerson() - { - return contactPerson; - } - - public void setContactPhone(String contactPhone) - { - this.contactPhone = contactPhone; - } - - public String getContactPhone() - { - return contactPhone; - } - - public void setMaintainer(String maintainer) - { - this.maintainer = maintainer; - } - - public String getMaintainer() - { - return maintainer; - } - - public void setMaintenanceTime(Date maintenanceTime) - { - this.maintenanceTime = maintenanceTime; - } - - public Date getMaintenanceTime() - { - return maintenanceTime; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("customerName", getCustomerName()) - .append("taxpayerIdentificationNumber", getTaxpayerIdentificationNumber()) - .append("companyAddress", getCompanyAddress()) - .append("companyPhone", getCompanyPhone()) - .append("contactPerson", getContactPerson()) - .append("contactPhone", getContactPhone()) - .append("maintainer", getMaintainer()) - .append("maintenanceTime", getMaintenanceTime()) - .toString(); - } + @TableField(exist = false) + private Long[] ids; } diff --git a/src/main/java/com/ruoyi/basic/service/ICustomerService.java b/src/main/java/com/ruoyi/basic/service/ICustomerService.java index 598506b..b1c7ec5 100644 --- a/src/main/java/com/ruoyi/basic/service/ICustomerService.java +++ b/src/main/java/com/ruoyi/basic/service/ICustomerService.java @@ -52,11 +52,5 @@ */ int deleteCustomerByIds(Long[] ids); - /** - * 鍒犻櫎瀹㈡埛妗f淇℃伅 - * - * @param id 瀹㈡埛妗f涓婚敭 - * @return 缁撴灉 - */ - int deleteCustomerById(Long id); + List<Customer> selectCustomerListByIds(Long[] ids); } diff --git a/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java b/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java index e926f01..f522929 100644 --- a/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java +++ b/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java @@ -7,9 +7,13 @@ import com.ruoyi.basic.mapper.CustomerMapper; import com.ruoyi.basic.pojo.Customer; import com.ruoyi.basic.service.ICustomerService; +import com.ruoyi.common.utils.SecurityUtils; +import com.ruoyi.framework.security.LoginUser; import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import java.util.Arrays; import java.util.List; @@ -21,6 +25,7 @@ */ @Service @AllArgsConstructor +@Slf4j public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> implements ICustomerService { private CustomerMapper customerMapper; @@ -43,7 +48,12 @@ */ @Override public List<Customer> selectCustomerList(Customer customer) { - return customerMapper.selectList(new LambdaQueryWrapper<>()); + LambdaQueryWrapper<Customer> queryWrapper = new LambdaQueryWrapper<>(); + if (customer.getCustomerName() != null && !customer.getCustomerName().isEmpty()) { + queryWrapper.eq(Customer::getCustomerName, customer.getCustomerName()); + } + List<Customer> customerList = customerMapper.selectList(queryWrapper); + return customerList; } /** @@ -54,6 +64,9 @@ */ @Override public int insertCustomer(Customer customer) { + LoginUser loginUser = SecurityUtils.getLoginUser(); + Integer tenantId = loginUser.getTenantId(); + customer.setTenantId(Long.valueOf(tenantId)); return customerMapper.insert(customer); } @@ -65,6 +78,9 @@ */ @Override public int updateCustomer(Customer customer) { + LoginUser loginUser = SecurityUtils.getLoginUser(); + Integer tenantId = loginUser.getTenantId(); + customer.setTenantId(Long.valueOf(tenantId)); return customerMapper.updateById(customer); } @@ -76,17 +92,14 @@ */ @Override public int deleteCustomerByIds(Long[] ids) { - return customerMapper.deleteCustomerByIds(ids); + List<Long> idList = Arrays.asList(ids); + return customerMapper.deleteBatchIds(idList); } - /** - * 鍒犻櫎瀹㈡埛妗f淇℃伅 - * - * @param id 瀹㈡埛妗f涓婚敭 - * @return 缁撴灉 - */ @Override - public int deleteCustomerById(Long id) { - return customerMapper.deleteById(id); + public List<Customer> selectCustomerListByIds(Long[] ids) { + LambdaQueryWrapper<Customer> queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.in(Customer::getId, Arrays.asList(ids)); + return customerMapper.selectList(queryWrapper); } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 49feaee..1a89bcf 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -95,9 +95,8 @@ # 浠ょ墝瀵嗛挜 secret: abcdefghijklmnopqrstuvwxyz # 浠ょ墝鏈夋晥鏈燂紙榛樿30鍒嗛挓锛� - expireTime: 30 + expireTime: 450 -# MyBatis Plus閰嶇疆 # MyBatis Plus閰嶇疆 mybatis-plus: # 鎼滅储鎸囧畾鍖呭埆鍚� 鏍规嵁鑷繁鐨勯」鐩潵 @@ -120,7 +119,7 @@ # Swagger閰嶇疆 swagger: # 鏄惁寮�鍚痵wagger - enabled: true + enabled: false # 璇锋眰鍓嶇紑 pathMapping: /dev-api diff --git a/src/main/resources/mapper/basic/CustomerMapper.xml b/src/main/resources/mapper/basic/CustomerMapper.xml deleted file mode 100644 index d098178..0000000 --- a/src/main/resources/mapper/basic/CustomerMapper.xml +++ /dev/null @@ -1,91 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE mapper -PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="com.ruoyi.basic.mapper.CustomerMapper"> - - <resultMap type="com.ruoyi.basic.pojo.Customer" id="CustomerResult"> - <result property="id" column="id" /> - <result property="customerName" column="customer_name" /> - <result property="taxpayerIdentificationNumber" column="taxpayer_identification_number" /> - <result property="companyAddress" column="company_address" /> - <result property="companyPhone" column="company_phone" /> - <result property="contactPerson" column="contact_person" /> - <result property="contactPhone" column="contact_phone" /> - <result property="maintainer" column="maintainer" /> - <result property="maintenanceTime" column="maintenance_time" /> - </resultMap> - - <sql id="selectCustomerVo"> - select id, customer_name, taxpayer_identification_number, company_address, company_phone, contact_person, contact_phone, maintainer, maintenance_time from customer - </sql> - - <select id="selectCustomerList" parameterType="com.ruoyi.basic.pojo.Customer" resultMap="CustomerResult"> - <include refid="selectCustomerVo"/> - <where> - <if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if> - <if test="taxpayerIdentificationNumber != null and taxpayerIdentificationNumber != ''"> and taxpayer_identification_number = #{taxpayerIdentificationNumber}</if> - <if test="companyAddress != null and companyAddress != ''"> and company_address = #{companyAddress}</if> - <if test="companyPhone != null and companyPhone != ''"> and company_phone = #{companyPhone}</if> - <if test="contactPerson != null and contactPerson != ''"> and contact_person = #{contactPerson}</if> - <if test="contactPhone != null and contactPhone != ''"> and contact_phone = #{contactPhone}</if> - <if test="maintainer != null and maintainer != ''"> and maintainer = #{maintainer}</if> - <if test="maintenanceTime != null "> and maintenance_time = #{maintenanceTime}</if> - </where> - </select> - - <select id="selectCustomerById" parameterType="Long" resultMap="CustomerResult"> - <include refid="selectCustomerVo"/> - where id = #{id} - </select> - - <insert id="insertCustomer" parameterType="com.ruoyi.basic.pojo.Customer" useGeneratedKeys="true" keyProperty="id"> - insert into customer - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="customerName != null and customerName != ''">customer_name,</if> - <if test="taxpayerIdentificationNumber != null and taxpayerIdentificationNumber != ''">taxpayer_identification_number,</if> - <if test="companyAddress != null and companyAddress != ''">company_address,</if> - <if test="companyPhone != null and companyPhone != ''">company_phone,</if> - <if test="contactPerson != null and contactPerson != ''">contact_person,</if> - <if test="contactPhone != null and contactPhone != ''">contact_phone,</if> - <if test="maintainer != null and maintainer != ''">maintainer,</if> - <if test="maintenanceTime != null">maintenance_time,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="customerName != null and customerName != ''">#{customerName},</if> - <if test="taxpayerIdentificationNumber != null and taxpayerIdentificationNumber != ''">#{taxpayerIdentificationNumber},</if> - <if test="companyAddress != null and companyAddress != ''">#{companyAddress},</if> - <if test="companyPhone != null and companyPhone != ''">#{companyPhone},</if> - <if test="contactPerson != null and contactPerson != ''">#{contactPerson},</if> - <if test="contactPhone != null and contactPhone != ''">#{contactPhone},</if> - <if test="maintainer != null and maintainer != ''">#{maintainer},</if> - <if test="maintenanceTime != null">#{maintenanceTime},</if> - </trim> - </insert> - - <update id="updateCustomer" parameterType="com.ruoyi.basic.pojo.Customer"> - update customer - <trim prefix="SET" suffixOverrides=","> - <if test="customerName != null and customerName != ''">customer_name = #{customerName},</if> - <if test="taxpayerIdentificationNumber != null and taxpayerIdentificationNumber != ''">taxpayer_identification_number = #{taxpayerIdentificationNumber},</if> - <if test="companyAddress != null and companyAddress != ''">company_address = #{companyAddress},</if> - <if test="companyPhone != null and companyPhone != ''">company_phone = #{companyPhone},</if> - <if test="contactPerson != null and contactPerson != ''">contact_person = #{contactPerson},</if> - <if test="contactPhone != null and contactPhone != ''">contact_phone = #{contactPhone},</if> - <if test="maintainer != null and maintainer != ''">maintainer = #{maintainer},</if> - <if test="maintenanceTime != null">maintenance_time = #{maintenanceTime},</if> - </trim> - where id = #{id} - </update> - - <delete id="deleteCustomerById" parameterType="Long"> - delete from customer where id = #{id} - </delete> - - <delete id="deleteCustomerByIds" parameterType="String"> - delete from customer where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </delete> -</mapper> \ No newline at end of file -- Gitblit v1.9.3