若依开源1.1.1发布
This commit is contained in:
23
src/main/resources/mybatis/system/UserPostMapper.xml
Normal file
23
src/main/resources/mybatis/system/UserPostMapper.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<?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.project.system.user.dao.IUserPostDao">
|
||||
|
||||
<resultMap type="UserPost" id="UserPostResult">
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="postId" column="post_id" />
|
||||
</resultMap>
|
||||
|
||||
<delete id="deleteUserPostByUserId">
|
||||
delete from sys_user_post where user_id=#{userId}
|
||||
</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>
|
Reference in New Issue
Block a user