77681 12 часов назад
Родитель
Сommit
da38571067
39 измененных файлов с 158 добавлено и 280 удалено
  1. 0 93
      fix-columns.sql
  2. 0 37
      fix-entity-fields.md
  3. 1 1
      gw-framework/src/main/java/com/goldenwater/framework/aspectj/DataScopeAspect.java
  4. 7 7
      gw-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml
  5. 4 4
      gw-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml
  6. 1 1
      gw-slgc/src/main/resources/mapper/efinder/DocFileMapper.xml
  7. 1 1
      gw-slgc/src/main/resources/mapper/efinder/DocFolderMapper.xml
  8. 1 1
      gw-slgc/src/main/resources/mapper/pms/PmsAccessoryMapper.xml
  9. 2 2
      gw-slgc/src/main/resources/mapper/pms/PmsBidCallerMapper.xml
  10. 1 1
      gw-slgc/src/main/resources/mapper/pms/PmsBidTenderMapper.xml
  11. 1 1
      gw-slgc/src/main/resources/mapper/pms/PmsCompanyMapper.xml
  12. 1 1
      gw-slgc/src/main/resources/mapper/pms/PmsContactMapper.xml
  13. 1 1
      gw-slgc/src/main/resources/mapper/pms/PmsContractBillMapper.xml
  14. 1 1
      gw-slgc/src/main/resources/mapper/pms/PmsContractFeeMapper.xml
  15. 1 1
      gw-slgc/src/main/resources/mapper/pms/PmsContractLogMapper.xml
  16. 2 2
      gw-slgc/src/main/resources/mapper/pms/PmsContractMapper.xml
  17. 1 1
      gw-slgc/src/main/resources/mapper/pms/PmsContractRefMapper.xml
  18. 1 1
      gw-slgc/src/main/resources/mapper/pms/PmsMeetingMapper.xml
  19. 1 1
      gw-slgc/src/main/resources/mapper/pms/PmsPhaseMapper.xml
  20. 2 2
      gw-slgc/src/main/resources/mapper/pms/PmsPhaseTaskMapper.xml
  21. 3 3
      gw-slgc/src/main/resources/mapper/pms/PmsProjectMapper.xml
  22. 1 1
      gw-slgc/src/main/resources/mapper/pms/PmsReportMapper.xml
  23. 1 1
      gw-slgc/src/main/resources/mapper/portal/DjxxMapper.xml
  24. 1 1
      gw-slgc/src/main/resources/mapper/slgc/DocCateMapper.xml
  25. 4 4
      gw-system/src/main/resources/mapper/system/SysCateMapper.xml
  26. 9 9
      gw-system/src/main/resources/mapper/system/SysConfigMapper.xml
  27. 7 7
      gw-system/src/main/resources/mapper/system/SysDeptMapper.xml
  28. 3 3
      gw-system/src/main/resources/mapper/system/SysDictDataMapper.xml
  29. 9 9
      gw-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
  30. 5 5
      gw-system/src/main/resources/mapper/system/SysLogininforMapper.xml
  31. 11 11
      gw-system/src/main/resources/mapper/system/SysMenuMapper.xml
  32. 4 4
      gw-system/src/main/resources/mapper/system/SysNoticeMapper.xml
  33. 18 10
      gw-system/src/main/resources/mapper/system/SysNoticeReadMapper.xml
  34. 6 6
      gw-system/src/main/resources/mapper/system/SysOperLogMapper.xml
  35. 6 6
      gw-system/src/main/resources/mapper/system/SysPostMapper.xml
  36. 6 6
      gw-system/src/main/resources/mapper/system/SysRoleApperForMapper.xml
  37. 10 10
      gw-system/src/main/resources/mapper/system/SysRoleMapper.xml
  38. 5 5
      gw-system/src/main/resources/mapper/system/SysTemplateMapper.xml
  39. 19 19
      gw-system/src/main/resources/mapper/system/SysUserMapper.xml

+ 0 - 93
fix-columns.sql

@@ -1,93 +0,0 @@
--- 补齐实体缺失字段的DDL语句
-
--- PmsReport
-ALTER TABLE pms_report ADD COLUMN prj_id BIGINT COMMENT '项目ID';
-ALTER TABLE pms_report ADD COLUMN prj_name VARCHAR(200) COMMENT '项目名称';
-ALTER TABLE pms_report ADD COLUMN num BIGINT COMMENT '报告编号';
-ALTER TABLE pms_report ADD COLUMN tm DATETIME COMMENT '报告时间';
-ALTER TABLE pms_report ADD COLUMN addr VARCHAR(500) COMMENT '报告地点';
-ALTER TABLE pms_report ADD COLUMN rpt_user VARCHAR(100) COMMENT '报告人';
-ALTER TABLE pms_report ADD COLUMN rpt_date DATE COMMENT '报告日期';
-ALTER TABLE pms_report ADD COLUMN view_num BIGINT DEFAULT 0 COMMENT '浏览次数';
-ALTER TABLE pms_report ADD COLUMN down_num BIGINT DEFAULT 0 COMMENT '下载次数';
-
--- PmsContact
-ALTER TABLE pms_contact ADD COLUMN prj_id BIGINT COMMENT '项目ID';
-ALTER TABLE pms_contact ADD COLUMN unit_type VARCHAR(50) COMMENT '单位类型';
-ALTER TABLE pms_contact ADD COLUMN unit_name VARCHAR(200) COMMENT '单位名称';
-ALTER TABLE pms_contact ADD COLUMN position VARCHAR(100) COMMENT '职位';
-ALTER TABLE pms_contact ADD COLUMN note VARCHAR(500) COMMENT '备注';
-
--- PmsContract
-ALTER TABLE pms_contract ADD COLUMN con_pid BIGINT COMMENT '父合同ID';
-ALTER TABLE pms_contract ADD COLUMN con_stdt DATE COMMENT '合同开始日期';
-ALTER TABLE pms_contract ADD COLUMN con_eddt DATE COMMENT '合同结束日期';
-ALTER TABLE pms_contract ADD COLUMN con_note VARCHAR(1000) COMMENT '合同备注';
-
--- PmsProject
-ALTER TABLE pms_project ADD COLUMN prj_pid BIGINT COMMENT '父项目ID';
-ALTER TABLE pms_project ADD COLUMN if_ztb VARCHAR(10) COMMENT '是否招标';
-ALTER TABLE pms_project ADD COLUMN opt_user VARCHAR(100) COMMENT '操作人';
-ALTER TABLE pms_project ADD COLUMN opt_date DATETIME COMMENT '操作时间';
-
--- PmsContractBill
-ALTER TABLE pms_contract_bill ADD COLUMN bill_user VARCHAR(100) COMMENT '开票人';
-ALTER TABLE pms_contract_bill ADD COLUMN bill_state VARCHAR(50) COMMENT '开票状态';
-ALTER TABLE pms_contract_bill ADD COLUMN opt_user VARCHAR(100) COMMENT '操作人ID';
-ALTER TABLE pms_contract_bill ADD COLUMN opt_date DATETIME COMMENT '操作时间';
-ALTER TABLE pms_contract_bill ADD COLUMN opt_name VARCHAR(100) COMMENT '操作人姓名';
-ALTER TABLE pms_contract_bill ADD COLUMN bill_title VARCHAR(200) COMMENT '发票标题';
-ALTER TABLE pms_contract_bill ADD COLUMN bill_text VARCHAR(1000) COMMENT '发票内容';
-
--- PmsContractFee
-ALTER TABLE pms_contract_fee ADD COLUMN fee_type VARCHAR(50) COMMENT '费用类型';
-ALTER TABLE pms_contract_fee ADD COLUMN fee_date DATE COMMENT '费用日期';
-ALTER TABLE pms_contract_fee ADD COLUMN fee_note VARCHAR(500) COMMENT '费用备注';
-ALTER TABLE pms_contract_fee ADD COLUMN opt_user VARCHAR(100) COMMENT '操作人ID';
-ALTER TABLE pms_contract_fee ADD COLUMN opt_date DATETIME COMMENT '操作时间';
-ALTER TABLE pms_contract_fee ADD COLUMN opt_name VARCHAR(100) COMMENT '操作人姓名';
-
--- PmsContractPayment
-ALTER TABLE pms_contract_payment ADD COLUMN pay_type VARCHAR(50) COMMENT '支付类型';
-ALTER TABLE pms_contract_payment ADD COLUMN pay_state VARCHAR(50) COMMENT '支付状态';
-ALTER TABLE pms_contract_payment ADD COLUMN fee_note VARCHAR(500) COMMENT '费用备注';
-ALTER TABLE pms_contract_payment ADD COLUMN opt_user VARCHAR(100) COMMENT '操作人ID';
-ALTER TABLE pms_contract_payment ADD COLUMN opt_name VARCHAR(100) COMMENT '操作人姓名';
-ALTER TABLE pms_contract_payment ADD COLUMN opt_date DATETIME COMMENT '操作时间';
-
--- PmsPhaseLog
-ALTER TABLE pms_phase_log ADD COLUMN prj_id BIGINT COMMENT '项目ID';
-ALTER TABLE pms_phase_log ADD COLUMN rcd_date DATE COMMENT '记录日期';
-ALTER TABLE pms_phase_log ADD COLUMN rcd_ratio DECIMAL(5,2) COMMENT '完成比例';
-ALTER TABLE pms_phase_log ADD COLUMN rcd_user VARCHAR(100) COMMENT '记录人ID';
-ALTER TABLE pms_phase_log ADD COLUMN rcd_name VARCHAR(100) COMMENT '记录人姓名';
-
--- PmsPhaseTask
-ALTER TABLE pms_phase_task ADD COLUMN prj_id BIGINT COMMENT '项目ID';
-ALTER TABLE pms_phase_task ADD COLUMN plan_start DATE COMMENT '计划开始日期';
-ALTER TABLE pms_phase_task ADD COLUMN plan_end DATE COMMENT '计划结束日期';
-ALTER TABLE pms_phase_task ADD COLUMN recipient_id VARCHAR(100) COMMENT '接收人ID';
-ALTER TABLE pms_phase_task ADD COLUMN task_seq BIGINT COMMENT '任务序号';
-ALTER TABLE pms_phase_task ADD COLUMN audit_id VARCHAR(100) COMMENT '审核人ID';
-ALTER TABLE pms_phase_task ADD COLUMN audit_name VARCHAR(100) COMMENT '审核人姓名';
-
--- PmsMeeting
-ALTER TABLE pms_meeting ADD COLUMN prj_name VARCHAR(200) COMMENT '项目名称';
-ALTER TABLE pms_meeting ADD COLUMN enter_into VARCHAR(1000) COMMENT '签到信息';
-ALTER TABLE pms_meeting ADD COLUMN view_num BIGINT DEFAULT 0 COMMENT '浏览次数';
-
--- PmsPhase
-ALTER TABLE pms_phase ADD COLUMN paz_note VARCHAR(500) COMMENT '阶段备注';
-ALTER TABLE pms_phase ADD COLUMN state_note VARCHAR(200) COMMENT '状态说明';
-ALTER TABLE pms_phase ADD COLUMN duty_uname VARCHAR(100) COMMENT '责任人姓名';
-
--- PmsCompany
-ALTER TABLE pms_company ADD COLUMN note VARCHAR(500) COMMENT '备注';
-
--- PmsAccessory
-ALTER TABLE pms_accessory ADD COLUMN prj_id BIGINT COMMENT '项目ID';
-ALTER TABLE pms_accessory ADD COLUMN file_viewname VARCHAR(200) COMMENT '显示文件名';
-ALTER TABLE pms_accessory ADD COLUMN file_savename VARCHAR(200) COMMENT '存储文件名';
-ALTER TABLE pms_accessory ADD COLUMN file_date DATETIME COMMENT '文件日期';
-ALTER TABLE pms_accessory ADD COLUMN opt_user VARCHAR(100) COMMENT '操作人ID';
-ALTER TABLE pms_accessory ADD COLUMN opt_name VARCHAR(100) COMMENT '操作人姓名';

+ 0 - 37
fix-entity-fields.md

@@ -1,37 +0,0 @@
-# 补齐实体缺失字段
-
-## 目标
-修复13个实体的字段缺失问题,恢复旧项目的所有业务功能。
-
-## 修复顺序(按优先级)
-
-### 高优先级(影响核心业务)
-- [x] 1. PmsReport - 补齐 prjId, prjName, num, tm, addr, rptUser, rptDate, viewNum, downNum
-- [x] 2. PmsContact - 补齐 prjId, unitType, unitName, position, note
-- [x] 3. PmsContract - 补齐 conPid, conStdt, conEddt, conNote
-- [x] 4. PmsProject - 补齐 prjPid, ifZtb, optUser, optDate
-
-### 中优先级(影响子表功能)
-- [x] 5. PmsContractBill - 补齐 billUser, billState, optUser, optDate, optName, billTitle, billText
-- [x] 6. PmsContractFee - 补齐 feeType, feeDate, feeNote, optUser, optDate, optName
-- [x] 7. PmsContractPayment - 补齐 payType, payState, feeNote, optUser, optName, optDate
-- [x] 8. PmsPhaseLog - 补齐 prjId, rcdDate, rcdRatio, rcdUser, rcdName
-- [x] 9. PmsPhaseTask - 补齐 prjId, pazId, planStart, planEnd, recipientId, recipientName, taskSeq, auditId, auditName
-
-### 低优先级(辅助功能)
-- [x] 10. PmsMeeting - 补齐 prjName, enterInto, viewNum
-- [x] 11. PmsPhase - 补齐 pazNote, stateNote, dutyUname
-- [x] 12. PmsCompany - 补齐 note
-- [x] 13. PmsAccessory - 补齐 prjId, fileViewname, fileSavename, fileDate, optUser, optName
-
-## 每个实体的修复步骤
-1. 修改实体类 - 添加缺失字段
-2. 修改Mapper XML - 添加字段映射
-3. 生成DDL语句 - 供数据库执行
-4. 修改前端Vue - 添加表单字段和表格列(如需要)
-5. 修改前端API - 添加字段(如需要)
-
-## 完成标准
-- [x] 所有13个实体字段补齐
-- [x] 前端构建通过
-- [x] 所有表单字段与后端一致

+ 1 - 1
gw-framework/src/main/java/com/goldenwater/framework/aspectj/DataScopeAspect.java

@@ -111,7 +111,7 @@ public class DataScopeAspect
             }
             else if (Constants.Dept.DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope))
             {
-                sqlString.append(StringUtils.format(" OR {}.{} IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )", deptAlias, deptField, user.getDeptId(), user.getDeptId()));
+                sqlString.append(StringUtils.format(" OR {}.{} IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or instr(',' || ancestors || ',', ',' || {} || ',') > 0 )", deptAlias, deptField, user.getDeptId(), user.getDeptId()));
             }
             else if (Constants.Dept.DATA_SCOPE_SELF.equals(dataScope))
             {

+ 7 - 7
gw-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml

@@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<include refid="selectJobLogVo"/>
 		<where>
 			<if test="jobName != null and jobName != ''">
-				AND job_name like concat('%', #{jobName}, '%')
+				AND job_name like '%' || #{} || '%'
 			</if>
 			<if test="jobGroup != null and jobGroup != ''">
 				AND job_group = #{jobGroup}
@@ -35,13 +35,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 				AND status = #{status}
 			</if>
 			<if test="invokeTarget != null and invokeTarget != ''">
-				AND invoke_target like concat('%', #{invokeTarget}, '%')
+				AND invoke_target like '%' || #{} || '%'
 			</if>
-			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-				and date_format(create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检�-->
+				and to_char(create_time, 'YYYYMMDD') &gt;= replace(#{params.beginTime}, '-', '')
 			</if>
-			<if test="params.endTime != null and params.endTime != ''"><!-- 结�时间检索 -->
-				and date_format(create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
+			<if test="params.endTime != null and params.endTime != ''"><!-- 结�时间检�-->
+				and to_char(create_time, 'YYYYMMDD') &lt;= replace(#{params.endTime}, '-', '')
 			</if>
 		</where>
 		order by create_time desc
@@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="exceptionInfo != null and exceptionInfo != ''">#{exceptionInfo},</if>
  			<if test="startTime != null">#{startTime},</if>
  			<if test="endTime != null">#{endTime},</if>
- 			sysdate()
+ 			CURRENT_TIMESTAMP
  		)
 	</insert>
 

+ 4 - 4
gw-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml

@@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<include refid="selectJobVo"/>
 		<where>
 			<if test="jobName != null and jobName != ''">
-				AND job_name like concat('%', #{jobName}, '%')
+				AND job_name like '%' || #{} || '%'
 			</if>
 			<if test="jobGroup != null and jobGroup != ''">
 				AND job_group = #{jobGroup}
@@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 				AND status = #{status}
 			</if>
 			<if test="invokeTarget != null and invokeTarget != ''">
-				AND invoke_target like concat('%', #{invokeTarget}, '%')
+				AND invoke_target like '%' || #{} || '%'
 			</if>
 		</where>
 	</select>
@@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<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 = CURRENT_TIMESTAMP
  		</set>
  		where job_id = #{jobId}
 	</update>
@@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<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()
+ 			CURRENT_TIMESTAMP
  		)
 	</insert>
 

+ 1 - 1
gw-slgc/src/main/resources/mapper/efinder/DocFileMapper.xml

@@ -14,7 +14,7 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from doc_file
         <where>
-            <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
+            <if test="name != null and name != ''">and name like '%' || #{} || '%'</if>
             <if test="type != null and type != ''">and type = #{type}</if>
             <if test="pid != null">and pid = #{pid}</if>
             <if test="folderName != null and folderName != ''">

+ 1 - 1
gw-slgc/src/main/resources/mapper/efinder/DocFolderMapper.xml

@@ -12,7 +12,7 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/>, plan_value from doc_folder
         <where>
-            <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
+            <if test="name != null and name != ''">and name like '%' || #{} || '%'</if>
             <if test="pid != null">and pid = #{pid}</if>
             <if test="parentName != null and parentName != ''">
                 and pid = (select id from doc_folder where name = #{parentName} and pid is null)

+ 1 - 1
gw-slgc/src/main/resources/mapper/pms/PmsAccessoryMapper.xml

@@ -22,7 +22,7 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from pms_accessory
         <where>
-            <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
+            <if test="name != null and name != ''">and name like '%' || #{} || '%'</if>
             <if test="parentId != null">and parent_id = #{parentId}</if>
         </where>
     </select>

+ 2 - 2
gw-slgc/src/main/resources/mapper/pms/PmsBidCallerMapper.xml

@@ -32,8 +32,8 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from pms_bid_caller
         <where>
-            <if test="ivtTitle != null and ivtTitle != ''">and ivt_title like concat('%', #{ivtTitle}, '%')</if>
-            <if test="ivtCode != null and ivtCode != ''">and ivt_code like concat('%', #{ivtCode}, '%')</if>
+            <if test="ivtTitle != null and ivtTitle != ''">and ivt_title like '%' || #{} || '%'</if>
+            <if test="ivtCode != null and ivtCode != ''">and ivt_code like '%' || #{} || '%'</if>
             <if test="ivtState != null and ivtState != ''">and ivt_state = #{ivtState}</if>
             <if test="prjId != null">and prj_id = #{prjId}</if>
         </where>

+ 1 - 1
gw-slgc/src/main/resources/mapper/pms/PmsBidTenderMapper.xml

@@ -16,7 +16,7 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from pms_bid_tender
         <where>
-            <if test="bidUnit != null and bidUnit != ''">and bid_unit like concat('%', #{bidUnit}, '%')</if>
+            <if test="bidUnit != null and bidUnit != ''">and bid_unit like '%' || #{} || '%'</if>
             <if test="bidState != null and bidState != ''">and bid_state = #{bidState}</if>
             <if test="prjId != null">and prj_id = #{prjId}</if>
             <if test="ivtId != null">and ivt_id = #{ivtId}</if>

+ 1 - 1
gw-slgc/src/main/resources/mapper/pms/PmsCompanyMapper.xml

@@ -16,7 +16,7 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from pms_company
         <where>
-            <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
+            <if test="name != null and name != ''">and name like '%' || #{} || '%'</if>
             <if test="type != null and type != ''">and type = #{type}</if>
         </where>
     </select>

+ 1 - 1
gw-slgc/src/main/resources/mapper/pms/PmsContactMapper.xml

@@ -17,7 +17,7 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from pms_contact
         <where>
-            <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
+            <if test="name != null and name != ''">and name like '%' || #{} || '%'</if>
             <if test="companyId != null">and company_id = #{companyId}</if>
         </where>
     </select>

+ 1 - 1
gw-slgc/src/main/resources/mapper/pms/PmsContractBillMapper.xml

@@ -19,7 +19,7 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from pms_contract_bill
         <where>
-            <if test="billNo != null and billNo != ''">and bill_no like concat('%', #{billNo}, '%')</if>
+            <if test="billNo != null and billNo != ''">and bill_no like '%' || #{} || '%'</if>
             <if test="conId != null">and con_id = #{conId}</if>
         </where>
     </select>

+ 1 - 1
gw-slgc/src/main/resources/mapper/pms/PmsContractFeeMapper.xml

@@ -18,7 +18,7 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from pms_contract_fee
         <where>
-            <if test="feeName != null and feeName != ''">and fee_name like concat('%', #{feeName}, '%')</if>
+            <if test="feeName != null and feeName != ''">and fee_name like '%' || #{} || '%'</if>
             <if test="conId != null">and con_id = #{conId}</if>
         </where>
     </select>

+ 1 - 1
gw-slgc/src/main/resources/mapper/pms/PmsContractLogMapper.xml

@@ -12,7 +12,7 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from pms_contract_log
         <where>
-            <if test="operator != null and operator != ''">and operator like concat('%', #{operator}, '%')</if>
+            <if test="operator != null and operator != ''">and operator like '%' || #{} || '%'</if>
             <if test="conId != null">and con_id = #{conId}</if>
         </where>
     </select>

+ 2 - 2
gw-slgc/src/main/resources/mapper/pms/PmsContractMapper.xml

@@ -32,8 +32,8 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from pms_contract
         <where>
-            <if test="conCode != null and conCode != ''">and con_code like concat('%', #{conCode}, '%')</if>
-            <if test="conName != null and conName != ''">and con_name like concat('%', #{conName}, '%')</if>
+            <if test="conCode != null and conCode != ''">and con_code like '%' || #{} || '%'</if>
+            <if test="conName != null and conName != ''">and con_name like '%' || #{} || '%'</if>
             <if test="conYear != null and conYear != ''">and con_year = #{conYear}</if>
             <if test="conKind != null and conKind != ''">and con_kind = #{conKind}</if>
             <if test="conType != null and conType != ''">and con_type = #{conType}</if>

+ 1 - 1
gw-slgc/src/main/resources/mapper/pms/PmsContractRefMapper.xml

@@ -11,7 +11,7 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from pms_contract_ref
         <where>
-            <if test="refName != null and refName != ''">and ref_name like concat('%', #{refName}, '%')</if>
+            <if test="refName != null and refName != ''">and ref_name like '%' || #{} || '%'</if>
             <if test="conId != null">and con_id = #{conId}</if>
         </where>
     </select>

+ 1 - 1
gw-slgc/src/main/resources/mapper/pms/PmsMeetingMapper.xml

@@ -19,7 +19,7 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from pms_meeting
         <where>
-            <if test="title != null and title != ''">and title like concat('%', #{title}, '%')</if>
+            <if test="title != null and title != ''">and title like '%' || #{} || '%'</if>
             <if test="prjId != null">and prj_id = #{prjId}</if>
         </where>
     </select>

+ 1 - 1
gw-slgc/src/main/resources/mapper/pms/PmsPhaseMapper.xml

@@ -21,7 +21,7 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from pms_phase
         <where>
-            <if test="pazName != null and pazName != ''">and paz_name like concat('%', #{pazName}, '%')</if>
+            <if test="pazName != null and pazName != ''">and paz_name like '%' || #{} || '%'</if>
             <if test="state != null and state != ''">and state = #{state}</if>
             <if test="prjId != null">and prj_id = #{prjId}</if>
         </where>

+ 2 - 2
gw-slgc/src/main/resources/mapper/pms/PmsPhaseTaskMapper.xml

@@ -21,8 +21,8 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from pms_phase_task
         <where>
-            <if test="taskName != null and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if>
-            <if test="assignee != null and assignee != ''">and assignee like concat('%', #{assignee}, '%')</if>
+            <if test="taskName != null and taskName != ''">and task_name like '%' || #{} || '%'</if>
+            <if test="assignee != null and assignee != ''">and assignee like '%' || #{} || '%'</if>
             <if test="state != null and state != ''">and state = #{state}</if>
             <if test="phaseId != null">and phase_id = #{phaseId}</if>
         </where>

+ 3 - 3
gw-slgc/src/main/resources/mapper/pms/PmsProjectMapper.xml

@@ -30,9 +30,9 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from pms_project
         <where>
-            <if test="prjName != null and prjName != ''">and prj_name like concat('%', #{prjName}, '%')</if>
-            <if test="code != null and code != ''">and code like concat('%', #{code}, '%')</if>
-            <if test="dept != null and dept != ''">and dept like concat('%', #{dept}, '%')</if>
+            <if test="prjName != null and prjName != ''">and prj_name like '%' || #{} || '%'</if>
+            <if test="code != null and code != ''">and code like '%' || #{} || '%'</if>
+            <if test="dept != null and dept != ''">and dept like '%' || #{} || '%'</if>
             <if test="kind != null and kind != ''">and kind = #{kind}</if>
             <if test="type != null and type != ''">and type = #{type}</if>
             <if test="state != null and state != ''">and state = #{state}</if>

+ 1 - 1
gw-slgc/src/main/resources/mapper/pms/PmsReportMapper.xml

@@ -20,7 +20,7 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from pms_report
         <where>
-            <if test="reportName != null and reportName != ''">and report_name like concat('%', #{reportName}, '%')</if>
+            <if test="reportName != null and reportName != ''">and report_name like '%' || #{} || '%'</if>
             <if test="reportType != null and reportType != ''">and report_type = #{reportType}</if>
         </where>
     </select>

+ 1 - 1
gw-slgc/src/main/resources/mapper/portal/DjxxMapper.xml

@@ -14,7 +14,7 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from djxx
         <where>
-            <if test="title != null and title != ''">and title like concat('%', #{title}, '%')</if>
+            <if test="title != null and title != ''">and title like '%' || #{} || '%'</if>
             <if test="state != null and state != ''">and state = #{state}</if>
         </where>
         order by pub_tm desc

+ 1 - 1
gw-slgc/src/main/resources/mapper/slgc/DocCateMapper.xml

@@ -12,7 +12,7 @@
     <select id="selectList" resultMap="BaseResultMap">
         select <include refid="BaseColumns"/> from doc_cate
         <where>
-            <if test="cateName != null and cateName != ''">and cate_name like concat('%', #{cateName}, '%')</if>
+            <if test="cateName != null and cateName != ''">and cate_name like '%' || #{} || '%'</if>
             <if test="catePcode != null and catePcode != ''">and cate_pcode = #{catePcode}</if>
         </where>
     </select>

+ 4 - 4
gw-system/src/main/resources/mapper/system/SysCateMapper.xml

@@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 AND CATE_TABLE = #{cateTable}
             </if>
             <if test="cateName != null and cateName != ''">
-                AND CATE_NAME like concat('%', #{cateName}, '%')
+                AND CATE_NAME like '%' || #{} || '%'
             </if>
             <if test="cateStatus != null">
                 AND CATE_STATUS = #{cateStatus}
@@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="cateSeq != null">#{cateSeq},</if>
             <if test="cateStatus != null">#{cateStatus},</if>
             <if test="createBy != null and createBy != ''">#{createBy},</if>
-            sysdate()
+            CURRENT_TIMESTAMP
         )
     </insert>
     
@@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="cateSeq != null">CATE_SEQ = #{cateSeq},</if>
             <if test="cateStatus != null">CATE_STATUS = #{cateStatus},</if>
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
-            update_time = sysdate()
+            update_time = CURRENT_TIMESTAMP
         </set>
         where CATE_CODE = #{cateCode}
     </update>
@@ -116,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <set>
             <if test="cateStatus != null">CATE_STATUS = #{cateStatus},</if>
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
-            update_time = sysdate()
+            update_time = CURRENT_TIMESTAMP
         </set>
         where CATE_CODE = #{cateCode}
     </update>

+ 9 - 9
gw-system/src/main/resources/mapper/system/SysConfigMapper.xml

@@ -42,19 +42,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectConfigVo"/>
         <where>
 			<if test="configName != null and configName != ''">
-				AND config_name like concat('%', #{configName}, '%')
+				AND config_name like '%' || #{} || '%'
 			</if>
 			<if test="configType != null and configType != ''">
 				AND config_type = #{configType}
 			</if>
 			<if test="configKey != null and configKey != ''">
-				AND config_key like concat('%', #{configKey}, '%')
+				AND config_key like '%' || #{} || '%'
 			</if>
-			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-				and date_format(create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检�-->
+				and to_char(create_time, 'YYYYMMDD') &gt;= replace(#{params.beginTime}, '-', '')
 			</if>
-			<if test="params.endTime != null and params.endTime != ''"><!-- 结�时间检索 -->
-				and date_format(create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
+			<if test="params.endTime != null and params.endTime != ''"><!-- 结�时间检�-->
+				and to_char(create_time, 'YYYYMMDD') &lt;= replace(#{params.endTime}, '-', '')
 			</if>
 		</where>
     </select>
@@ -66,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
     <select id="checkConfigKeyUnique" parameterType="String" resultMap="SysConfigResult">
         <include refid="selectConfigVo"/>
-        where config_key = #{configKey} limit 1
+        where config_key = #{configKey} fetch first 1 rows only
     </select>
     
     <insert id="insertConfig" parameterType="SysConfig">
@@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<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()
+ 			CURRENT_TIMESTAMP
 		)
     </insert>
 	 
@@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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 = CURRENT_TIMESTAMP
         </set>
         where config_id = #{configId}
     </update>

+ 7 - 7
gw-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			AND parent_id = #{parentId}
 		</if>
 		<if test="deptName != null and deptName != ''">
-			AND dept_name like concat('%', #{deptName}, '%')
+			AND dept_name like '%' || #{} || '%'
 		</if>
 		<if test="status != null and status != ''">
 			AND status = #{status}
@@ -71,20 +71,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
 	<select id="hasChildByDeptId" parameterType="Long" resultType="int">
 		select count(1) from sys_dept
-		where del_flag = '0' and parent_id = #{deptId} limit 1
+		where del_flag = '0' and parent_id = #{deptId} fetch first 1 rows only
 	</select>
 	
 	<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
-		select * from sys_dept where find_in_set(#{deptId}, ancestors)
+		select * from sys_dept where instr(',' || ancestors || ',', ',' || #{deptId} || ',') > 0
 	</select>
 	
 	<select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
-		select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors)
+		select count(*) from sys_dept where status = 0 and del_flag = '0' and instr(',' || ancestors || ',', ',' || #{deptId} || ',') > 0
 	</select>
 	
 	<select id="checkDeptNameUnique" resultMap="SysDeptResult">
 	    <include refid="selectDeptVo"/>
-		where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
+		where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' fetch first 1 rows only
 	</select>
     
     <insert id="insertDept" parameterType="SysDept">
@@ -111,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="email != null and email != ''">#{email},</if>
  			<if test="status != null">#{status},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			CURRENT_TIMESTAMP
  		)
 	</insert>
 	
@@ -127,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<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 = CURRENT_TIMESTAMP
  		</set>
  		where dept_id = #{deptId}
 	</update>

+ 3 - 3
gw-system/src/main/resources/mapper/system/SysDictDataMapper.xml

@@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 				AND dict_type = #{dictType}
 			</if>
 			<if test="dictLabel != null and dictLabel != ''">
-				AND dict_label like concat('%', #{dictLabel}, '%')
+				AND dict_label like '%' || #{} || '%'
 			</if>
 			<if test="status != null and status != ''">
 				AND status = #{status}
@@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<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 = CURRENT_TIMESTAMP
  		</set>
  		where dict_code = #{dictCode}
 	</update>
@@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null">#{status},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			CURRENT_TIMESTAMP
  		)
 	</insert>
 	

+ 9 - 9
gw-system/src/main/resources/mapper/system/SysDictTypeMapper.xml

@@ -24,19 +24,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	    <include refid="selectDictTypeVo"/>
 		<where>
 		    <if test="dictName != null and dictName != ''">
-				AND dict_name like concat('%', #{dictName}, '%')
+				AND dict_name like '%' || #{} || '%'
 			</if>
 			<if test="status != null and status != ''">
 				AND status = #{status}
 			</if>
 			<if test="dictType != null and dictType != ''">
-				AND dict_type like concat('%', #{dictType}, '%')
+				AND dict_type like '%' || #{} || '%'
 			</if>
-			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-				and date_format(create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检�-->
+				and to_char(create_time, 'YYYYMMDD') &gt;= replace(#{params.beginTime}, '-', '')
 			</if>
-			<if test="params.endTime != null and params.endTime != ''"><!-- 结�时间检索 -->
-				and date_format(create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
+			<if test="params.endTime != null and params.endTime != ''"><!-- 结�时间检�-->
+				and to_char(create_time, 'YYYYMMDD') &lt;= replace(#{params.endTime}, '-', '')
 			</if>
 	    </where>
 	</select>
@@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
 	<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
 		<include refid="selectDictTypeVo"/>
-		where dict_type = #{dictType} limit 1
+		where dict_type = #{dictType} fetch first 1 rows only
 	</select>
 	
 	<delete id="deleteDictTypeById" parameterType="Long">
@@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<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 = CURRENT_TIMESTAMP
  		</set>
  		where dict_id = #{dictId}
 	</update>
@@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null">#{status},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			CURRENT_TIMESTAMP
  		)
 	</insert>
 	

+ 5 - 5
gw-system/src/main/resources/mapper/system/SysLogininforMapper.xml

@@ -18,25 +18,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 	<insert id="insertLogininfor" parameterType="SysLogininfor">
 		insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time)
-		values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
+		values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, CURRENT_TIMESTAMP)
 	</insert>
 	
 	<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
 		select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor
 		<where>
 			<if test="ipaddr != null and ipaddr != ''">
-				AND ipaddr like concat('%', #{ipaddr}, '%')
+				AND ipaddr like '%' || #{} || '%'
 			</if>
 			<if test="status != null and status != ''">
 				AND status = #{status}
 			</if>
 			<if test="userName != null and userName != ''">
-				AND user_name like concat('%', #{userName}, '%')
+				AND user_name like '%' || #{} || '%'
 			</if>
-			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检�-->
 				AND login_time &gt;= #{params.beginTime}
 			</if>
-			<if test="params.endTime != null and params.endTime != ''"><!-- 结�时间检索 -->
+			<if test="params.endTime != null and params.endTime != ''"><!-- 结�时间检�-->
 				AND login_time &lt;= #{params.endTime}
 			</if>
 		</where>

+ 11 - 11
gw-system/src/main/resources/mapper/system/SysMenuMapper.xml

@@ -29,7 +29,7 @@
 	</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, ifnull(perms,'') as perms, icon, create_time 
 		from sys_menu
     </sql>
     
@@ -37,7 +37,7 @@
 		<include refid="selectMenuVo"/>
 		<where>
 			<if test="menuName != null and menuName != ''">
-				AND menu_name like concat('%', #{menuName}, '%')
+				AND menu_name like '%' || #{} || '%'
 			</if>
 			<if test="visible != null and visible != ''">
 				AND visible = #{visible}
@@ -50,20 +50,20 @@
 	</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, ifnull(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, ifnull(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
 		left join sys_role ro on ur.role_id = ro.role_id
 		where ur.user_id = #{params.userId}
 		<if test="menuName != null and menuName != ''">
-            AND m.menu_name like concat('%', #{menuName}, '%')
+            AND m.menu_name like '%' || #{} || '%'
 		</if>
 		<if test="visible != null and visible != ''">
             AND m.visible = #{visible}
@@ -75,7 +75,7 @@
 	</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, ifnull(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
@@ -130,7 +130,7 @@
 	
 	<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
 		<include refid="selectMenuVo"/>
-		where menu_name= #{menuName} and parent_id = #{parentId} limit 1
+		where menu_name= #{menuName} and parent_id = #{parentId} fetch first 1 rows only
 	</select>
 	
 	<select id="selectMenusByPathOrRouteName" parameterType="SysMenu" resultMap="SysMenuResult">
@@ -146,7 +146,7 @@
 			<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>
@@ -157,7 +157,7 @@
 			<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 = CURRENT_TIMESTAMP
 		</set>
 		where menu_id = #{menuId}
 	</update>
@@ -170,7 +170,7 @@
 		<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>
@@ -200,7 +200,7 @@
 		<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()
+		CURRENT_TIMESTAMP
 		)
 	</insert>
 

+ 4 - 4
gw-system/src/main/resources/mapper/system/SysNoticeMapper.xml

@@ -31,13 +31,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectNoticeVo"/>
         <where>
 			<if test="noticeTitle != null and noticeTitle != ''">
-				AND notice_title like concat('%', #{noticeTitle}, '%')
+				AND notice_title like '%' || #{} || '%'
 			</if>
 			<if test="noticeType != null and noticeType != ''">
 				AND notice_type = #{noticeType}
 			</if>
 			<if test="createBy != null and createBy != ''">
-				AND create_by like concat('%', #{createBy}, '%')
+				AND create_by like '%' || #{} || '%'
 			</if>
 		</where>
 		order by notice_id desc
@@ -59,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<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()
+ 			CURRENT_TIMESTAMP
 		)
     </insert>
 	 
@@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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 = CURRENT_TIMESTAMP
         </set>
         where notice_id = #{noticeId}
     </update>

+ 18 - 10
gw-system/src/main/resources/mapper/system/SysNoticeReadMapper.xml

@@ -13,11 +13,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <!-- 新增已读记录 -->
     <insert id="insertNoticeRead" parameterType="SysNoticeRead">
-        insert ignore into sys_notice_read (notice_id, user_id, read_time)
-        values (#{noticeId}, #{userId}, sysdate())
+        insert into sys_notice_read (notice_id, user_id, read_time)
+        select #{noticeId}, #{userId}, CURRENT_TIMESTAMP
+        where not exists (
+            select 1 from sys_notice_read
+            where notice_id = #{noticeId} and user_id = #{userId}
+        )
     </insert>
 
-    <!-- 查询未读数量:正常状态公告 减去 当前用户已读数 -->
+    <!-- 查询未读数量:正常状态公�?减去 当前用户已读�?-->
     <select id="selectUnreadCount" resultType="int">
         select count(*) from sys_notice n
         where n.status = '0' and not exists (select 1 from sys_notice_read r where r.notice_id = n.notice_id and r.user_id = #{userId})
@@ -43,19 +47,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             on r.notice_id = n.notice_id and r.user_id = #{userId}
         where n.status = '0'
         order by n.notice_id desc
-        limit #{limit}
+        fetch first #{limit} rows only
     </select>
 
     <!-- 批量标记已读 -->
     <insert id="insertNoticeReadBatch">
-        insert ignore into sys_notice_read (notice_id, user_id, read_time)
-        values
-        <foreach collection="noticeIds" item="noticeId" separator=",">
-            (#{noticeId}, #{userId}, sysdate())
-        </foreach>
+        merge into sys_notice_read t
+        using (
+            <foreach collection="noticeIds" item="noticeId" separator="union all">
+                select #{noticeId} as notice_id, #{userId} as user_id, CURRENT_TIMESTAMP as read_time from dual
+            </foreach>
+        ) s
+        on (t.notice_id = s.notice_id and t.user_id = s.user_id)
+        when not matched then
+            insert (notice_id, user_id, read_time) values (s.notice_id, s.user_id, s.read_time)
     </insert>
 
-    <!-- 删除公告时清理已读记录 -->
+    <!-- 删除公告时清理已读记�?-->
     <delete id="deleteByNoticeIds">
         delete from sys_notice_read where notice_id in
         <foreach collection="noticeIds" item="noticeId" open="(" separator="," close=")">

+ 6 - 6
gw-system/src/main/resources/mapper/system/SysOperLogMapper.xml

@@ -31,17 +31,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
 	<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_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}, sysdate())
+        values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, CURRENT_TIMESTAMP)
 	</insert>
 	
 	<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
 		<include refid="selectOperLogVo"/>
 		<where>
 			<if test="operIp != null and operIp != ''">
-				AND oper_ip like concat('%', #{operIp}, '%')
+				AND oper_ip like '%' || #{} || '%'
 			</if>
 			<if test="title != null and title != ''">
-				AND title like concat('%', #{title}, '%')
+				AND title like '%' || #{} || '%'
 			</if>
 			<if test="businessType != null">
 				AND business_type = #{businessType}
@@ -56,12 +56,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 				AND status = #{status}
 			</if>
 			<if test="operName != null and operName != ''">
-				AND oper_name like concat('%', #{operName}, '%')
+				AND oper_name like '%' || #{} || '%'
 			</if>
-			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检�-->
 				AND oper_time &gt;= #{params.beginTime}
 			</if>
-			<if test="params.endTime != null and params.endTime != ''"><!-- 结�时间检索 -->
+			<if test="params.endTime != null and params.endTime != ''"><!-- 结�时间检�-->
 				AND oper_time &lt;= #{params.endTime}
 			</if>
 		</where>

+ 6 - 6
gw-system/src/main/resources/mapper/system/SysPostMapper.xml

@@ -26,13 +26,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	    <include refid="selectPostVo"/>
 		<where>
 			<if test="postCode != null and postCode != ''">
-				AND post_code like concat('%', #{postCode}, '%')
+				AND post_code like '%' || #{} || '%'
 			</if>
 			<if test="status != null and status != ''">
 				AND status = #{status}
 			</if>
 			<if test="postName != null and postName != ''">
-				AND post_name like concat('%', #{postName}, '%')
+				AND post_name like '%' || #{} || '%'
 			</if>
 		</where>
 	</select>
@@ -64,12 +64,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
 	<select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult">
 		<include refid="selectPostVo"/>
-		 where post_name=#{postName} limit 1
+		 where post_name=#{postName} fetch first 1 rows only
 	</select>
 	
 	<select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult">
 		<include refid="selectPostVo"/>
-		 where post_code=#{postCode} limit 1
+		 where post_code=#{postCode} fetch first 1 rows only
 	</select>
 	
 	<update id="updatePost" parameterType="SysPost">
@@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<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 = CURRENT_TIMESTAMP
  		</set>
  		where post_id = #{postId}
 	</update>
@@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<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()
+ 			CURRENT_TIMESTAMP
  		)
 	</insert>
 	

+ 6 - 6
gw-system/src/main/resources/mapper/system/SysRoleApperForMapper.xml

@@ -32,19 +32,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	    <include refid="selectSysRoleApperForVo"/>
 		<where>
 			<if test="userName != null and userName != ''">
-				AND USER_NAME like concat('%', #{userName}, '%')
+				AND USER_NAME like '%' || #{} || '%'
 			</if>
 			<if test="loginName != null and loginName != ''">
-				AND LOGIN_NAME like concat('%', #{loginName}, '%')
+				AND LOGIN_NAME like '%' || #{} || '%'
 			</if>
 			<if test="pass != null and pass != ''">
 				AND PASS = #{pass}
 			</if>
 			<if test="company != null and company != ''">
-				AND COMPANY like concat('%', #{company}, '%')
+				AND COMPANY like '%' || #{} || '%'
 			</if>
 			<if test="phone != null and phone != ''">
-				AND PHONE like concat('%', #{phone}, '%')
+				AND PHONE like '%' || #{} || '%'
 			</if>
 			<if test="isDelete != null and isDelete != ''">
 				AND IS_DELETE = #{isDelete}
@@ -89,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="apperDate != null and apperDate != ''">#{apperDate},</if>
 			<if test="isDelete != null and isDelete != ''">#{isDelete},</if>
 			<if test="createBy != null and createBy != ''">#{createBy},</if>
-			sysdate()
+			CURRENT_TIMESTAMP
 		)
 	</insert>
 
@@ -107,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="apperDate != null and apperDate != ''">APPER_DATE = #{apperDate},</if>
 			<if test="isDelete != null and isDelete != ''">IS_DELETE = #{isDelete},</if>
 			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
-			update_time = sysdate()
+			update_time = CURRENT_TIMESTAMP
 		</set>
 		where APPER_ID = #{apperId}
 	</update>

+ 10 - 10
gw-system/src/main/resources/mapper/system/SysRoleMapper.xml

@@ -37,19 +37,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			AND r.role_id = #{roleId}
 		</if>
 		<if test="roleName != null and roleName != ''">
-			AND r.role_name like concat('%', #{roleName}, '%')
+			AND r.role_name like '%' || #{} || '%'
 		</if>
 		<if test="status != null and status != ''">
 			AND r.status = #{status}
 		</if>
 		<if test="roleKey != null and roleKey != ''">
-			AND r.role_key like concat('%', #{roleKey}, '%')
+			AND r.role_key like '%' || #{} || '%'
 		</if>
-		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-			and date_format(r.create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
+		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检�-->
+			and to_char(r.create_time, 'YYYYMMDD') &gt;= replace(#{params.beginTime}, '-', '')
 		</if>
-		<if test="params.endTime != null and params.endTime != ''"><!-- 结�时间检索 -->
-			and date_format(r.create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
+		<if test="params.endTime != null and params.endTime != ''"><!-- 结�时间检�-->
+			and to_char(r.create_time, 'YYYYMMDD') &lt;= replace(#{params.endTime}, '-', '')
 		</if>
 		<!-- 数�范围过滤 -->
 		${params.dataScope}
@@ -85,12 +85,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
 	<select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult">
 		<include refid="selectRoleVo"/>
-		 where r.role_name=#{roleName} and r.del_flag = '0' limit 1
+		 where r.role_name=#{roleName} and r.del_flag = '0' fetch first 1 rows only
 	</select>
 	
 	<select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult">
 		<include refid="selectRoleVo"/>
-		 where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
+		 where r.role_key=#{roleKey} and r.del_flag = '0' fetch first 1 rows only
 	</select>
 	
  	<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
@@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<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()
+ 			CURRENT_TIMESTAMP
  		)
 	</insert>
 	
@@ -133,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<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 = CURRENT_TIMESTAMP
  		</set>
  		where role_id = #{roleId}
 	</update>

+ 5 - 5
gw-system/src/main/resources/mapper/system/SysTemplateMapper.xml

@@ -62,16 +62,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTemplateVo"/>
         <where>
             <if test="tplTitle != null and tplTitle != ''">
-                AND tpl_title like concat('%', #{tplTitle}, '%')
+                AND tpl_title like '%' || #{} || '%'
             </if>
             <if test="tplType != null and tplType != ''">
                 AND tpl_type = #{tplType}
             </if>
             <if test="tplFilepath != null and tplFilepath != ''">
-                AND tpl_filepath like concat('%', #{tplFilepath}, '%')
+                AND tpl_filepath like '%' || #{} || '%'
             </if>
             <if test="tplFilename != null and tplFilename != ''">
-                AND tpl_filename like concat('%', #{tplFilename}, '%')
+                AND tpl_filename like '%' || #{} || '%'
             </if>
         </where>
         order by tpl_time desc
@@ -99,7 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="tplTime != null">#{tplTime},</if>
             <if test="tplContent != null and tplContent != ''">#{tplContent},</if>
             <if test="createBy != null and createBy != ''">#{createBy},</if>
-            sysdate()
+            CURRENT_TIMESTAMP
         )
     </insert>
     
@@ -114,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="tplTime != null">tpl_time = #{tplTime},</if>
             <if test="tplContent != null">tpl_content = #{tplContent},</if>
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
-            update_time = sysdate()
+            update_time = CURRENT_TIMESTAMP
         </set>
         where tpl_code = #{tplCode}
     </update>

+ 19 - 19
gw-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -65,22 +65,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			AND u.user_id = #{userId}
 		</if>
 		<if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
+			AND u.user_name like '%' || #{} || '%'
 		</if>
 		<if test="status != null and status != ''">
 			AND u.status = #{status}
 		</if>
 		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
+			AND u.phonenumber like '%' || #{} || '%'
 		</if>
-		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-			AND date_format(u.create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
+		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检�-->
+			AND to_char(u.create_time, 'YYYYMMDD') &gt;= replace(#{params.beginTime}, '-', '')
 		</if>
-		<if test="params.endTime != null and params.endTime != ''"><!-- 结�时间检索 -->
-			AND date_format(u.create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
+		<if test="params.endTime != null and params.endTime != ''"><!-- 结�时间检�-->
+			AND to_char(u.create_time, 'YYYYMMDD') &lt;= replace(#{params.endTime}, '-', '')
 		</if>
 		<if test="deptId != null and deptId != 0">
-			AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
+			AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE instr(',' || ancestors || ',', ',' || #{deptId} || ',') > 0 ))
 		</if>
 		<!-- 数�范围过滤 -->
 		${params.dataScope}
@@ -94,10 +94,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			 left join sys_role r on r.role_id = ur.role_id
 	    where u.del_flag = '0' and r.role_id = #{roleId}
 	    <if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
+			AND u.user_name like '%' || #{} || '%'
 		</if>
 		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
+			AND u.phonenumber like '%' || #{} || '%'
 		</if>
 		<!-- 数�范围过滤 -->
 		${params.dataScope}
@@ -112,10 +112,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	    where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
 	    and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
 	    <if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
+			AND u.user_name like '%' || #{} || '%'
 		</if>
 		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
+			AND u.phonenumber like '%' || #{} || '%'
 		</if>
 		<!-- 数�范围过滤 -->
 		${params.dataScope}
@@ -132,15 +132,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</select>
 	
 	<select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult">
-		select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1
+		select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' fetch first 1 rows only
 	</select>
 	
 	<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
-		select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1
+		select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' fetch first 1 rows only
 	</select>
 	
 	<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
-		select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
+		select user_id, email from sys_user where email = #{email} and del_flag = '0' fetch first 1 rows only
 	</select>
 	
 	<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
@@ -173,7 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="pwdUpdateDate != null">#{pwdUpdateDate},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
- 			sysdate()
+ 			CURRENT_TIMESTAMP
  		)
 	</insert>
 	
@@ -192,17 +192,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<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 = CURRENT_TIMESTAMP
  		</set>
  		where user_id = #{userId}
 	</update>
 	
 	<update id="updateUserStatus" parameterType="SysUser">
- 		update sys_user set status = #{status}, update_time = sysdate() where user_id = #{userId}
+ 		update sys_user set status = #{status}, update_time = CURRENT_TIMESTAMP where user_id = #{userId}
 	</update>
 	
 	<update id="updateUserAvatar" parameterType="SysUser">
- 		update sys_user set avatar = #{avatar}, update_time = sysdate() where user_id = #{userId}
+ 		update sys_user set avatar = #{avatar}, update_time = CURRENT_TIMESTAMP where user_id = #{userId}
 	</update>
 	
   	<update id="updateLoginInfo" parameterType="SysUser">
@@ -210,7 +210,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</update>
 	
 	<update id="resetUserPwd" parameterType="SysUser">
- 		update sys_user set pwd_update_date = sysdate(), password = #{password}, update_time = sysdate() where user_id = #{userId}
+ 		update sys_user set pwd_update_date = CURRENT_TIMESTAMP, password = #{password}, update_time = CURRENT_TIMESTAMP where user_id = #{userId}
 	</update>
 	
 	<delete id="deleteUserById" parameterType="Long">