From 59ae9759fd50568059fa44f43832f5a414edb3e9 Mon Sep 17 00:00:00 2001
From: kongzy <kongzy>
Date: Mon, 27 Nov 2023 15:08:23 +0800
Subject: [PATCH] 增加权限控制
---
assess-system/src/main/resources/mapper/system/SysAttachMapper.xml | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/assess-system/src/main/resources/mapper/system/SysAttachMapper.xml b/assess-system/src/main/resources/mapper/system/SysAttachMapper.xml
index c9a9cca..91733c0 100644
--- a/assess-system/src/main/resources/mapper/system/SysAttachMapper.xml
+++ b/assess-system/src/main/resources/mapper/system/SysAttachMapper.xml
@@ -1,5 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gkhy.assess.system.mapper.SysAttachMapper">
+ <delete id="deleteAttachsByUserId">
+ delete from sys_attach
+ <where>
+ and user_id=#{user_id}
+ <if test="type!=null and type!=''">
+ and type=#{type}
+ </if>
+ <if test="type==null">
+ and type in (1,2,3)
+ </if>
+ </where>
+ </delete>
+ <select id="getAttachsByUserId" resultType="com.gkhy.assess.system.domain.SysAttach">
+ select * from sys_attach
+ <where>
+ and user_id=#{userId}
+ <if test="type!=null and type!=''">
+ and type=#{type}
+ </if>
+ </where>
+ </select>
</mapper>
--
Gitblit v1.9.2