From 0994009a6d6184839359505d99fdf7be68ee1b19 Mon Sep 17 00:00:00 2001
From: hdy <1105738590@qq.com>
Date: 星期五, 14 三月 2025 12:51:12 +0800
Subject: [PATCH] 工单界面新增按钮

---
 billion-system/src/main/resources/mapper/system/SysRoleMapper.xml |   30 ++++++++++++++++++++++--------
 1 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/billion-system/src/main/resources/mapper/system/SysRoleMapper.xml b/billion-system/src/main/resources/mapper/system/SysRoleMapper.xml
index 0249733..c9c0e19 100644
--- a/billion-system/src/main/resources/mapper/system/SysRoleMapper.xml
+++ b/billion-system/src/main/resources/mapper/system/SysRoleMapper.xml
@@ -46,10 +46,10 @@
 			AND r.role_key like concat('%', #{roleKey}, '%')
 		</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')
+			and date_format(r.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
 		</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')
+			and date_format(r.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
 		</if>
 		<!-- 鏁版嵁鑼冨洿杩囨护 -->
 		${params.dataScope}
@@ -84,13 +84,27 @@
 	</select>
 	
 	<select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult">
-		<include refid="selectRoleVo"/>
-		 where r.role_name=#{roleName} and r.del_flag = '0' limit 1
+<!--		<include refid="selectRoleVo"/>-->
+<!--		 where r.role_name=#{roleName} and r.del_flag = '0' limit 1-->
+		select distinct top(1) r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
+		r.status, r.del_flag, r.create_time, r.remark
+		from sys_role r
+		left join sys_user_role ur on ur.role_id = r.role_id
+		left join sys_user u on u.user_id = ur.user_id
+		left join sys_dept d on u.dept_id = d.dept_id
+		where r.role_name=#{roleName} and r.del_flag = '0'
 	</select>
 	
 	<select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult">
-		<include refid="selectRoleVo"/>
-		 where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
+<!--		<include refid="selectRoleVo"/>-->
+<!--		 where r.role_key=#{roleKey} and r.del_flag = '0' limit 1-->
+		select distinct top(1) r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
+		r.status, r.del_flag, r.create_time, r.remark
+		from sys_role r
+		left join sys_user_role ur on ur.role_id = r.role_id
+		left join sys_user u on u.user_id = ur.user_id
+		left join sys_dept d on u.dept_id = d.dept_id
+		where r.role_key=#{roleKey} and r.del_flag = '0'
 	</select>
 	
  	<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
@@ -117,7 +131,7 @@
  			<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()
+ 			getdate()
  		)
 	</insert>
 	
@@ -133,7 +147,7 @@
  			<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 = getdate()
  		</set>
  		where role_id = #{roleId}
 	</update>

--
Gitblit v1.9.3