From a0eba36531a5c05951978476eadb1153e3422015 Mon Sep 17 00:00:00 2001 From: zch Date: Mon, 28 Apr 2025 13:06:30 +0800 Subject: [PATCH] =?UTF-8?q?refactor(os):=20=E5=B0=86=20isnull()=20?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E4=B8=BA=20TiDB/MySQL=20=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E7=9A=84=20ifnull(),=E4=BD=BF=E7=94=A8=20now()=E6=9B=BF?= =?UTF-8?q?=E4=BB=A3=20getdate()=20=E8=8E=B7=E5=8F=96=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新了包括 os-generator、os-system、os-quartz等模块中的 Mapper 文件 --- .../mapper/generator/GenTableColumnMapper.xml | 8 ++++---- .../resources/mapper/generator/GenTableMapper.xml | 4 ++-- os-generator/src/main/resources/vm/sql/sql.vm | 12 ++++++------ .../resources/mapper/quartz/SysJobLogMapper.xml | 2 +- .../main/resources/mapper/quartz/SysJobMapper.xml | 4 ++-- .../resources/mapper/system/SysConfigMapper.xml | 4 ++-- .../main/resources/mapper/system/SysDeptMapper.xml | 4 ++-- .../resources/mapper/system/SysDictDataMapper.xml | 4 ++-- .../resources/mapper/system/SysDictTypeMapper.xml | 4 ++-- .../mapper/system/SysLogininforMapper.xml | 2 +- .../main/resources/mapper/system/SysMenuMapper.xml | 14 +++++++------- .../resources/mapper/system/SysNoticeMapper.xml | 4 ++-- .../resources/mapper/system/SysOperLogMapper.xml | 2 +- .../main/resources/mapper/system/SysPostMapper.xml | 4 ++-- .../main/resources/mapper/system/SysRoleMapper.xml | 4 ++-- .../main/resources/mapper/system/SysUserMapper.xml | 4 ++-- 16 files changed, 40 insertions(+), 40 deletions(-) diff --git a/os-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml b/os-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml index 2704519..3706536 100644 --- a/os-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml +++ b/os-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml @@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/os-system/src/main/resources/mapper/system/SysMenuMapper.xml b/os-system/src/main/resources/mapper/system/SysMenuMapper.xml index c8ab2a5..b5304d3 100644 --- a/os-system/src/main/resources/mapper/system/SysMenuMapper.xml +++ b/os-system/src/main/resources/mapper/system/SysMenuMapper.xml @@ -28,7 +28,7 @@ - select menu_id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, isnull(perms,'') as perms, icon, create_time + select menu_id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time from sys_menu @@ -49,13 +49,13 @@ @@ -151,7 +151,7 @@ icon = #{icon}, remark = #{remark}, update_by = #{updateBy}, - update_time = getdate() + update_time = now() where menu_id = #{menuId} @@ -192,7 +192,7 @@ #{icon}, #{remark}, #{createBy}, - getdate() + now() ) diff --git a/os-system/src/main/resources/mapper/system/SysNoticeMapper.xml b/os-system/src/main/resources/mapper/system/SysNoticeMapper.xml index e6b3184..def5fcb 100644 --- a/os-system/src/main/resources/mapper/system/SysNoticeMapper.xml +++ b/os-system/src/main/resources/mapper/system/SysNoticeMapper.xml @@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, - getdate() + now() ) @@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" notice_content = #{noticeContentBit}, status = #{status}, update_by = #{updateBy}, - update_time = getdate() + update_time = now() where notice_id = #{noticeId} diff --git a/os-system/src/main/resources/mapper/system/SysOperLogMapper.xml b/os-system/src/main/resources/mapper/system/SysOperLogMapper.xml index d09b0b4..8079ee1 100644 --- a/os-system/src/main/resources/mapper/system/SysOperLogMapper.xml +++ b/os-system/src/main/resources/mapper/system/SysOperLogMapper.xml @@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time) - values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, getdate()) + values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, now())