From d1ef8f5eb3af6ae488d362152c1d78675281c489 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期三, 24 八月 2022 18:03:09 +0800 Subject: [PATCH] fix 修复 postgresql 时间查询类型转换报错问题 --- script/sql/postgres/postgres_ry_vue_4.X.sql | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/script/sql/postgres/postgres_ry_vue_4.X.sql b/script/sql/postgres/postgres_ry_vue_4.X.sql index 8b3889b..a0baed8 100644 --- a/script/sql/postgres/postgres_ry_vue_4.X.sql +++ b/script/sql/postgres/postgres_ry_vue_4.X.sql @@ -330,6 +330,7 @@ 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('1050', '璐︽埛瑙i攣', '501', '4', '#', '', '', '1', '0', 'F', '0', '0', 'monitor:logininfor:unlock', '#', 'admin', now(), '', null, ''); -- 鍦ㄧ嚎鐢ㄦ埛鎸夐挳 insert into sys_menu values('1046', '鍦ㄧ嚎鏌ヨ', '109', '1', '#', '', '', '1', '0', 'F', '0', '0', 'monitor:online:query', '#', 'admin', now(), '', null, ''); insert into sys_menu values('1047', '鎵归噺寮洪��', '109', '2', '#', '', '', '1', '0', 'F', '0', '0', 'monitor:online:batchLogout', '#', 'admin', now(), '', null, ''); @@ -459,6 +460,7 @@ 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', '1050'); insert into sys_role_menu values ('2', '1046'); insert into sys_role_menu values ('2', '1047'); insert into sys_role_menu values ('2', '1048'); @@ -955,3 +957,9 @@ insert into sys_oss_config values (4, 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1', '', 'admin', now(), 'admin', now(), null); insert into sys_oss_config values (5, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1', '', 'admin', now(), 'admin', now(), NULL); +-- 瀛楃涓茶嚜鍔ㄨ浆鏃堕棿 閬垮厤妗嗘灦鏃堕棿鏌ヨ鎶ラ敊闂 +create or replace function cast_varchar_to_timestamp(varchar) returns timestamptz as $$ +select to_timestamp($1, 'yyyy-mm-dd hh24:mi:ss'); +$$ language sql strict ; + +create cast (varchar as timestamptz) with function cast_varchar_to_timestamp as IMPLICIT; -- Gitblit v1.9.3