mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-30 15:16:41 +08:00
27 lines
806 B
XML
27 lines
806 B
XML
<?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>
|
|
|
|
<insert id="batchUserPost">
|
|
insert all
|
|
<foreach item="item" index="index" collection="list" >
|
|
into
|
|
sys_user_post(user_id, post_id)
|
|
values
|
|
(
|
|
#{item.userId},
|
|
#{item.postId}
|
|
)
|
|
</foreach>
|
|
SELECT 1 FROM DUAL
|
|
</insert>
|
|
|
|
</mapper>
|