| | |
| | | discovery: |
| | | # æå¡æ³¨åå°å |
| | | server-addr: 192.168.50.160:8848 |
| | | namespace: 8e9f8829-4286-4925-943a-a6c242767ac2 |
| | | # 注åNacosæ¶å¢å å
æ°æ® ç¨äºGateWay转å |
| | | # metadata: |
| | | # local: zhl |
| | |
| | | # å
±äº«é
ç½® |
| | | shared-configs: |
| | | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} |
| | | namespace: 8e9f8829-4286-4925-943a-a6c242767ac2 |
| | |
| | | discovery: |
| | | # æå¡æ³¨åå°å |
| | | server-addr: 192.168.50.160:8848 |
| | | namespace: 8e9f8829-4286-4925-943a-a6c242767ac2 |
| | | # 注åNacosæ¶å¢å å
æ°æ® ç¨äºGateWay转å |
| | | # metadata: |
| | | # local: zhl |
| | |
| | | # å
±äº«é
ç½® |
| | | shared-configs: |
| | | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} |
| | | namespace: 8e9f8829-4286-4925-943a-a6c242767ac2 |
| | | sentinel: |
| | | # åæ¶æ§å¶å°æå è½½ |
| | | eager: true |
| | |
| | | discovery: |
| | | # æå¡æ³¨åå°å |
| | | server-addr: 192.168.50.160:8848 |
| | | namespace: 8e9f8829-4286-4925-943a-a6c242767ac2 |
| | | metadata: |
| | | local: wwj |
| | | config: |
| | |
| | | server-addr: 192.168.50.160:8848 |
| | | # é
ç½®æä»¶æ ¼å¼ |
| | | file-extension: yml |
| | | namespace: 8e9f8829-4286-4925-943a-a6c242767ac2 |
| | | # å
±äº«é
ç½® |
| | | shared-configs: |
| | | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} |
| | |
| | | discovery: |
| | | # æå¡æ³¨åå°å |
| | | server-addr: 192.168.50.160:8848 |
| | | namespace: 8e9f8829-4286-4925-943a-a6c242767ac2 |
| | | config: |
| | | # é
ç½®ä¸å¿å°å |
| | | server-addr: 192.168.50.160:8848 |
| | | # é
ç½®æä»¶æ ¼å¼ |
| | | file-extension: yml |
| | | namespace: 8e9f8829-4286-4925-943a-a6c242767ac2 |
| | | # å
±äº«é
ç½® |
| | | shared-configs: |
| | | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} |
| | |
| | | <groupId>org.apache.velocity</groupId> |
| | | <artifactId>velocity-engine-core</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- Mysql Connector --> |
| | | |
| | | <!-- PostgreSql驱å¨å
--> |
| | | <dependency> |
| | | <groupId>com.mysql</groupId> |
| | | <artifactId>mysql-connector-j</artifactId> |
| | | <groupId>org.postgresql</groupId> |
| | | <artifactId>postgresql</artifactId> |
| | | <version>42.2.14</version> |
| | | </dependency> |
| | | |
| | | <!-- RuoYi Common Log --> |
| | |
| | | discovery: |
| | | # æå¡æ³¨åå°å |
| | | server-addr: 192.168.50.160:8848 |
| | | namespace: 8e9f8829-4286-4925-943a-a6c242767ac2 |
| | | config: |
| | | # é
ç½®ä¸å¿å°å |
| | | server-addr: 192.168.50.160:8848 |
| | | # é
ç½®æä»¶æ ¼å¼ |
| | | file-extension: yml |
| | | namespace: 8e9f8829-4286-4925-943a-a6c242767ac2 |
| | | # å
±äº«é
ç½® |
| | | shared-configs: |
| | | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} |
| | |
| | | <if test="dictType != null and dictType != ''">#{dictType},</if> |
| | | <if test="sort != null">#{sort},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="dictType != null">dict_type = #{dictType},</if> |
| | | <if test="sort != null">sort = #{sort},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where column_id = #{columnId} |
| | | </update> |
| | |
| | | <if test="genPath != null and genPath != ''">#{genPath},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="options != null and options != ''">options = #{options},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where table_id = #{tableId} |
| | | </update> |
| | |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | |
| | | <!-- Mysql Connector --> |
| | | |
| | | <!-- PostgreSql驱å¨å
--> |
| | | <dependency> |
| | | <groupId>com.mysql</groupId> |
| | | <artifactId>mysql-connector-j</artifactId> |
| | | <groupId>org.postgresql</groupId> |
| | | <artifactId>postgresql</artifactId> |
| | | <version>42.2.14</version> |
| | | </dependency> |
| | | |
| | | <!-- RuoYi Common Log --> |
| | |
| | | discovery: |
| | | # æå¡æ³¨åå°å |
| | | server-addr: 192.168.50.160:8848 |
| | | namespace: 8e9f8829-4286-4925-943a-a6c242767ac2 |
| | | config: |
| | | # é
ç½®ä¸å¿å°å |
| | | server-addr: 192.168.50.160:8848 |
| | | # é
ç½®æä»¶æ ¼å¼ |
| | | file-extension: yml |
| | | namespace: 8e9f8829-4286-4925-943a-a6c242767ac2 |
| | | # å
±äº«é
ç½® |
| | | shared-configs: |
| | | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} |
| | |
| | | <if test="jobMessage != null and jobMessage != ''">#{jobMessage},</if> |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="exceptionInfo != null and exceptionInfo != ''">#{exceptionInfo},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="status !=null">status = #{status},</if> |
| | | <if test="remark != null and remark != ''">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where job_id = #{jobId} |
| | | </update> |
| | |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | </dependency> |
| | | |
| | | <!-- Mysql Connector --> |
| | | <!-- PostgreSql驱å¨å
--> |
| | | <dependency> |
| | | <groupId>com.mysql</groupId> |
| | | <artifactId>mysql-connector-j</artifactId> |
| | | <groupId>org.postgresql</groupId> |
| | | <artifactId>postgresql</artifactId> |
| | | <version>42.2.14</version> |
| | | </dependency> |
| | | |
| | | <!-- RuoYi Common DataSource --> |
| | |
| | | # ip: 192.168.50.13 |
| | | metadata: |
| | | local: wwj |
| | | namespace: 8e9f8829-4286-4925-943a-a6c242767ac2 |
| | | config: |
| | | # é
ç½®ä¸å¿å°å |
| | | server-addr: 192.168.50.160:8848 |
| | |
| | | # å
±äº«é
ç½® |
| | | shared-configs: |
| | | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} |
| | | namespace: 8e9f8829-4286-4925-943a-a6c242767ac2 |
| | |
| | | <if test="configType != null and configType != ''">#{configType},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="configType != null and configType != ''">config_type = #{configType},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where config_id = #{configId} |
| | | </update> |
| | |
| | | <if test="email != null and email != ''">#{email},</if> |
| | | <if test="status != null">#{status},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="email != null">email = #{email},</if> |
| | | <if test="status != null and status != ''">status = #{status},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where dept_id = #{deptId} |
| | | </update> |
| | |
| | | <if test="status != null">status = #{status},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where dict_code = #{dictCode} |
| | | </update> |
| | |
| | | <if test="status != null">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="status != null">status = #{status},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where dict_id = #{dictId} |
| | | </update> |
| | |
| | | <if test="status != null">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | |
| | | <insert id="insertLogininfor" parameterType="SysLogininfor"> |
| | | insert into sys_logininfor (user_name, status, ipaddr, msg, access_time) |
| | | values (#{userName}, #{status}, #{ipaddr}, #{msg}, sysdate()) |
| | | values (#{userName}, #{status}, #{ipaddr}, #{msg}, now()) |
| | | </insert> |
| | | |
| | | <select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult"> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectMenuVo"> |
| | | select menu_id, menu_name, parent_id, order_num, path, component, `query`, route_name, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time |
| | | select menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache, menu_type, visible, status, COALESCE(perms,'') as perms, icon, create_time |
| | | from sys_menu |
| | | </sql> |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="selectMenuTreeAll" resultMap="SysMenuResult"> |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.route_name, m.visible, m.status, COALESCE(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0 |
| | | order by m.parent_id, m.order_num |
| | | </select> |
| | | |
| | | <select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult"> |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.route_name, m.visible, m.status, COALESCE(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | from sys_menu m |
| | | left join sys_role_menu rm on m.menu_id = rm.menu_id |
| | | left join sys_user_role ur on rm.role_id = ur.role_id |
| | |
| | | </select> |
| | | |
| | | <select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult"> |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.route_name, m.visible, m.status, COALESCE(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | from sys_menu m |
| | | left join sys_role_menu rm on m.menu_id = rm.menu_id |
| | | left join sys_user_role ur on rm.role_id = ur.role_id |
| | |
| | | <if test="orderNum != null">order_num = #{orderNum},</if> |
| | | <if test="path != null and path != ''">path = #{path},</if> |
| | | <if test="component != null">component = #{component},</if> |
| | | <if test="query != null">`query` = #{query},</if> |
| | | <if test="query != null">query = #{query},</if> |
| | | <if test="routeName != null">route_name = #{routeName},</if> |
| | | <if test="isFrame != null and isFrame != ''">is_frame = #{isFrame},</if> |
| | | <if test="isCache != null and isCache != ''">is_cache = #{isCache},</if> |
| | |
| | | <if test="icon !=null and icon != ''">icon = #{icon},</if> |
| | | <if test="remark != null and remark != ''">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where menu_id = #{menuId} |
| | | </update> |
| | |
| | | <if test="orderNum != null">order_num,</if> |
| | | <if test="path != null and path != ''">path,</if> |
| | | <if test="component != null and component != ''">component,</if> |
| | | <if test="query != null and query != ''">`query`,</if> |
| | | <if test="query != null and query != ''">query,</if> |
| | | <if test="routeName != null">route_name,</if> |
| | | <if test="isFrame != null and isFrame != ''">is_frame,</if> |
| | | <if test="isCache != null and isCache != ''">is_cache,</if> |
| | |
| | | <if test="icon != null and icon != ''">#{icon},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="status != null and status != ''">#{status}, </if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="noticeContent != null">notice_content = #{noticeContent}, </if> |
| | | <if test="status != null and status != ''">status = #{status}, </if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where notice_id = #{noticeId} |
| | | </update> |
| | |
| | | |
| | | <insert id="insertOperlog" parameterType="SysOperLog"> |
| | | insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_param, json_result, status, error_msg, cost_time, oper_time) |
| | | values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate()) |
| | | values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, now()) |
| | | </insert> |
| | | |
| | | <select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult"> |
| | |
| | | <if test="status != null and status != ''">status = #{status},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where post_id = #{postId} |
| | | </update> |
| | |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="status != null and status != ''">status = #{status},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where role_id = #{roleId} |
| | | </update> |
| | |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | sysdate() |
| | | now() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="loginDate != null">login_date = #{loginDate},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | update_time = sysdate() |
| | | update_time = now() |
| | | </set> |
| | | where user_id = #{userId} |
| | | </update> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | -- ---------------------------- |
| | | -- 1ãé¨é¨è¡¨ |
| | | -- ---------------------------- |
| | | |
| | | drop table if exists sys_dept; |
| | | |
| | | create table sys_dept ( |
| | | dept_id BIGSERIAL not null, |
| | | parent_id BIGINT null default 0, |
| | | ancestors VARCHAR(50) null, |
| | | dept_name VARCHAR(30) null default '', |
| | | order_num INT4 null default '0', |
| | | leader VARCHAR(20) null default '', |
| | | phone VARCHAR(20) null default '', |
| | | email VARCHAR(20) null default '', |
| | | status CHAR(1) null default '0', |
| | | del_flag CHAR(1) null default '0', |
| | | create_by VARCHAR(64) null default '', |
| | | create_time TIMESTAMP null, |
| | | update_by VARCHAR(64) null default '', |
| | | update_time TIMESTAMP null, |
| | | constraint PK_SYS_DEPT primary key (dept_id) |
| | | ); |
| | | alter sequence if exists sys_dept_dept_id_seq restart with 200 cache 20; |
| | | |
| | | comment on table sys_dept is 'é¨é¨è¡¨'; |
| | | comment on column sys_dept.dept_id is 'é¨é¨id'; |
| | | comment on column sys_dept.parent_id is 'ç¶é¨é¨id'; |
| | | comment on column sys_dept.ancestors is 'ç¥çº§å表'; |
| | | comment on column sys_dept.dept_name is 'é¨é¨åç§°'; |
| | | comment on column sys_dept.order_num is 'æ¾ç¤ºé¡ºåº'; |
| | | comment on column sys_dept.leader is 'è´è´£äºº'; |
| | | comment on column sys_dept.phone is 'èç³»çµè¯'; |
| | | comment on column sys_dept.email is 'é®ç®±'; |
| | | comment on column sys_dept.status is 'é¨é¨ç¶æ:0æ£å¸¸,1åç¨'; |
| | | comment on column sys_dept.del_flag is 'å 餿 å¿ï¼0代表åå¨ 2代表å é¤ï¼'; |
| | | comment on column sys_dept.create_by is 'å建è
'; |
| | | comment on column sys_dept.create_time is 'å建æ¶é´'; |
| | | comment on column sys_dept.update_by is 'æ´æ°è
'; |
| | | comment on column sys_dept.update_time is 'æ´æ°æ¶é´'; |
| | | |
| | | -- ---------------------------- |
| | | -- 1.1 åå§å-é¨é¨è¡¨æ°æ® |
| | | -- ---------------------------- |
| | | insert into sys_dept values(100, 0, '0', 'æ±èç§æå¤§å¦', 0, 'æ±æäºº', '15888888888', 'mr8god@hotmail.com', '0', '0', 'admin', now(), '', null); |
| | | insert into sys_dept values(101, 100, '0,100', 'å¼ å®¶æ¸¯æ ¡åº', 1, 'æ±æäºº', '15888888888', 'mr8god@hotmail.com', '0', '0', 'admin', now(), '', null); |
| | | insert into sys_dept values(102, 100, '0,100', 'èå·çå·¥å¦é¢', 2, 'æ±æäºº', '15888888888', 'mr8god@hotmail.com', '0', '0', 'admin', now(), '', null); |
| | | insert into sys_dept values(103, 101, '0,100,101', 'çµæ°ä¸ä¿¡æ¯å·¥ç¨å¦é¢', 1, 'æ±æäºº', '15888888888', 'mr8god@hotmail.com', '0', '0', 'admin',now(), '', null); |
| | | insert into sys_dept values(104, 101, '0,100,101', 'åå¦é¢', 2, 'æ±æäºº', '15888888888', 'mr8god@hotmail.com', '0', '0', 'admin',now(), '', null); |
| | | insert into sys_dept values(105, 101, '0,100,101', 'å
Œ
±ä¸æè²å¦é¢', 3, 'æ±æäºº', '15888888888', 'mr8god@hotmail.com', '0', '0', 'admin',now(), '', null); |
| | | insert into sys_dept values(106, 101, '0,100,101', 'å¶é䏿æå¦é¢', 4, 'æ±æäºº', '15888888888', 'mr8god@hotmail.com', '0', '0', 'admin',now(), '', null); |
| | | insert into sys_dept values(107, 101, '0,100,101', 'æºæ¢°ä¸å¨åå·¥ç¨å¦é¢', 5, 'æ±æäºº', '15888888888', 'mr8god@hotmail.com', '0', '0', 'admin',now(), '', null); |
| | | insert into sys_dept values(108, 102, '0,100,102', 'çµæ°ä¸ä¿¡æ¯å·¥ç¨å¦é¢', 1, 'æ±æäºº', '15888888888', 'mr8god@hotmail.com', '0', '0', 'admin',now(), '', null); |
| | | insert into sys_dept values(109, 102, '0,100,102', 'åå¦é¢', 2, 'æ±æäºº', '15888888888', 'mr8god@hotmail.com', '0', '0', 'admin',now(), '', null); |
| | | |
| | | |
| | | |
| | | |
| | | -- ---------------------------- |
| | | -- 2ãç¨æ·ä¿¡æ¯è¡¨ |
| | | -- ---------------------------- |
| | | drop table if exists sys_user; |
| | | |
| | | create table sys_user ( |
| | | user_id BIGSERIAL not null, |
| | | dept_id BIGINT null default NULL, |
| | | user_name VARCHAR(30) null default '', |
| | | nick_name VARCHAR(30) null default '', |
| | | user_type VARCHAR(2) null default '00', |
| | | email VARCHAR(100) null default '', |
| | | phonenumber VARCHAR(20) null default '', |
| | | sex CHAR(1) null default '0', |
| | | avatar VARCHAR(100) null, |
| | | password VARCHAR(100) null default '', |
| | | salt VARCHAR(100) null default '', |
| | | status CHAR(1) null default '0', |
| | | del_flag CHAR(1) null default '0', |
| | | login_ip VARCHAR(50) null default '', |
| | | login_date TIMESTAMP null, |
| | | pwd_update_date TIMESTAMP null, |
| | | create_by VARCHAR(64) null default '', |
| | | create_time TIMESTAMP null, |
| | | update_by VARCHAR(64) null default '', |
| | | update_time TIMESTAMP null, |
| | | remark VARCHAR(500) null, |
| | | constraint PK_SYS_USER primary key (user_id) |
| | | ); |
| | | |
| | | alter sequence if exists sys_user_user_id_seq restart with 100 cache 20; |
| | | |
| | | comment on table sys_user is 'ç¨æ·ä¿¡æ¯è¡¨'; |
| | | comment on column sys_user.user_id is 'ç¨æ·ID'; |
| | | comment on column sys_user.dept_id is 'é¨é¨ID'; |
| | | comment on column sys_user.user_name is 'ç»å½è´¦å·'; |
| | | comment on column sys_user.nick_name is 'ç¨æ·æµç§°'; |
| | | comment on column sys_user.user_type is 'ç±»å:Yé»è®¤ç¨æ·,Néé»è®¤ç¨æ·'; |
| | | comment on column sys_user.email is 'ç¨æ·é®ç®±'; |
| | | comment on column sys_user.phonenumber is 'ææºå·ç '; |
| | | comment on column sys_user.sex is 'ç¨æ·æ§å«ï¼0ç· 1女 2æªç¥ï¼'; |
| | | comment on column sys_user.avatar is '头åè·¯å¾'; |
| | | comment on column sys_user.password is 'å¯ç '; |
| | | comment on column sys_user.salt is 'çå å¯'; |
| | | comment on column sys_user.status is 'å¸å·ç¶æ:0æ£å¸¸,1ç¦ç¨'; |
| | | comment on column sys_user.del_flag is 'æç»ç»å½æè¿°'; |
| | | comment on column sys_user.login_ip is 'æåç»å½IP'; |
| | | comment on column sys_user.login_date is 'æåç»å½æ¶é´'; |
| | | comment on column sys_user.pwd_update_date is 'å¯ç æåæ´æ°æ¶é´'; |
| | | comment on column sys_user.create_by is 'å建è
'; |
| | | comment on column sys_user.create_time is 'å建æ¶é´'; |
| | | comment on column sys_user.update_by is 'æ´æ°è
'; |
| | | comment on column sys_user.update_time is 'æ´æ°æ¶é´'; |
| | | comment on column sys_user.remark is '夿³¨'; |
| | | |
| | | -- ---------------------------- |
| | | -- åå§å-ç¨æ·ä¿¡æ¯è¡¨æ°æ® |
| | | -- ---------------------------- |
| | | insert into sys_user values(1, 103, 'admin', 'admin', '00', 'Mr8god@hotmail.com', '17696748602', '0', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '111111', '0', '0', '127.0.0.1', now(),now(), 'admin', now(), '', null, '管çå'); |
| | | insert into sys_user values(2, 100, 'JCW', 'æ±æ¨ç', '00', '17696748622@163.com', '17696748622', '0', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0615a7', '0', '0', '172.23.128.1', now(),now(), 'admin', now(), '', null, 'åéçè¶
级å¦çï¼ä¸»è¦åçäºæ
å°±æ¯å²ä»ä¸«ç'); |
| | | |
| | | |
| | | -- ---------------------------- |
| | | -- 3ãå²ä½ä¿¡æ¯è¡¨ |
| | | -- ---------------------------- |
| | | drop table if exists sys_post; |
| | | create table sys_post ( |
| | | post_id BIGSERIAL not null, |
| | | post_code VARCHAR(64) not null, |
| | | post_name VARCHAR(100) not null, |
| | | post_sort INT4 not null, |
| | | status CHAR(1) not null, |
| | | create_by VARCHAR(64) null default '', |
| | | create_time TIMESTAMP null, |
| | | update_by VARCHAR(64) null default '', |
| | | update_time TIMESTAMP null, |
| | | remark VARCHAR(500) null default '', |
| | | constraint PK_SYS_POST primary key (post_id) |
| | | ); |
| | | alter sequence if exists sys_post_post_id_seq restart with 10 cache 20; |
| | | |
| | | comment on table sys_post is 'å²ä½ä¿¡æ¯è¡¨'; |
| | | comment on column sys_post.post_id is 'å²ä½ID'; |
| | | comment on column sys_post.post_code is 'å²ä½ç¼ç '; |
| | | comment on column sys_post.post_name is 'å²ä½åç§°'; |
| | | comment on column sys_post.post_sort is 'æ¾ç¤ºé¡ºåº'; |
| | | comment on column sys_post.status is 'ç¶æï¼0æ£å¸¸ 1åç¨ï¼'; |
| | | comment on column sys_post.create_by is 'å建è
'; |
| | | comment on column sys_post.create_time is 'å建æ¶é´'; |
| | | comment on column sys_post.update_by is 'æ´æ°è
'; |
| | | comment on column sys_post.update_time is 'æ´æ°æ¶é´'; |
| | | comment on column sys_post.remark is '夿³¨'; |
| | | |
| | | -- ---------------------------- |
| | | -- åå§å-å²ä½ä¿¡æ¯è¡¨æ°æ® |
| | | -- ---------------------------- |
| | | insert into sys_post values(1, 'SuperAdmin', 'è¶
级管çå', 1, '0', 'admin', now(), '', now(), ''); |
| | | insert into sys_post values(2, 'smt', 'å¦ç管çç§èå¸', 2, '0', 'admin', now(), '', now(), ''); |
| | | insert into sys_post values(3, 'sct', 'äºçº§å¦å¢èå¸', 3, '0', 'admin', now(), '', now(), ''); |
| | | insert into sys_post values(4, 'ct', 'ç导å¸', 4, '0', 'admin', now(), '', now(), ''); |
| | | insert into sys_post values(5, 'stu', 'å¦çç¨æ·', 5, '0', 'admin', now(), '', now(), ''); |
| | | insert into sys_post values(6, 'pndcjstu', 'åéçè¶
级å¦çç¨æ·', 6, '0', 'admin', now(), '', now(), ''); |
| | | |
| | | -- ---------------------------- |
| | | -- 4ãè§è²ä¿¡æ¯è¡¨ |
| | | -- ---------------------------- |
| | | drop table if exists sys_role; |
| | | create table sys_role ( |
| | | role_id BIGSERIAL not null, |
| | | role_name VARCHAR(30) not null, |
| | | role_key VARCHAR(100) not null, |
| | | role_sort INT4 null, |
| | | data_scope CHAR(1) default '1', |
| | | menu_check_strictly BOOLEAN default '1', |
| | | dept_check_strictly BOOLEAN default '1', |
| | | status CHAR(1) null default '0', |
| | | del_flag CHAR(1) null default '0', |
| | | create_by VARCHAR(64) null default '', |
| | | create_time TIMESTAMP null, |
| | | update_by VARCHAR(64) null default '', |
| | | update_time TIMESTAMP null, |
| | | remark VARCHAR(500) null default '', |
| | | constraint PK_SYS_ROLE primary key (role_id) |
| | | ); |
| | | alter sequence if exists sys_role_role_id_seq restart with 100 cache 20; |
| | | comment on table sys_role is 'è§è²ä¿¡æ¯è¡¨'; |
| | | comment on column sys_role.role_id is 'è§è²ID'; |
| | | comment on column sys_role.role_name is 'è§è²åç§°'; |
| | | comment on column sys_role.role_key is 'è§è²æéå符串'; |
| | | comment on column sys_role.role_sort is 'æ¾ç¤ºé¡ºåº'; |
| | | comment on column sys_role.data_scope is 'æ°æ®èå´ï¼1ï¼å
¨é¨æ°æ®æé 2ï¼èªå®æ°æ®æéï¼'; |
| | | comment on column sys_role.status is 'è§è²ç¶æï¼0æ£å¸¸ 1åç¨ï¼'; |
| | | comment on column sys_role.del_flag is 'å 餿 å¿ï¼0代表åå¨ 2代表å é¤ï¼'; |
| | | comment on column sys_role.create_by is 'å建è
'; |
| | | comment on column sys_role.create_time is 'å建æ¶é´'; |
| | | comment on column sys_role.update_by is 'æ´æ°è
'; |
| | | comment on column sys_role.update_time is 'æ´æ°æ¶é´'; |
| | | comment on column sys_role.remark is '夿³¨'; |
| | | -- ---------------------------- |
| | | -- åå§å-è§è²ä¿¡æ¯è¡¨æ°æ® |
| | | -- ---------------------------- |
| | | insert into sys_role values('1', 'è¶
级管çå', 'admin', 1, 1, '1', '1', '0', '0', 'admin', now(), '', null, 'è¶
级管çå'); |
| | | insert into sys_role values('2', 'è¶
çº§æ´æ°æ±æäºº', 'angry', 2, 2, '1', '1', '0', '0', 'admin', now(), '', null, 'æ®éè§è²'); |
| | | insert into sys_role values('3', 'å¦ç管çç§èå¸', 'stu-man-teacher', 3, 2, '1', '1', '0', '0', 'admin', now(), '', null, 'æ®éè§è²'); |
| | | insert into sys_role values('4', 'äºçº§å¦å¢èå¸', 'sed-club-teacher', 4, 2, '1', '1', '0', '0', 'admin', now(), '', null, 'æ®éè§è²'); |
| | | insert into sys_role values('5', 'ç导å¸', 'class-tutor', 5, 2, '1', '1', '0', '0', 'admin', now(), '', null, 'æ®éè§è²'); |
| | | insert into sys_role values('6', 'å¦ç', 'student', 6, 2, '1', '1', '0', '0', 'admin', now(), '', null, 'æ®éè§è²'); |
| | | |
| | | |
| | | |
| | | -- ---------------------------- |
| | | -- 5ãèåæé表 |
| | | -- ---------------------------- |
| | | drop table if exists sys_menu; |
| | | create table sys_menu ( |
| | | menu_id BIGSERIAL not null, |
| | | menu_name VARCHAR(50) not null, |
| | | parent_id BIGINT null default 0, |
| | | order_num INT4 null default NULL, |
| | | path VARCHAR(200) null default '', |
| | | component VARCHAR(255) null default '', |
| | | is_frame INT null default 1, |
| | | is_cache INT null default 0, |
| | | menu_type CHAR(1) null default '', |
| | | visible INT null default 0, |
| | | status int2 null default 0, |
| | | perms VARCHAR(100) null default '', |
| | | icon VARCHAR(100) null default '', |
| | | create_by VARCHAR(64) null default '', |
| | | create_time TIMESTAMP null, |
| | | update_by VARCHAR(64) null default '', |
| | | update_time TIMESTAMP null, |
| | | remark VARCHAR(500) null default '', |
| | | constraint PK_SYS_MENU primary key (menu_id) |
| | | ); |
| | | alter sequence if exists sys_menu_menu_id_seq restart with 2000 cache 20; |
| | | |
| | | comment on table sys_menu is 'èåæé表'; |
| | | comment on column sys_menu.menu_id is 'èåID'; |
| | | comment on column sys_menu.menu_name is 'èååç§°'; |
| | | comment on column sys_menu.parent_id is 'ç¶èåID'; |
| | | comment on column sys_menu.order_num is 'æ¾ç¤ºé¡ºåº'; |
| | | comment on column sys_menu.path is '请æ±å°å'; |
| | | comment on column sys_menu.component is 'æå¼æ¹å¼ï¼menuItemé¡µç¾ menuBlankæ°çªå£ï¼'; |
| | | comment on column sys_menu.is_frame is 'æ¯å¦ä¸ºå¤é¾ï¼0æ¯ 1å¦ï¼'; |
| | | comment on column sys_menu.is_cache is 'æ¯å¦ç¼åï¼0ç¼å 1ä¸ç¼åï¼'; |
| | | comment on column sys_menu.menu_type is 'ç±»å:Mç®å½,Cèå,Fæé®'; |
| | | comment on column sys_menu.visible is 'èåç¶æ:0æ¾ç¤º,1éè'; |
| | | comment on column sys_menu.status is 'èåç¶æï¼0æ£å¸¸ 1åç¨ï¼'; |
| | | comment on column sys_menu.perms is 'æéæ è¯'; |
| | | comment on column sys_menu.icon is 'èå徿 '; |
| | | comment on column sys_menu.create_by is 'å建è
'; |
| | | comment on column sys_menu.create_time is 'å建æ¶é´'; |
| | | comment on column sys_menu.update_by is 'æ´æ°è
'; |
| | | comment on column sys_menu.update_time is 'æ´æ°æ¶é´'; |
| | | comment on column sys_menu.remark is '夿³¨'; |
| | | |
| | | -- ---------------------------- |
| | | -- åå§å-èåä¿¡æ¯è¡¨æ°æ® |
| | | -- ---------------------------- |
| | | -- ä¸çº§èå |
| | | insert into sys_menu values('1', 'ç³»ç»ç®¡ç', '0', '1', 'system', '', 1, 0, 'M',0, 0,'', 'system', 'admin', now(), '', null, 'ç³»ç»ç®¡çç®å½'); |
| | | insert into sys_menu values('2', 'ç³»ç»çæ§', '0', '2', 'monitor', '', 1, 0, 'M',0, 0,'', 'monitor', 'admin', now(), '', null, 'ç³»ç»çæ§ç®å½'); |
| | | insert into sys_menu values('3', 'ç³»ç»å·¥å
·', '0', '3', 'tool', '', 1, 0, 'M',0, 0,'', 'tool', 'admin', now(), '', null, 'ç³»ç»å·¥å
·ç®å½'); |
| | | insert into sys_menu values('4', 'æ±æäººå®ç½', '0', '4', 'http://ruoyi.vip', 'menuBlank', 0, 0, 'C',0, 0,'', 'guide', 'admin', now(), '', null, 'æ±æäººå®ç½å°å'); |
| | | -- äºçº§èå |
| | | insert into sys_menu values('100', 'ç¨æ·ç®¡ç', '1', '1', 'user', 'system/user/index', 1, 0, 'C', 0, 0, 'system:user:list', 'user', 'admin', now(), '', null, 'ç¨æ·ç®¡çèå'); |
| | | insert into sys_menu values('101', 'è§è²ç®¡ç', '1', '2', 'role', 'system/role/index', 1, 0, 'C', 0, 0, 'system:role:list', 'peoples', 'admin', now(), '', null, 'è§è²ç®¡çèå'); |
| | | insert into sys_menu values('102', 'èå管ç', '1', '3', 'menu', 'system/menu/index', 1, 0, 'C', 0, 0, 'system:menu:list', 'tree-table', 'admin', now(), '', null, 'èå管çèå'); |
| | | insert into sys_menu values('103', 'é¨é¨ç®¡ç', '1', '4', 'dept', 'system/dept/index', 1, 0, 'C', 0, 0, 'system:dept:list', 'tree', 'admin', now(), '', null, 'é¨é¨ç®¡çèå'); |
| | | insert into sys_menu values('104', 'å²ä½ç®¡ç', '1', '5', 'post', 'system/post/index', 1, 0, 'C', 0, 0, 'system:post:list', 'post', 'admin', now(), '', null, 'å²ä½ç®¡çèå'); |
| | | insert into sys_menu values('105', 'åå
¸ç®¡ç', '1', '6', 'dict', 'system/dict/index', 1, 0, 'C', 0, 0, 'system:dict:list', 'dict', 'admin', now(), '', null, 'åå
¸ç®¡çèå'); |
| | | insert into sys_menu values('106', 'åæ°è®¾ç½®', '1', '7', 'config', 'system/config/index', 1, 0, 'C', 0, 0, 'system:config:list', 'edit', 'admin', now(), '', null, 'åæ°è®¾ç½®èå'); |
| | | insert into sys_menu values('107', 'éç¥å
¬å', '1', '8', 'notice', 'system/notice/index', 1, 0, 'C', 0, 0, 'system:notice:list', 'message', 'admin', now(), '', null, 'éç¥å
¬åèå'); |
| | | insert into sys_menu values('108', 'æ¥å¿ç®¡ç', '1', '9', 'log', '', 1, 0, 'M', 0, 0, '', 'log', 'admin', now(), '', null, 'æ¥å¿ç®¡çèå'); |
| | | insert into sys_menu values('109', 'å¨çº¿ç¨æ·', '2', '1', 'online', 'monitor/online/index', 1, 0, 'C', 0, 0, 'monitor:online:list', 'online', 'admin', now(), '', null, 'å¨çº¿ç¨æ·èå'); |
| | | insert into sys_menu values('110', '宿¶ä»»å¡', '2', '2', 'job', 'monitor/job/index', 1, 0, 'C', 0, 0, 'monitor:job:list', 'job', 'admin', now(), '', null, '宿¶ä»»å¡èå'); |
| | | insert into sys_menu values('111', 'æ°æ®çæ§', '2', '3', 'druid', 'monitor/druid/index', 1, 0, 'C', 0, 0, 'monitor:data:list', 'druid', 'admin', now(), '', null, 'æ°æ®çæ§èå'); |
| | | insert into sys_menu values('112', 'æå¡çæ§', '2', '4', 'server', 'monitor/server/index', 1, 0, 'C', 0, 0, 'monitor:server:list', 'server', 'admin', now(), '', null, 'æå¡çæ§èå'); |
| | | insert into sys_menu values('113', 'ç¼åçæ§', '2', '5', 'cache', 'monitor/cache/index', 1, 0, 'C', '0', '0', 'monitor:cache:query', 'redis', 'admin', now(), '', null, 'ç¼åçæ§èå'); |
| | | insert into sys_menu values('114', '表åæå»º', '3', '1', 'build', 'tool/build/index', 1, 0, 'C', 0, 0, 'tool:build:list', 'build', 'admin', now(), '', null, '表åæå»ºèå'); |
| | | insert into sys_menu values('115', '代ç çæ', '3', '2', 'gen', 'tool/gen/index', 1, 0, 'C', 0, 0, 'tool:gen:list', 'code', 'admin', now(), '', null, '代ç çæèå'); |
| | | insert into sys_menu values('116', 'ç³»ç»æ¥å£', '3', '3', 'swagger', 'tool/swagger/index', 1, 0, 'C', 0, 0, 'tool:swagger:list', 'swagger', 'admin', now(), '', null, 'ç³»ç»æ¥å£èå'); |
| | | -- ä¸çº§èå |
| | | insert into sys_menu values('500', 'æä½æ¥å¿', '108', '1', 'operlog', 'monitor/operlog/index', 1, 0, 'C', 0, 0, 'monitor:operlog:list', 'form', 'admin', now(), '', null, 'æä½æ¥å¿èå'); |
| | | insert into sys_menu values('501', 'ç»å½æ¥å¿', '108', '2', 'logininfor', 'monitor/logininfor/index', 1, 0, 'C', 0, 0, 'monitor:logininfor:list', 'logininfor', 'admin', now(), '', null, 'ç»å½æ¥å¿èå'); |
| | | -- ç¨æ·ç®¡çæé® |
| | | insert into sys_menu values('1000', 'ç¨æ·æ¥è¯¢', '100', '1', '#', '', 1, 0, 'F', 0, 0, 'system:user:query', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1001', 'ç¨æ·æ°å¢', '100', '2', '#', '', 1, 0, 'F', 0, 0, 'system:user:add', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1002', 'ç¨æ·ä¿®æ¹', '100', '3', '#', '', 1, 0, 'F', 0, 0, 'system:user:edit', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1003', 'ç¨æ·å é¤', '100', '4', '#', '', 1, 0, 'F', 0, 0, 'system:user:remove', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1004', 'ç¨æ·å¯¼åº', '100', '5', '#', '', 1, 0, 'F', 0, 0, 'system:user:export', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1005', 'ç¨æ·å¯¼å
¥', '100', '6', '#', '', 1, 0, 'F', 0, 0, 'system:user:import', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1006', 'éç½®å¯ç ', '100', '7', '#', '', 1, 0, 'F', 0, 0, 'system:user:resetPwd', '#', 'admin', now(), '', null, ''); |
| | | -- è§è²ç®¡çæé® |
| | | insert into sys_menu values('1007', 'è§è²æ¥è¯¢', '101', '1', '#', '', 1, 0, 'F', 0, 0, 'system:role:query', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1008', 'è§è²æ°å¢', '101', '2', '#', '', 1, 0, 'F', 0, 0, 'system:role:add', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1009', 'è§è²ä¿®æ¹', '101', '3', '#', '', 1, 0, 'F', 0, 0, 'system:role:edit', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1010', 'è§è²å é¤', '101', '4', '#', '', 1, 0, 'F', 0, 0, 'system:role:remove', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1011', 'è§è²å¯¼åº', '101', '5', '#', '', 1, 0, 'F', 0, 0, 'system:role:export', '#', 'admin', now(), '', null, ''); |
| | | -- èå管çæé® |
| | | insert into sys_menu values('1012', 'èåæ¥è¯¢', '102', '1', '#', '', 1, 0, 'F', 0, 0, 'system:menu:query', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1013', 'èåæ°å¢', '102', '2', '#', '', 1, 0, 'F', 0, 0, 'system:menu:add', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1014', 'èåä¿®æ¹', '102', '3', '#', '', 1, 0, 'F', 0, 0, 'system:menu:edit', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1015', 'èåå é¤', '102', '4', '#', '', 1, 0, 'F', 0, 0, 'system:menu:remove', '#', 'admin', now(), '', null, ''); |
| | | -- é¨é¨ç®¡çæé® |
| | | insert into sys_menu values('1016', 'é¨é¨æ¥è¯¢', '103', '1', '#', '', 1, 0, 'F', 0, 0, 'system:dept:query', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1017', 'é¨é¨æ°å¢', '103', '2', '#', '', 1, 0, 'F', 0, 0, 'system:dept:add', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1018', 'é¨é¨ä¿®æ¹', '103', '3', '#', '', 1, 0, 'F', 0, 0, 'system:dept:edit', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1019', 'é¨é¨å é¤', '103', '4', '#', '', 1, 0, 'F', 0, 0, 'system:dept:remove', '#', 'admin', now(), '', null, ''); |
| | | -- å²ä½ç®¡çæé® |
| | | insert into sys_menu values('1020', 'å²ä½æ¥è¯¢', '104', '1', '#', '', 1, 0, 'F', 0, 0, 'system:post:query', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1021', 'å²ä½æ°å¢', '104', '2', '#', '', 1, 0, 'F', 0, 0, 'system:post:add', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1022', 'å²ä½ä¿®æ¹', '104', '3', '#', '', 1, 0, 'F', 0, 0, 'system:post:edit', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1023', 'å²ä½å é¤', '104', '4', '#', '', 1, 0, 'F', 0, 0, 'system:post:remove', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1024', 'å²ä½å¯¼åº', '104', '5', '#', '', 1, 0, 'F', 0, 0, 'system:post:export', '#', 'admin', now(), '', null, ''); |
| | | -- åå
¸ç®¡çæé® |
| | | insert into sys_menu values('1025', 'åå
¸æ¥è¯¢', '105', '1', '#', '', 1, 0, 'F', 0, 0, 'system:dict:query', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1026', 'åå
¸æ°å¢', '105', '2', '#', '', 1, 0, 'F', 0, 0, 'system:dict:add', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1027', 'åå
¸ä¿®æ¹', '105', '3', '#', '', 1, 0, 'F', 0, 0, 'system:dict:edit', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1028', 'åå
¸å é¤', '105', '4', '#', '', 1, 0, 'F', 0, 0, 'system:dict:remove', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1029', 'åå
¸å¯¼åº', '105', '5', '#', '', 1, 0, 'F', 0, 0, 'system:dict:export', '#', 'admin', now(), '', null, ''); |
| | | -- åæ°è®¾ç½®æé® |
| | | insert into sys_menu values('1030', 'åæ°æ¥è¯¢', '106', '1', '#', '', 1, 0, 'F', 0, 0, 'system:config:query', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1031', 'åæ°æ°å¢', '106', '2', '#', '', 1, 0, 'F', 0, 0, 'system:config:add', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1032', 'åæ°ä¿®æ¹', '106', '3', '#', '', 1, 0, 'F', 0, 0, 'system:config:edit', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1033', 'åæ°å é¤', '106', '4', '#', '', 1, 0, 'F', 0, 0, 'system:config:remove', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1034', '忰坼åº', '106', '5', '#', '', 1, 0, 'F', 0, 0, 'system:config:export', '#', 'admin', now(), '', null, ''); |
| | | -- éç¥å
¬åæé® |
| | | insert into sys_menu values('1035', 'å
¬åæ¥è¯¢', '107', '1', '#', '', 1, 0, 'F', 0, 0, 'system:notice:query', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1036', 'å
¬åæ°å¢', '107', '2', '#', '', 1, 0, 'F', 0, 0, 'system:notice:add', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1037', 'å
¬åä¿®æ¹', '107', '3', '#', '', 1, 0, 'F', 0, 0, 'system:notice:edit', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1038', 'å
¬åå é¤', '107', '4', '#', '', 1, 0, 'F', 0, 0, 'system:notice:remove', '#', 'admin', now(), '', null, ''); |
| | | -- æä½æ¥å¿æé® |
| | | insert into sys_menu values('1039', 'æä½æ¥è¯¢', '500', '1', '#', '', 1, 0, 'F', 0, 0, 'monitor:operlog:query', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1040', 'æä½å é¤', '500', '2', '#', '', 1, 0, 'F', 0, 0, 'monitor:operlog:remove', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1041', '详ç»ä¿¡æ¯', '500', '3', '#', '', 1, 0, 'F', 0, 0, 'monitor:operlog:detail', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1042', 'æ¥å¿å¯¼åº', '500', '4', '#', '', 1, 0, 'F', 0, 0, 'monitor:operlog:export', '#', 'admin', now(), '', null, ''); |
| | | -- ç»å½æ¥å¿æé® |
| | | insert into sys_menu values('1043', 'ç»å½æ¥è¯¢', '501', '1', '#', '', 1, 0, 'F', 0, 0, 'monitor:logininfor:query', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1044', 'ç»å½å é¤', '501', '2', '#', '', 1, 0, 'F', 0, 0, 'monitor:logininfor:remove', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1045', 'æ¥å¿å¯¼åº', '501', '3', '#', '', 1, 0, 'F', 0, 0, 'monitor:logininfor:export', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1046', 'è´¦æ·è§£é', '501', '4', '#', '', 1, 0, 'F', 0, 0, 'monitor:logininfor:unlock', '#', 'admin', now(), '', null, ''); |
| | | -- å¨çº¿ç¨æ·æé® |
| | | insert into sys_menu values('1047', 'å¨çº¿æ¥è¯¢', '109', '1', '#', '', 1, 0, 'F', 0, 0, 'monitor:online:query', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1048', 'æ¹é强é', '109', '2', '#', '', 1, 0, 'F', 0, 0, 'monitor:online:batchForceLogout', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1049', 'åæ¡å¼ºé', '109', '3', '#', '', 1, 0, 'F', 0, 0, 'monitor:online:forceLogout', '#', 'admin', now(), '', null, ''); |
| | | -- 宿¶ä»»å¡æé® |
| | | insert into sys_menu values('1050', '任塿¥è¯¢', '110', '1', '#', '', 1, 0, 'F', 0, 0, 'monitor:job:query', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1051', '任塿°å¢', '110', '2', '#', '', 1, 0, 'F', 0, 0, 'monitor:job:add', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1052', 'ä»»å¡ä¿®æ¹', '110', '3', '#', '', 1, 0, 'F', 0, 0, 'monitor:job:edit', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1053', 'ä»»å¡å é¤', '110', '4', '#', '', 1, 0, 'F', 0, 0, 'monitor:job:remove', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1054', 'ç¶æä¿®æ¹', '110', '5', '#', '', 1, 0, 'F', 0, 0, 'monitor:job:changeStatus', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1055', 'ä»»å¡è¯¦ç»', '110', '6', '#', '', 1, 0, 'F', 0, 0, 'monitor:job:detail', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1056', 'ä»»å¡å¯¼åº', '110', '7', '#', '', 1, 0, 'F', 0, 0, 'monitor:job:export', '#', 'admin', now(), '', null, ''); |
| | | -- 代ç çææé® |
| | | insert into sys_menu values('1057', 'çææ¥è¯¢', '114', '1', '#', '', 1, 0, 'F', 0, 0, 'tool:gen:query', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1058', 'çæä¿®æ¹', '114', '2', '#', '', 1, 0, 'F', 0, 0, 'tool:gen:edit', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1059', 'çæå é¤', '114', '3', '#', '', 1, 0, 'F', 0, 0, 'tool:gen:remove', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1060', 'é¢è§ä»£ç ', '114', '4', '#', '', 1, 0, 'F', 0, 0, 'tool:gen:preview', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu values('1061', 'çæä»£ç ', '114', '5', '#', '', 1, 0, 'F', 0, 0, 'tool:gen:code', '#', 'admin', now(), '', null, ''); |
| | | |
| | | -- ---------------------------- |
| | | -- 6ãç¨æ·åè§è²å
³è表 ç¨æ·N-1è§è² |
| | | -- ---------------------------- |
| | | drop table if exists sys_user_role; |
| | | create table sys_user_role ( |
| | | user_id BIGINT not null, |
| | | role_id BIGINT not null, |
| | | constraint PK_SYS_USER_ROLE primary key (user_id, role_id) |
| | | ); |
| | | |
| | | comment on table sys_user_role is 'ç¨æ·åè§è²å
³è表'; |
| | | comment on column sys_user_role.user_id is 'ç¨æ·ID'; |
| | | comment on column sys_user_role.role_id is 'è§è²ID'; |
| | | |
| | | -- ---------------------------- |
| | | -- åå§å-ç¨æ·åè§è²å
³èè¡¨æ°æ® |
| | | -- ---------------------------- |
| | | 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 not null, |
| | | menu_id BIGINT not null, |
| | | constraint PK_SYS_ROLE_MENU primary key (role_id, menu_id) |
| | | ); |
| | | |
| | | comment on table sys_role_menu is 'è§è²åèåå
³è表'; |
| | | comment on column sys_role_menu.role_id is 'è§è²ID'; |
| | | comment on column sys_role_menu.menu_id is 'èåID'; |
| | | |
| | | -- ---------------------------- |
| | | -- åå§å-è§è²åèåå
³èè¡¨æ°æ® |
| | | -- ---------------------------- |
| | | 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', '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'); |
| | | insert into sys_role_menu values ('2', '1061'); |
| | | |
| | | -- ---------------------------- |
| | | -- 8ãè§è²åé¨é¨å
³è表 è§è²1-Né¨é¨ |
| | | -- ---------------------------- |
| | | drop table if exists sys_role_dept; |
| | | |
| | | create table sys_role_dept ( |
| | | role_id BIGINT not null, |
| | | dept_id BIGINT not null, |
| | | constraint PK_SYS_ROLE_DEPT primary key (role_id, dept_id) |
| | | ); |
| | | |
| | | comment on table sys_role_dept is 'è§è²åé¨é¨å
³è表'; |
| | | comment on column sys_role_dept.role_id is 'ç¨æ·ID'; |
| | | comment on column sys_role_dept.dept_id is 'å²ä½ID'; |
| | | |
| | | -- ---------------------------- |
| | | -- åå§å-è§è²åé¨é¨å
³èè¡¨æ°æ® |
| | | -- ---------------------------- |
| | | 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 not null, |
| | | post_id BIGINT not null, |
| | | constraint PK_SYS_USER_POST primary key (user_id, post_id) |
| | | ); |
| | | |
| | | comment on table sys_user_post is 'ç¨æ·ä¸å²ä½å
³è表'; |
| | | comment on column sys_user_post.user_id is 'ç¨æ·ID'; |
| | | comment on column sys_user_post.post_id is 'å²ä½ID'; |
| | | |
| | | -- ---------------------------- |
| | | -- åå§å-ç¨æ·ä¸å²ä½å
³èè¡¨æ°æ® |
| | | -- ---------------------------- |
| | | 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 BIGSERIAL not null, |
| | | title VARCHAR(50) null default '', |
| | | business_type INT4 null default 0, |
| | | method VARCHAR(100) null default '', |
| | | request_method VARCHAR(10) null default '', |
| | | operator_type INT4 null default 0, |
| | | oper_name VARCHAR(50) null default '', |
| | | dept_name VARCHAR(50) null default '', |
| | | oper_url VARCHAR(255) null default '', |
| | | oper_ip VARCHAR(30) null default '', |
| | | oper_location VARCHAR(255) null default '', |
| | | oper_param VARCHAR(2000) null default '', |
| | | json_result VARCHAR(2000) null default '', |
| | | status CHAR(1) null default '0', |
| | | error_msg VARCHAR(2000) null default '', |
| | | oper_time TIMESTAMP null, |
| | | constraint PK_SYS_OPER_LOG primary key (oper_id) |
| | | ); |
| | | alter sequence if exists sys_oper_log_oper_id_seq restart with 100 cache 20; |
| | | |
| | | comment on table sys_oper_log is 'æä½æ¥å¿è®°å½'; |
| | | comment on column sys_oper_log.oper_id is 'æ¥å¿ä¸»é®'; |
| | | comment on column sys_oper_log.title is 'æ¨¡åæ é¢'; |
| | | comment on column sys_oper_log.business_type is 'ä¸å¡ç±»åï¼0å
¶å® 1æ°å¢ 2ä¿®æ¹ 3å é¤ï¼'; |
| | | comment on column sys_oper_log.method is 'æ¹æ³åç§°'; |
| | | comment on column sys_oper_log.request_method is 'è¯·æ±æ¹å¼'; |
| | | comment on column sys_oper_log.operator_type is 'æä½ç±»å«ï¼0å
¶å® 1åå°ç¨æ· 2ææºç«¯ç¨æ·ï¼'; |
| | | comment on column sys_oper_log.oper_name is 'ç»å½è´¦å·'; |
| | | comment on column sys_oper_log.dept_name is 'é¨é¨åç§°'; |
| | | comment on column sys_oper_log.oper_url is '请æ±URL'; |
| | | comment on column sys_oper_log.oper_ip is '主æºå°å'; |
| | | comment on column sys_oper_log.oper_location is 'æä½å°ç¹'; |
| | | comment on column sys_oper_log.oper_param is '请æ±åæ°'; |
| | | comment on column sys_oper_log.json_result is 'è¿ååæ°'; |
| | | comment on column sys_oper_log.status is 'æä½ç¶æï¼0æ£å¸¸ 1å¼å¸¸ï¼'; |
| | | comment on column sys_oper_log.error_msg is 'éè¯¯æ¶æ¯'; |
| | | comment on column sys_oper_log.oper_time is 'æä½æ¶é´'; |
| | | |
| | | |
| | | -- ---------------------------- |
| | | -- 11ãåå
¸ç±»å表 |
| | | -- ---------------------------- |
| | | drop table if exists sys_dict_type; |
| | | create table sys_dict_type ( |
| | | dict_id BIGSERIAL not null, |
| | | dict_name VARCHAR(100) null default '', |
| | | dict_type VARCHAR(100) null default '' unique, |
| | | status CHAR(1) null default '0', |
| | | create_by VARCHAR(64) null default '', |
| | | create_time TIMESTAMP null, |
| | | update_by VARCHAR(64) null default '', |
| | | update_time TIMESTAMP null, |
| | | remark VARCHAR(500) null default '', |
| | | constraint PK_SYS_DICT_TYPE primary key (dict_id) |
| | | ); |
| | | |
| | | alter sequence if exists sys_dict_type_dict_id_seq restart with 100 cache 20; |
| | | |
| | | comment on table sys_dict_type is 'åå
¸ç±»å表'; |
| | | comment on column sys_dict_type.dict_id is 'åå
¸ä¸»é®'; |
| | | comment on column sys_dict_type.dict_name is 'åå
¸åç§°'; |
| | | comment on column sys_dict_type.dict_type is 'åå
¸ç±»å'; |
| | | comment on column sys_dict_type.status is 'ç¶æï¼0æ£å¸¸ 1ç¦ç¨ï¼'; |
| | | comment on column sys_dict_type.create_by is 'å建è
'; |
| | | comment on column sys_dict_type.create_time is 'å建æ¶é´'; |
| | | comment on column sys_dict_type.update_by is 'æ´æ°è
'; |
| | | comment on column sys_dict_type.update_time is 'æ´æ°æ¶é´'; |
| | | comment on column sys_dict_type.remark is '夿³¨'; |
| | | |
| | | |
| | | insert into sys_dict_type values(1, 'ç¨æ·æ§å«', 'sys_user_sex', '0', 'admin', now(), '', null, 'ç¨æ·æ§å«å表'); |
| | | insert into sys_dict_type values(2, 'èåç¶æ', 'sys_show_hide', '0', 'admin', now(), '', null, 'èåç¶æå表'); |
| | | insert into sys_dict_type values(3, 'ç³»ç»å¼å
³', 'sys_normal_disable', '0', 'admin', now(), '', null, 'ç³»ç»å¼å
³å表'); |
| | | insert into sys_dict_type values(4, 'ä»»å¡ç¶æ', 'sys_job_status', '0', 'admin', now(), '', null, 'ä»»å¡ç¶æå表'); |
| | | insert into sys_dict_type values(5, 'ä»»å¡åç»', 'sys_job_group', '0', 'admin', now(), '', null, 'ä»»å¡åç»å表'); |
| | | insert into sys_dict_type values(6, 'ç³»ç»æ¯å¦', 'sys_yes_no', '0', 'admin', now(), '', null, 'ç³»ç»æ¯å¦å表'); |
| | | insert into sys_dict_type values(7, 'éç¥ç±»å', 'sys_notice_type', '0', 'admin', now(), '', null, 'éç¥ç±»åå表'); |
| | | insert into sys_dict_type values(8, 'éç¥ç¶æ', 'sys_notice_status', '0', 'admin', now(), '', null, 'éç¥ç¶æå表'); |
| | | insert into sys_dict_type values(9, 'æä½ç±»å', 'sys_oper_type', '0', 'admin', now(), '', null, 'æä½ç±»åå表'); |
| | | insert into sys_dict_type values(10, 'ç³»ç»ç¶æ', 'sys_common_status', '0', 'admin', now(), '', null, 'ç»å½ç¶æå表'); |
| | | |
| | | -- ---------------------------- |
| | | -- 12ãåå
¸æ°æ®è¡¨ |
| | | -- ---------------------------- |
| | | drop table if exists sys_dict_data; |
| | | create table sys_dict_data ( |
| | | dict_code BIGSERIAL not null, |
| | | dict_sort INT4 null default 0, |
| | | dict_label VARCHAR(100) null default '', |
| | | dict_value VARCHAR(100) null default '', |
| | | dict_type VARCHAR(100) null default '', |
| | | css_class VARCHAR(100) null, |
| | | list_class VARCHAR(100) null, |
| | | is_default CHAR(1) null, |
| | | status CHAR(1) null default '0', |
| | | create_by VARCHAR(64) null default '', |
| | | create_time TIMESTAMP null, |
| | | update_by VARCHAR(64) null default '', |
| | | update_time TIMESTAMP null, |
| | | remark VARCHAR(500) null default '', |
| | | constraint PK_SYS_DICT_DATA primary key (dict_code) |
| | | ); |
| | | alter sequence if exists sys_dict_data_dict_code_seq restart with 100 cache 20; |
| | | |
| | | comment on table sys_dict_data is 'åå
¸æ°æ®è¡¨'; |
| | | comment on column sys_dict_data.dict_code is 'åå
¸ç¼ç '; |
| | | comment on column sys_dict_data.dict_sort is 'åå
¸æåº'; |
| | | comment on column sys_dict_data.dict_label is 'åå
¸æ ç¾'; |
| | | comment on column sys_dict_data.dict_value is 'åå
¸é®å¼'; |
| | | comment on column sys_dict_data.dict_type is 'åå
¸ç±»å'; |
| | | comment on column sys_dict_data.css_class is 'æ ·å¼å±æ§ï¼å
¶ä»æ ·å¼æ©å±ï¼'; |
| | | comment on column sys_dict_data.list_class is 'è¡¨æ ¼åæ¾æ ·å¼'; |
| | | comment on column sys_dict_data.is_default is 'æ¯å¦é»è®¤ï¼Yæ¯ Nå¦ï¼'; |
| | | comment on column sys_dict_data.status is 'ç¶æï¼0æ£å¸¸ 1ç¦ç¨ï¼'; |
| | | comment on column sys_dict_data.create_by is 'å建è
'; |
| | | comment on column sys_dict_data.create_time is 'å建æ¶é´'; |
| | | comment on column sys_dict_data.update_by is 'æ´æ°è
'; |
| | | comment on column sys_dict_data.update_time is 'æ´æ°æ¶é´'; |
| | | comment on column sys_dict_data.remark is '夿³¨'; |
| | | |
| | | insert into sys_dict_data values(1, 1, 'ç·', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', now(), '', null, 'æ§å«ç·'); |
| | | insert into sys_dict_data values(2, 2, '女', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', now(), '', null, 'æ§å«å¥³'); |
| | | insert into sys_dict_data values(3, 3, 'æªç¥', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', now(), '', null, 'æ§å«æªç¥'); |
| | | insert into sys_dict_data values(4, 1, 'æ¾ç¤º', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 'admin', now(), '', null, 'æ¾ç¤ºèå'); |
| | | insert into sys_dict_data values(5, 2, 'éè', '1', 'sys_show_hide', '', 'danger', 'N', '0', 'admin', now(), '', null, 'éèèå'); |
| | | insert into sys_dict_data values(6, 1, 'æ£å¸¸', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 'admin', now(), '', null, 'æ£å¸¸ç¶æ'); |
| | | insert into sys_dict_data values(7, 2, 'åç¨', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 'admin', now(), '', null, 'åç¨ç¶æ'); |
| | | insert into sys_dict_data values(8, 1, 'æ£å¸¸', '0', 'sys_job_status', '', 'primary', 'Y', '0', 'admin', now(), '', null, 'æ£å¸¸ç¶æ'); |
| | | insert into sys_dict_data values(9, 2, 'æå', '1', 'sys_job_status', '', 'danger', 'N', '0', 'admin', now(), '', null, 'åç¨ç¶æ'); |
| | | insert into sys_dict_data values(10, 1, 'é»è®¤', 'DEFAULT', 'sys_job_group', '', '', 'Y', '0', 'admin', now(), '', null, 'é»è®¤åç»'); |
| | | insert into sys_dict_data values(11, 2, 'ç³»ç»', 'SYSTEM', 'sys_job_group', '', '', 'N', '0', 'admin', now(), '', null, 'ç³»ç»åç»'); |
| | | insert into sys_dict_data values(12, 1, 'æ¯', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 'admin', now(), '', null, 'ç³»ç»é»è®¤æ¯'); |
| | | insert into sys_dict_data values(13, 2, 'å¦', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 'admin', now(), '', null, 'ç³»ç»é»è®¤å¦'); |
| | | insert into sys_dict_data values(14, 1, 'éç¥', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', now(), '', null, 'éç¥'); |
| | | insert into sys_dict_data values(15, 2, 'å
¬å', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', now(), '', null, 'å
Œ'); |
| | | insert into sys_dict_data values(16, 1, 'æ£å¸¸', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 'admin', now(), '', null, 'æ£å¸¸ç¶æ'); |
| | | insert into sys_dict_data values(17, 2, 'å
³é', '1', 'sys_notice_status', '', 'danger', 'N', '0', 'admin', now(), '', null, 'å
³éç¶æ'); |
| | | insert into sys_dict_data values(18, 99, 'å
¶ä»', '0', 'sys_oper_type', '', 'info', 'N', '0', 'admin', now(), '', null, 'å
¶ä»æä½'); |
| | | insert into sys_dict_data values(19, 1, 'æ°å¢', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', now(), '', null, 'æ°å¢æä½'); |
| | | insert into sys_dict_data values(20, 2, 'ä¿®æ¹', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', now(), '', null, 'ä¿®æ¹æä½'); |
| | | insert into sys_dict_data values(21, 3, 'å é¤', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', now(), '', null, 'å 餿ä½'); |
| | | insert into sys_dict_data values(22, 4, 'ææ', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', now(), '', null, 'æææä½'); |
| | | insert into sys_dict_data values(23, 5, '导åº', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', now(), '', null, 'å¯¼åºæä½'); |
| | | insert into sys_dict_data values(24, 6, '导å
¥', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', now(), '', null, '导å
¥æä½'); |
| | | insert into sys_dict_data values(25, 7, '强é', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', now(), '', null, '强éæä½'); |
| | | insert into sys_dict_data values(26, 8, 'çæä»£ç ', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', now(), '', null, 'çææä½'); |
| | | insert into sys_dict_data values(27, 9, 'æ¸
ç©ºæ°æ®', '9', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', now(), '', null, 'æ¸
空æä½'); |
| | | insert into sys_dict_data values(28, 1, 'æå', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', now(), '', null, 'æ£å¸¸ç¶æ'); |
| | | insert into sys_dict_data values(29, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', now(), '', null, 'åç¨ç¶æ'); |
| | | |
| | | -- ---------------------------- |
| | | -- 13ãåæ°é
置表 |
| | | -- ---------------------------- |
| | | drop table if exists sys_config; |
| | | create table sys_config ( |
| | | config_id BIGSERIAL not null, |
| | | config_name VARCHAR(100) null default '0', |
| | | config_key VARCHAR(100) null default '', |
| | | config_value VARCHAR(100) null default '', |
| | | config_type CHAR(1) null default '', |
| | | create_by VARCHAR(64) null default '', |
| | | create_time TIMESTAMP null, |
| | | update_by VARCHAR(64) null default '', |
| | | update_time TIMESTAMP null, |
| | | remark VARCHAR(500) null default '', |
| | | constraint PK_SYS_CONFIG primary key (config_id) |
| | | ); |
| | | alter sequence if exists sys_config_config_id_seq restart with 100 cache 20; |
| | | comment on table sys_config is 'åæ°é
置表'; |
| | | |
| | | comment on column sys_config.config_id is 'åå
¸ç¼ç '; |
| | | |
| | | comment on column sys_config.config_name is 'åå
¸æåº'; |
| | | |
| | | comment on column sys_config.config_key is 'åå
¸æ ç¾'; |
| | | |
| | | comment on column sys_config.config_value is 'åå
¸é®å¼'; |
| | | |
| | | comment on column sys_config.config_type is 'åå
¸ç±»å'; |
| | | |
| | | comment on column sys_config.create_by is 'å建è
'; |
| | | |
| | | comment on column sys_config.create_time is 'å建æ¶é´'; |
| | | |
| | | comment on column sys_config.update_by is 'æ´æ°è
'; |
| | | |
| | | comment on column sys_config.update_time is 'æ´æ°æ¶é´'; |
| | | |
| | | comment on column sys_config.remark is '夿³¨'; |
| | | |
| | | |
| | | insert into sys_config values(1, 'ä¸»æ¡æ¶é¡µ-é»è®¤ç®è¤æ ·å¼åç§°', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', now(), '', null, 'èè² skin-blueãç»¿è² skin-greenãç´«è² skin-purpleãçº¢è² skin-redãé»è² skin-yellow'); |
| | | insert into sys_config values(2, 'ç¨æ·ç®¡ç-è´¦å·åå§å¯ç ', 'sys.user.initPassword', '123456', 'Y', 'admin', now(), '', null, 'åå§åå¯ç 123456'); |
| | | insert into sys_config values(3, 'ä¸»æ¡æ¶é¡µ-ä¾§è¾¹æ 主é¢', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', now(), '', null, 'æ·±é»ä¸»é¢theme-darkï¼æµ
è²ä¸»é¢theme-lightï¼æ·±è主é¢theme-blue'); |
| | | insert into sys_config values(4, 'è´¦å·èªå©-æ¯å¦å¼å¯ç¨æ·æ³¨ååè½', 'sys.account.registerUser', 'false', 'Y', 'admin', now(), '', null, 'æ¯å¦å¼å¯æ³¨åç¨æ·åè½'); |
| | | insert into sys_config values(5, 'ç¨æ·ç®¡ç-å¯ç å符èå´', 'sys.account.chrtype', '0', 'Y', 'admin', now(), '', null, 'é»è®¤ä»»æå符èå´ï¼0ä»»æï¼å¯ç å¯ä»¥è¾å
¥ä»»æå符ï¼ï¼1æ°åï¼å¯ç åªè½ä¸º0-9æ°åï¼ï¼2è±æåæ¯ï¼å¯ç åªè½ä¸ºa-zåA-Z忝ï¼ï¼3忝忰åï¼å¯ç å¿
é¡»å
å«åæ¯ï¼æ°åï¼,4忝æ°ååç¹æ®å符ï¼ç®åæ¯æçç¹æ®å符å
æ¬ï¼~!@#$%^&*()-=_+ï¼'); |
| | | insert into sys_config values(6, 'ç¨æ·ç®¡ç-åå§å¯ç ä¿®æ¹çç¥', 'sys.account.initPasswordModify', '0', 'Y', 'admin', now(), '', null, '0ï¼åå§å¯ç ä¿®æ¹çç¥å
³éï¼æ²¡æä»»ä½æç¤ºï¼1ï¼æéç¨æ·ï¼å¦ææªä¿®æ¹åå§å¯ç ï¼åå¨ç»å½æ¶å°±ä¼æéä¿®æ¹å¯ç å¯¹è¯æ¡'); |
| | | insert into sys_config values(7, 'ç¨æ·ç®¡ç-è´¦å·å¯ç æ´æ°å¨æ', 'sys.account.passwordValidateDays', '0', 'Y', 'admin', now(), '', null, 'å¯ç æ´æ°å¨æï¼å¡«åæ°åï¼æ°æ®åå§åå¼ä¸º0ä¸éå¶ï¼è¥ä¿®æ¹å¿
须为大äº0å°äº365çæ£æ´æ°ï¼ï¼å¦æè¶
è¿è¿ä¸ªå¨æç»å½ç³»ç»æ¶ï¼åå¨ç»å½æ¶å°±ä¼æéä¿®æ¹å¯ç å¯¹è¯æ¡'); |
| | | insert into sys_config values(8, 'ä¸»æ¡æ¶é¡µ-èåå¯¼èªæ¾ç¤ºé£æ ¼', 'sys.index.menuStyle', 'default', 'Y', 'admin', now(), '', null, 'èåå¯¼èªæ¾ç¤ºé£æ ¼ï¼default为左侧导èªèåï¼topnav为顶é¨å¯¼èªèåï¼'); |
| | | insert into sys_config values(9, 'ä¸»æ¡æ¶é¡µ-æ¯å¦å¼å¯é¡µè', 'sys.index.ignoreFooter', 'true', 'Y', 'admin', now(), '', null, 'æ¯å¦å¼å¯åºé¨é¡µèæ¾ç¤ºï¼trueæ¾ç¤ºï¼falseéèï¼'); |
| | | |
| | | -- ---------------------------- |
| | | -- 14ãç³»ç»è®¿é®è®°å½ |
| | | -- ---------------------------- |
| | | drop table if exists sys_logininfor; |
| | | create table sys_logininfor ( |
| | | info_id BIGSERIAL not null, |
| | | user_name VARCHAR(50) null default '', |
| | | ipaddr VARCHAR(50) null default '', |
| | | login_location VARCHAR(255) null, |
| | | browser VARCHAR(50) null default '', |
| | | os VARCHAR(50) null default '', |
| | | status CHAR(1) null default '0', |
| | | msg VARCHAR(255) null default '', |
| | | login_time TIMESTAMP null, |
| | | constraint PK_SYS_LOGININFOR primary key (info_id) |
| | | ); |
| | | |
| | | alter sequence if exists sys_logininfor_info_id_seq restart with 100 cache 20; |
| | | |
| | | comment on table sys_logininfor is 'ç³»ç»è®¿é®è®°å½'; |
| | | comment on column sys_logininfor.info_id is '访é®ID'; |
| | | comment on column sys_logininfor.user_name is 'ç»å½è´¦å·'; |
| | | comment on column sys_logininfor.ipaddr is 'ç»å½IPå°å'; |
| | | comment on column sys_logininfor.browser is 'æµè§å¨ç±»å'; |
| | | comment on column sys_logininfor.login_location is 'ç»å½å°ç¹'; |
| | | comment on column sys_logininfor.os is 'æä½ç³»ç»'; |
| | | comment on column sys_logininfor.status is 'ç»å½ç¶æ 0æå 1失败'; |
| | | comment on column sys_logininfor.msg is 'æç¤ºæ¶æ¯'; |
| | | comment on column sys_logininfor.login_time is 'è®¿é®æ¶é´'; |
| | | |
| | | -- ---------------------------- |
| | | -- 15ãå¨çº¿ç¨æ·è®°å½ |
| | | -- ---------------------------- |
| | | drop table if exists sys_user_online; |
| | | create table sys_user_online ( |
| | | sessionId VARCHAR(50) not null default '', |
| | | user_name VARCHAR(50) null default '', |
| | | dept_name VARCHAR(50) null default '', |
| | | ipaddr VARCHAR(50) null default '', |
| | | login_location VARCHAR(255) null, |
| | | browser VARCHAR(50) null default '', |
| | | os VARCHAR(50) null default '', |
| | | status VARCHAR(10) null default '', |
| | | start_timestamp TIMESTAMP null, |
| | | last_access_time TIMESTAMP null, |
| | | expire_time INT4 null default 0, |
| | | constraint PK_SYS_USER_ONLINE primary key (sessionId) |
| | | ); |
| | | |
| | | comment on table sys_user_online is 'å¨çº¿ç¨æ·è®°å½'; |
| | | comment on column sys_user_online.sessionId is 'ç¨æ·ä¼è¯id'; |
| | | comment on column sys_user_online.user_name is 'ç»å½è´¦å·'; |
| | | comment on column sys_user_online.dept_name is 'é¨é¨åç§°'; |
| | | comment on column sys_user_online.ipaddr is 'ç»å½IPå°å'; |
| | | comment on column sys_user_online.login_location is 'ç»å½å°ç¹'; |
| | | comment on column sys_user_online.browser is 'æµè§å¨ç±»å'; |
| | | comment on column sys_user_online.os is 'æä½ç³»ç»'; |
| | | comment on column sys_user_online.status is 'å¨çº¿ç¶æon_lineå¨çº¿off_line离线'; |
| | | comment on column sys_user_online.start_timestamp is 'sessionå建æ¶é´'; |
| | | comment on column sys_user_online.last_access_time is 'sessionæåè®¿é®æ¶é´'; |
| | | comment on column sys_user_online.expire_time is 'è¶
æ¶æ¶é´ï¼åä½ä¸ºåé'; |
| | | |
| | | -- ---------------------------- |
| | | -- 16ã宿¶ä»»å¡è°åº¦è¡¨ |
| | | -- ---------------------------- |
| | | drop table if exists sys_job; |
| | | |
| | | create table sys_job ( |
| | | job_id BIGSERIAL not null, |
| | | job_name VARCHAR(64) not null default '', |
| | | job_group VARCHAR(64) not null default '', |
| | | invoke_target VARCHAR(500) not null , |
| | | cron_expression VARCHAR(255) null default '', |
| | | misfire_policy VARCHAR(20) null default '3', |
| | | concurrent CHAR(1) null default '1', |
| | | status CHAR(1) null default '0', |
| | | create_by VARCHAR(64) null default '', |
| | | create_time TIMESTAMP null, |
| | | update_by VARCHAR(64) null default '', |
| | | update_time TIMESTAMP null, |
| | | remark VARCHAR(500) null default '', |
| | | constraint PK_SYS_JOB primary key (job_id, job_name, job_group) |
| | | ); |
| | | |
| | | alter sequence if exists sys_job_job_id_seq restart with 100 cache 20; |
| | | |
| | | comment on table sys_job is '宿¶ä»»å¡è°åº¦è¡¨'; |
| | | comment on column sys_job.job_id is 'ä»»å¡ä¸»é®'; |
| | | comment on column sys_job.job_name is 'ä»»å¡åç§°'; |
| | | comment on column sys_job.job_group is 'ä»»å¡ç»å'; |
| | | comment on column sys_job.invoke_target is 'è°ç¨ç®æ å符串'; |
| | | comment on column sys_job.cron_expression is 'cronæ§è¡è¡¨è¾¾å¼'; |
| | | comment on column sys_job.misfire_policy is 'è®¡åæ§è¡é误çç¥ï¼1ç«å³æ§è¡ 2æ§è¡ä¸æ¬¡ 3æ¾å¼æ§è¡ï¼'; |
| | | comment on column sys_job.concurrent is 'æ¯å¦å¹¶åæ§è¡ï¼0å
许 1ç¦æ¢ï¼'; |
| | | comment on column sys_job.status is 'ç¶æï¼0æ£å¸¸ 1æåï¼'; |
| | | comment on column sys_job.create_by is 'å建è
'; |
| | | comment on column sys_job.create_time is 'å建æ¶é´'; |
| | | comment on column sys_job.update_by is 'æ´æ°è
'; |
| | | comment on column sys_job.update_time is 'æ´æ°æ¶é´'; |
| | | comment on column sys_job.remark is '夿³¨ä¿¡æ¯'; |
| | | |
| | | insert into sys_job values(1, 'ç³»ç»é»è®¤ï¼æ åï¼', 'DEFAULT', 'ryTask.ryNoParams', '0/10 * * * * ?', '3', '1', '1', 'admin', now(), '', null, ''); |
| | | insert into sys_job values(2, 'ç³»ç»é»è®¤ï¼æåï¼', 'DEFAULT', E'ryTask.ryParams(\'ry\')', '0/15 * * * * ?', '3', '1', '1', 'admin', now(), '', null, ''); |
| | | insert into sys_job values(3, 'ç³»ç»é»è®¤ï¼å¤åï¼', 'DEFAULT', E'ryTask.ryMultipleParams(\'ry\', true, 2000L, 316.50D, 100)', '0/20 * * * * ?', '3', '1', '1', 'admin', now(), '', null, ''); |
| | | |
| | | -- ---------------------------- |
| | | -- 17ã宿¶ä»»å¡è°åº¦æ¥å¿è¡¨ |
| | | -- ---------------------------- |
| | | drop table if exists sys_job_log; |
| | | create table sys_job_log ( |
| | | job_log_id BIGSERIAL not null, |
| | | job_name VARCHAR(64) not null, |
| | | job_group VARCHAR(64) not null, |
| | | invoke_target VARCHAR(500) not null , |
| | | job_message VARCHAR(500) null, |
| | | status CHAR(1) default '0', |
| | | exception_info VARCHAR(2000) null, |
| | | create_time TIMESTAMP null, |
| | | constraint PK_SYS_JOB_LOG primary key (job_log_id) |
| | | ); |
| | | alter sequence if exists sys_job_log_job_log_id_seq cache 20; |
| | | |
| | | comment on table sys_job_log is '宿¶ä»»å¡è°åº¦æ¥å¿è¡¨'; |
| | | comment on column sys_job_log.job_log_id is 'æ¥å¿ä¸»é®'; |
| | | comment on column sys_job_log.job_name is 'ä»»å¡åç§°'; |
| | | comment on column sys_job_log.job_group is 'ä»»å¡ç»å'; |
| | | comment on column sys_job_log.invoke_target is 'è°ç¨ç®æ å符串'; |
| | | comment on column sys_job_log.job_message is 'æ¥å¿ä¿¡æ¯'; |
| | | comment on column sys_job_log.status is 'æ§è¡ç¶æï¼0æ£å¸¸ 1失败ï¼'; |
| | | comment on column sys_job_log.exception_info is 'å¼å¸¸ä¿¡æ¯'; |
| | | comment on column sys_job_log.create_time is 'å建æ¶é´'; |
| | | |
| | | |
| | | -- ---------------------------- |
| | | -- 18ãéç¥å
¬å表 |
| | | -- ---------------------------- |
| | | drop table if exists sys_notice; |
| | | |
| | | create table sys_notice ( |
| | | notice_id BIGSERIAL not null, |
| | | notice_title VARCHAR(50) not null, |
| | | notice_type CHAR(2) not null, |
| | | notice_content VARCHAR(2000) null, |
| | | status CHAR(1) null default '0', |
| | | create_by VARCHAR(64) null default '', |
| | | create_time TIMESTAMP null, |
| | | update_by VARCHAR(64) null default '', |
| | | update_time TIMESTAMP null, |
| | | remark VARCHAR(255) null, |
| | | constraint PK_SYS_NOTICE primary key (notice_id) |
| | | ); |
| | | alter sequence if exists sys_notice_notice_id_seq restart with 10 cache 20; |
| | | comment on table sys_notice is 'éç¥å
¬å表'; |
| | | comment on column sys_notice.notice_id is 'å
¬å主é®'; |
| | | comment on column sys_notice.notice_title is 'å
¬åæ é¢'; |
| | | comment on column sys_notice.notice_type is 'å
¬åç±»åï¼1éç¥ 2å
¬åï¼'; |
| | | comment on column sys_notice.notice_content is 'å
¬åå
容'; |
| | | comment on column sys_notice.status is 'å
¬åç¶æï¼0æ£å¸¸ 1å
³éï¼'; |
| | | comment on column sys_notice.create_by is 'å建è
'; |
| | | comment on column sys_notice.create_time is 'å建æ¶é´'; |
| | | comment on column sys_notice.update_by is 'æ´æ°è
'; |
| | | comment on column sys_notice.update_time is 'æ´æ°æ¶é´'; |
| | | comment on column sys_notice.remark is '夿³¨'; |
| | | |
| | | -- ---------------------------- |
| | | -- åå§å-å
¬åä¿¡æ¯è¡¨æ°æ® |
| | | -- ---------------------------- |
| | | insert into sys_notice values('1', '温馨æéï¼2018-07-01 æ±æäººæ°çæ¬åå¸å¦', '2', 'æ°çæ¬å
容', '0', 'admin', now(), '', null, '管çå'); |
| | | insert into sys_notice values('2', 'ç»´æ¤éç¥ï¼2018-07-01 æ±æäººç³»ç»åæ¨ç»´æ¤', '1', 'ç»´æ¤å
容', '0', 'admin', now(), '', null, '管çå'); |
| | | |
| | | |
| | | -- ---------------------------- |
| | | -- 19ã代ç çæä¸å¡è¡¨ |
| | | -- ---------------------------- |
| | | drop table if exists gen_table; |
| | | create table gen_table ( |
| | | table_id BIGSERIAL not null, |
| | | table_name VARCHAR(200) default '', |
| | | table_comment VARCHAR(500) default '', |
| | | sub_table_name VARCHAR(64) default null, |
| | | sub_table_fk_name VARCHAR(64) default null, |
| | | class_name VARCHAR(100) default '', |
| | | tpl_category VARCHAR(200) default 'crud', |
| | | package_name VARCHAR(100), |
| | | module_name VARCHAR(30), |
| | | business_name VARCHAR(30), |
| | | function_name VARCHAR(50), |
| | | function_author VARCHAR(50), |
| | | gen_type CHAR(1) default '0', |
| | | gen_path VARCHAR(200) default '/', |
| | | options VARCHAR(1000), |
| | | create_by VARCHAR(64) default '', |
| | | create_time TIMESTAMP, |
| | | update_by VARCHAR(64) default '', |
| | | update_time TIMESTAMP, |
| | | remark VARCHAR(500) default null |
| | | ); |
| | | |
| | | alter sequence if exists gen_table_table_id_seq cache 20; |
| | | |
| | | comment on table gen_table is '代ç çæä¸å¡è¡¨'; |
| | | comment on column gen_table.table_id is 'ç¼å·'; |
| | | comment on column gen_table.table_name is '表åç§°'; |
| | | comment on column gen_table.table_comment is '表æè¿°'; |
| | | comment on column gen_table.sub_table_name is 'å
³èå表ç表å'; |
| | | comment on column gen_table.sub_table_fk_name is 'å表å
³èçå¤é®å'; |
| | | comment on column gen_table.class_name is 'å®ä½ç±»åç§°'; |
| | | comment on column gen_table.tpl_category is '使ç¨ç模æ¿ï¼crudå表æä½ treeæ 表æä½ sub主å表æä½ï¼'; |
| | | comment on column gen_table.package_name is 'çæå
è·¯å¾'; |
| | | comment on column gen_table.module_name is 'çææ¨¡åå'; |
| | | comment on column gen_table.business_name is 'çæä¸å¡å'; |
| | | comment on column gen_table.function_name is 'çæåè½å'; |
| | | comment on column gen_table.function_author is 'çæåè½ä½è
'; |
| | | comment on column gen_table.gen_type is 'çæä»£ç æ¹å¼ï¼0zipå缩å
1èªå®ä¹è·¯å¾ï¼'; |
| | | comment on column gen_table.gen_path is 'çæè·¯å¾ï¼ä¸å¡«é»è®¤é¡¹ç®è·¯å¾ï¼'; |
| | | comment on column gen_table.options is 'å
¶å®çæé项'; |
| | | comment on column gen_table.create_by is 'å建è
'; |
| | | comment on column gen_table.create_time is 'å建æ¶é´'; |
| | | comment on column gen_table.update_by is 'æ´æ°è
'; |
| | | comment on column gen_table.update_time is 'æ´æ°æ¶é´'; |
| | | comment on column gen_table.remark is '夿³¨'; |
| | | |
| | | |
| | | -- ---------------------------- |
| | | -- 20ã代ç çæä¸å¡è¡¨å段 |
| | | -- ---------------------------- |
| | | drop table if exists gen_table_column; |
| | | create table gen_table_column ( |
| | | column_id BIGSERIAL not null, |
| | | table_id VARCHAR(64), |
| | | column_name VARCHAR(200), |
| | | column_comment VARCHAR(500), |
| | | column_type VARCHAR(100), |
| | | java_type VARCHAR(500), |
| | | java_field VARCHAR(200), |
| | | is_pk CHAR(1), |
| | | is_increment CHAR(1), |
| | | is_required CHAR(1), |
| | | is_insert CHAR(1), |
| | | is_edit CHAR(1), |
| | | is_list CHAR(1), |
| | | is_query CHAR(1), |
| | | query_type VARCHAR(200) default 'EQ', |
| | | html_type VARCHAR(200), |
| | | dict_type VARCHAR(200) default '', |
| | | sort INT4, |
| | | create_by VARCHAR(64) default '', |
| | | create_time TIMESTAMP , |
| | | update_by VARCHAR(64) default '', |
| | | update_time TIMESTAMP |
| | | ); |
| | | |
| | | alter sequence if exists gen_table_column_column_id_seq cache 20; |
| | | |
| | | comment on table gen_table_column is '代ç çæä¸å¡è¡¨å段'; |
| | | comment on column gen_table_column.column_id is 'ç¼å·'; |
| | | comment on column gen_table_column.table_id is 'å½å±è¡¨ç¼å·'; |
| | | comment on column gen_table_column.column_name is 'ååç§°'; |
| | | comment on column gen_table_column.column_comment is 'åæè¿°'; |
| | | comment on column gen_table_column.column_type is 'åç±»å'; |
| | | comment on column gen_table_column.java_type is 'JAVAç±»å'; |
| | | comment on column gen_table_column.java_field is 'JAVAåæ®µå'; |
| | | comment on column gen_table_column.is_pk is 'æ¯å¦ä¸»é®ï¼1æ¯ï¼'; |
| | | comment on column gen_table_column.is_increment is 'æ¯å¦èªå¢ï¼1æ¯ï¼'; |
| | | comment on column gen_table_column.is_required is 'æ¯å¦å¿
å¡«ï¼1æ¯ï¼'; |
| | | comment on column gen_table_column.is_insert is 'æ¯å¦ä¸ºæå
¥å段ï¼1æ¯ï¼'; |
| | | comment on column gen_table_column.is_edit is 'æ¯å¦ç¼è¾å段ï¼1æ¯ï¼'; |
| | | comment on column gen_table_column.is_list is 'æ¯å¦åè¡¨åæ®µï¼1æ¯ï¼'; |
| | | comment on column gen_table_column.is_query is 'æ¯å¦æ¥è¯¢å段ï¼1æ¯ï¼'; |
| | | comment on column gen_table_column.query_type is 'æ¥è¯¢æ¹å¼ï¼çäºãä¸çäºã大äºãå°äºãèå´ï¼'; |
| | | comment on column gen_table_column.html_type is 'æ¾ç¤ºç±»åï¼ææ¬æ¡ãææ¬åã䏿æ¡ãå¤éæ¡ãåéæ¡ãæ¥ææ§ä»¶ï¼'; |
| | | comment on column gen_table_column.dict_type is 'åå
¸ç±»å'; |
| | | comment on column gen_table_column.sort is 'æåº'; |
| | | comment on column gen_table_column.create_by is 'å建è
'; |
| | | comment on column gen_table_column.create_time is 'å建æ¶é´'; |
| | | comment on column gen_table_column.update_by is 'æ´æ°è
'; |
| | | comment on column gen_table_column.update_time is 'æ´æ°æ¶é´'; |
| | | |
| | | |
| | | |
| | | -- ---------------------------- |
| | | -- 彿° ï¼ä»£æ¿mysqlçfind_in_set |
| | | -- ä¾å¦ï¼ select * from sys_dept where FIND_IN_SET (101,ancestors) <> 0 |
| | | -- mysql坿¥å0æå
¶å®numberå为where æ¡ä»¶ï¼postgresqlåªæ¥å表达å¼å为where æ¡ä»¶ éè¦æç¡®å®ä¹ 表达å¼true false |
| | | -- ---------------------------- |
| | | -- CREATE OR REPLACE FUNCTION generate_subscripts(anyarray, int) |
| | | -- RETURNS SETOF int AS $$ |
| | | -- SELECT generate_series(array_lower($1,$2), array_upper($1,$2)) |
| | | -- $$ LANGUAGE sql; |
| | | |
| | | |
| | | -- CREATE OR REPLACE FUNCTION find_in_set(str text, strlist text) |
| | | -- RETURNS int AS $$ |
| | | -- SELECT i |
| | | -- FROM generate_subscripts(string_to_array($2,','),1) g(i) |
| | | -- WHERE (string_to_array($2, ','))[i] = $1 |
| | | -- UNION ALL |
| | | -- SELECT 0 |
| | | -- LIMIT 1 |
| | | -- $$ LANGUAGE sql STRICT; |
| | | |
| | | CREATE OR REPLACE FUNCTION find_in_set(BIGINT,VARCHAR) |
| | | RETURNS BOOLEAN |
| | | AS $BODY$ |
| | | DECLARE |
| | | STR ALIAS FOR $1; |
| | | STRS ALIAS FOR $2; |
| | | POS INTEGER; |
| | | STATUS BOOLEAN; |
| | | BEGIN |
| | | SELECT POSITION( ','||STR||',' IN ','||STRS||',') INTO POS; |
| | | IF POS > 0 THEN |
| | | STATUS = TRUE; |
| | | ELSE |
| | | STATUS = FALSE; |
| | | END IF; |
| | | RETURN STATUS; |
| | | END; |
| | | $BODY$ LANGUAGE PLPGSQL; |
| | | |
| | | ---ç¨æ·å¤çèªå¨çææ¶çå·®å¼ |
| | | |
| | | CREATE OR REPLACE view view_self_table_columns |
| | | as select |
| | | table_catalog , |
| | | table_schema , |
| | | table_name , |
| | | ordinal_position as sort, |
| | | column_name , |
| | | data_type as TypeName, |
| | | (case |
| | | when (is_nullable = 'no' and contype !='p' ) then '1' |
| | | else null |
| | | end) as is_required, |
| | | (case |
| | | when contype = 'p' then '1' |
| | | else '0' |
| | | end) as is_pk, |
| | | coalesce(character_maximum_length, numeric_precision,-1) as Length, |
| | | numeric_scale as scale, |
| | | case |
| | | is_nullable when 'NO' then 0 |
| | | else 1 |
| | | end as canNull, |
| | | column_default as defaultval, |
| | | case |
| | | when position('nextval' in column_default)>0 then 1 |
| | | else 0 |
| | | end as IsIdentity, |
| | | (case |
| | | when position('nextval' in column_default)>0 then 1 |
| | | else 0 |
| | | end) as is_increment, |
| | | c.DeText as column_comment, |
| | | c.typname as column_type, |
| | | c.contype, |
| | | ordinal_position |
| | | from |
| | | information_schema.columns |
| | | left join (select |
| | | datname,pg_get_userbyid(relowner) AS tableowner,nspname,relname,attname, description as DeText,typname,pg_cons.contype |
| | | from |
| | | pg_class |
| | | left join pg_attribute pg_attr on |
| | | pg_attr.attrelid = pg_class.oid |
| | | left join pg_description pg_desc on |
| | | pg_desc.objoid = pg_attr.attrelid |
| | | and pg_desc.objsubid = pg_attr.attnum |
| | | left join pg_namespace pg_ns on |
| | | pg_ns."oid" = pg_class.relnamespace |
| | | left join pg_database on relowner = datdba |
| | | left join pg_type on pg_attr.atttypid = pg_type."oid" |
| | | left join (select pg_con.*,unnest(conkey) conkey_new from pg_constraint pg_con) pg_cons on |
| | | pg_attr.attrelid = pg_class.oid |
| | | and pg_attr.attnum = pg_cons.conkey_new and pg_cons.conrelid = pg_class.oid |
| | | where |
| | | pg_attr.attnum>0 |
| | | and pg_attr.attrelid = pg_class.oid |
| | | ) c |
| | | on table_catalog = datname and table_schema = nspname and table_name = relname and column_name = attname; |
| | | --where |
| | | -- table_schema = 'public' |
| | | -- and table_name = 'sys_user_role' |
| | | --order by ordinal_position asc |
| | | |
| | | |
| | | |
| | | CREATE OR REPLACE view view_self_table |
| | | as select |
| | | datname as table_catalog, |
| | | pg_get_userbyid(relowner) AS tableowner, |
| | | nspname as table_schema, |
| | | relname as table_name, |
| | | cast(obj_description(relfilenode,'pg_class') as varchar) as table_comment , |
| | | now() create_time, |
| | | now() update_time |
| | | from pg_class c |
| | | left join pg_namespace pg_ns on |
| | | pg_ns."oid" = c.relnamespace |
| | | left join pg_database on relowner = datdba |
| | | where relname in (select tablename from pg_tables) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | -- ---------------------------- |
| | | -- 1ãå卿¯ä¸ä¸ªå·²é
ç½®ç jobDetail ç详ç»ä¿¡æ¯ |
| | | -- ---------------------------- |
| | | drop table if exists qrtz_job_details; |
| | | CREATE TABLE qrtz_job_details |
| | | ( |
| | | SCHED_NAME VARCHAR(120) NOT NULL, |
| | | JOB_NAME VARCHAR(200) NOT NULL, |
| | | JOB_GROUP VARCHAR(200) NOT NULL, |
| | | DESCRIPTION VARCHAR(250) NULL, |
| | | JOB_CLASS_NAME VARCHAR(250) NOT NULL, |
| | | IS_DURABLE BOOL NOT NULL, |
| | | IS_NONCONCURRENT BOOL NOT NULL, |
| | | IS_UPDATE_DATA BOOL NOT NULL, |
| | | REQUESTS_RECOVERY BOOL NOT NULL, |
| | | JOB_DATA BYTEA NULL, |
| | | PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) |
| | | ); |
| | | |
| | | -- ---------------------------- |
| | | -- 2ã åå¨å·²é
ç½®ç Trigger çä¿¡æ¯ |
| | | -- ---------------------------- |
| | | drop table if exists qrtz_triggers; |
| | | CREATE TABLE qrtz_triggers |
| | | ( |
| | | SCHED_NAME VARCHAR(120) NOT NULL, |
| | | TRIGGER_NAME VARCHAR(200) NOT NULL, |
| | | TRIGGER_GROUP VARCHAR(200) NOT NULL, |
| | | JOB_NAME VARCHAR(200) NOT NULL, |
| | | JOB_GROUP VARCHAR(200) NOT NULL, |
| | | DESCRIPTION VARCHAR(250) NULL, |
| | | NEXT_FIRE_TIME BIGINT NULL, |
| | | PREV_FIRE_TIME BIGINT NULL, |
| | | PRIORITY INTEGER NULL, |
| | | TRIGGER_STATE VARCHAR(16) NOT NULL, |
| | | TRIGGER_TYPE VARCHAR(8) NOT NULL, |
| | | START_TIME BIGINT NOT NULL, |
| | | END_TIME BIGINT NULL, |
| | | CALENDAR_NAME VARCHAR(200) NULL, |
| | | MISFIRE_INSTR SMALLINT NULL, |
| | | JOB_DATA BYTEA NULL, |
| | | 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) |
| | | ); |
| | | -- ---------------------------- |
| | | -- 3ã åå¨ç®åç Triggerï¼å
æ¬é夿¬¡æ°ï¼é´éï¼ä»¥å已触åçæ¬¡æ° |
| | | -- ---------------------------- |
| | | drop table if exists qrtz_simple_triggers; |
| | | CREATE TABLE qrtz_simple_triggers |
| | | ( |
| | | SCHED_NAME VARCHAR(120) NOT NULL, |
| | | TRIGGER_NAME VARCHAR(200) NOT NULL, |
| | | TRIGGER_GROUP VARCHAR(200) NOT NULL, |
| | | REPEAT_COUNT BIGINT NOT NULL, |
| | | REPEAT_INTERVAL BIGINT NOT NULL, |
| | | TIMES_TRIGGERED BIGINT NOT NULL, |
| | | 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) |
| | | ); |
| | | -- ---------------------------- |
| | | -- 4ã åå¨ Cron Triggerï¼å
æ¬ Cron 表达å¼åæ¶åºä¿¡æ¯ |
| | | -- ---------------------------- |
| | | drop table if exists qrtz_cron_triggers; |
| | | CREATE TABLE qrtz_cron_triggers |
| | | ( |
| | | SCHED_NAME VARCHAR(120) NOT NULL, |
| | | TRIGGER_NAME VARCHAR(200) NOT NULL, |
| | | TRIGGER_GROUP VARCHAR(200) NOT NULL, |
| | | CRON_EXPRESSION VARCHAR(120) NOT NULL, |
| | | TIME_ZONE_ID VARCHAR(80), |
| | | 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) |
| | | ); |
| | | |
| | | -- ---------------------------- |
| | | -- 5ã Trigger ä½ä¸º Blob ç±»ååå¨(ç¨äº Quartz ç¨æ·ç¨ JDBC å建ä»ä»¬èªå·±å®å¶ç Trigger ç±»åï¼JobStore å¹¶ä¸ç¥éå¦ä½åå¨å®ä¾çæ¶å) |
| | | -- ---------------------------- |
| | | drop table if exists qrtz_blob_triggers; |
| | | CREATE TABLE qrtz_blob_triggers |
| | | ( |
| | | SCHED_NAME VARCHAR(120) NOT NULL, |
| | | TRIGGER_NAME VARCHAR(200) NOT NULL, |
| | | TRIGGER_GROUP VARCHAR(200) NOT NULL, |
| | | BLOB_DATA BYTEA NULL, |
| | | 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) |
| | | ); |
| | | |
| | | -- ---------------------------- |
| | | -- 6ã 以 Blob ç±»ååå¨åæ¾æ¥åä¿¡æ¯ï¼ quartzå¯é
ç½®ä¸ä¸ªæ¥åæ¥æå®ä¸ä¸ªæ¶é´èå´ |
| | | -- ---------------------------- |
| | | drop table if exists qrtz_calendars; |
| | | CREATE TABLE qrtz_calendars |
| | | ( |
| | | SCHED_NAME VARCHAR(120) NOT NULL, |
| | | CALENDAR_NAME VARCHAR(200) NOT NULL, |
| | | CALENDAR BYTEA NOT NULL, |
| | | PRIMARY KEY (SCHED_NAME,CALENDAR_NAME) |
| | | ); |
| | | -- ---------------------------- |
| | | -- 7ã åå¨å·²æåç Trigger ç»çä¿¡æ¯ |
| | | -- ---------------------------- |
| | | drop table if exists qrtz_paused_trigger_grps; |
| | | CREATE TABLE qrtz_paused_trigger_grps |
| | | ( |
| | | SCHED_NAME VARCHAR(120) NOT NULL, |
| | | TRIGGER_GROUP VARCHAR(200) NOT NULL, |
| | | PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP) |
| | | ); |
| | | |
| | | -- ---------------------------- |
| | | -- 8ã åå¨ä¸å·²è§¦åç Trigger ç¸å
³çç¶æä¿¡æ¯ï¼ä»¥åç¸è Job çæ§è¡ä¿¡æ¯ |
| | | -- ---------------------------- |
| | | drop table if exists qrtz_fired_triggers; |
| | | CREATE TABLE qrtz_fired_triggers |
| | | ( |
| | | SCHED_NAME VARCHAR(120) NOT NULL, |
| | | ENTRY_ID VARCHAR(95) NOT NULL, |
| | | TRIGGER_NAME VARCHAR(200) NOT NULL, |
| | | TRIGGER_GROUP VARCHAR(200) NOT NULL, |
| | | INSTANCE_NAME VARCHAR(200) NOT NULL, |
| | | FIRED_TIME BIGINT NOT NULL, |
| | | SCHED_TIME BIGINT NOT NULL, |
| | | PRIORITY INTEGER NOT NULL, |
| | | STATE VARCHAR(16) NOT NULL, |
| | | JOB_NAME VARCHAR(200) NULL, |
| | | JOB_GROUP VARCHAR(200) NULL, |
| | | IS_NONCONCURRENT BOOL NULL, |
| | | REQUESTS_RECOVERY BOOL NULL, |
| | | PRIMARY KEY (SCHED_NAME,ENTRY_ID) |
| | | ); |
| | | |
| | | -- ---------------------------- |
| | | -- 9ã åå¨å°éçæå
³ Scheduler çç¶æä¿¡æ¯ï¼å妿¯ç¨äºé群ä¸ï¼å¯ä»¥çå°å
¶ä»ç Scheduler å®ä¾ |
| | | -- ---------------------------- |
| | | drop table if exists qrtz_scheduler_state; |
| | | CREATE TABLE qrtz_scheduler_state |
| | | ( |
| | | SCHED_NAME VARCHAR(120) NOT NULL, |
| | | INSTANCE_NAME VARCHAR(200) NOT NULL, |
| | | LAST_CHECKIN_TIME BIGINT NOT NULL, |
| | | CHECKIN_INTERVAL BIGINT NOT NULL, |
| | | PRIMARY KEY (SCHED_NAME,INSTANCE_NAME) |
| | | ); |
| | | |
| | | -- ---------------------------- |
| | | -- 10ã åå¨ç¨åºçæ²è§éçä¿¡æ¯(åå¦ä½¿ç¨äºæ²è§é) |
| | | -- ---------------------------- |
| | | drop table if exists qrtz_locks; |
| | | CREATE TABLE qrtz_locks |
| | | ( |
| | | SCHED_NAME VARCHAR(120) NOT NULL, |
| | | LOCK_NAME VARCHAR(40) NOT NULL, |
| | | PRIMARY KEY (SCHED_NAME,LOCK_NAME) |
| | | ); |
| | | |
| | | drop table if exists qrtz_simprop_triggers; |
| | | CREATE TABLE qrtz_simprop_triggers |
| | | ( |
| | | SCHED_NAME VARCHAR(120) NOT NULL, |
| | | TRIGGER_NAME VARCHAR(200) NOT NULL, |
| | | TRIGGER_GROUP VARCHAR(200) NOT NULL, |
| | | STR_PROP_1 VARCHAR(512) NULL, |
| | | STR_PROP_2 VARCHAR(512) NULL, |
| | | STR_PROP_3 VARCHAR(512) NULL, |
| | | INT_PROP_1 INT NULL, |
| | | INT_PROP_2 INT NULL, |
| | | LONG_PROP_1 BIGINT NULL, |
| | | LONG_PROP_2 BIGINT NULL, |
| | | DEC_PROP_1 NUMERIC(13,4) NULL, |
| | | DEC_PROP_2 NUMERIC(13,4) NULL, |
| | | BOOL_PROP_1 BOOL NULL, |
| | | BOOL_PROP_2 BOOL NULL, |
| | | 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) |
| | | ); |
| | | create index idx_qrtz_j_req_recovery on qrtz_job_details(SCHED_NAME,REQUESTS_RECOVERY); |
| | | create index idx_qrtz_j_grp on qrtz_job_details(SCHED_NAME,JOB_GROUP); |
| | | |
| | | create index idx_qrtz_t_j on qrtz_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP); |
| | | create index idx_qrtz_t_jg on qrtz_triggers(SCHED_NAME,JOB_GROUP); |
| | | create index idx_qrtz_t_c on qrtz_triggers(SCHED_NAME,CALENDAR_NAME); |
| | | create index idx_qrtz_t_g on qrtz_triggers(SCHED_NAME,TRIGGER_GROUP); |
| | | create index idx_qrtz_t_state on qrtz_triggers(SCHED_NAME,TRIGGER_STATE); |
| | | create index idx_qrtz_t_n_state on qrtz_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE); |
| | | create index idx_qrtz_t_n_g_state on qrtz_triggers(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE); |
| | | create index idx_qrtz_t_next_fire_time on qrtz_triggers(SCHED_NAME,NEXT_FIRE_TIME); |
| | | create index idx_qrtz_t_nft_st on qrtz_triggers(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME); |
| | | create index idx_qrtz_t_nft_misfire on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME); |
| | | create index idx_qrtz_t_nft_st_misfire on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE); |
| | | create index idx_qrtz_t_nft_st_misfire_grp on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE); |
| | | |
| | | create index idx_qrtz_ft_trig_inst_name on qrtz_fired_triggers(SCHED_NAME,INSTANCE_NAME); |
| | | create index idx_qrtz_ft_inst_job_req_rcvry on qrtz_fired_triggers(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY); |
| | | create index idx_qrtz_ft_j_g on qrtz_fired_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP); |
| | | create index idx_qrtz_ft_jg on qrtz_fired_triggers(SCHED_NAME,JOB_GROUP); |
| | | create index idx_qrtz_ft_t_g on qrtz_fired_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP); |
| | | create index idx_qrtz_ft_tg on qrtz_fired_triggers(SCHED_NAME,TRIGGER_GROUP); |
| | | commit; |