From 1e8ccfec6ebcf7787def13165d9932b0cccefc49 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 20 六月 2025 14:34:45 +0800
Subject: [PATCH] 1.文件上传格式调整 2.表格调整
---
ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml
new file mode 100644
index 0000000..2b90bc4
--- /dev/null
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml
@@ -0,0 +1,34 @@
+<?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.ruoyi.system.mapper.SysUserPostMapper">
+
+ <resultMap type="SysUserPost" id="SysUserPostResult">
+ <result property="userId" column="user_id" />
+ <result property="postId" column="post_id" />
+ </resultMap>
+
+ <delete id="deleteUserPostByUserId" parameterType="Long">
+ delete from sys_user_post where user_id=#{userId}
+ </delete>
+
+ <select id="countUserPostById" resultType="Integer">
+ select count(1) from sys_user_post where post_id=#{postId}
+ </select>
+
+ <delete id="deleteUserPost" parameterType="Long">
+ delete from sys_user_post where user_id in
+ <foreach collection="array" item="userId" open="(" separator="," close=")">
+ #{userId}
+ </foreach>
+ </delete>
+
+ <insert id="batchUserPost">
+ insert into sys_user_post(user_id, post_id) values
+ <foreach item="item" index="index" collection="list" separator=",">
+ (#{item.userId},#{item.postId})
+ </foreach>
+ </insert>
+
+</mapper>
\ No newline at end of file
--
Gitblit v1.9.3