12345678910111213141516171819202122232425262728293031323334 |
- <?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.juxiao.xchat.module.xbd.mapper.operation.ChannelUsersMapper" >
- <delete id="deleteByChannelId" parameterType="java.lang.Long" >
- delete from channel_users
- where channel_id = #{channelId}
- </delete>
- <insert id="InsertChannelUsers">
- INSERT INTO channel_users
- (channel_id, uid)
- VALUES
- <foreach item='value' index='index' collection='list' separator=','>
- (#{channelId}, #{value})
- </foreach>
- </insert>
- <select id="listUsersIdByChannelId" resultType="java.lang.Long">
- select uid from channel_users where channel_id = #{channelId}
- </select>
- <select id="listByChannelId" resultType="com.juxiao.xchat.module.xbd.domain.users.Users">
- select u.uid,u.erban_no as erbanNo,u.nick,u.avatar
- from channel_users cu left join users u on cu.uid = u.uid
- where channel_id = #{channelId}
- </select>
- <delete id="deleteByChannelIdAndUid" >
- delete from channel_users WHERE channel_id = #{channelId} AND uid = #{uid}
- </delete>
- </mapper>
|