123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482 |
- <?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.room.RoomMapper">
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.room.Room">
- <id column="uid" jdbcType="BIGINT" property="uid" />
- <result column="room_id" jdbcType="BIGINT" property="roomId" />
- <result column="room_pwd" jdbcType="VARCHAR" property="roomPwd" />
- <result column="tag_id" jdbcType="INTEGER" property="tagId" />
- <result column="tag_pict" jdbcType="VARCHAR" property="tagPict" />
- <result column="room_tag" jdbcType="VARCHAR" property="roomTag" />
- <result column="badge" jdbcType="VARCHAR" property="badge" />
- <result column="meeting_name" jdbcType="VARCHAR" property="meetingName" />
- <result column="title" jdbcType="VARCHAR" property="title" />
- <result column="valid" jdbcType="BIT" property="valid" />
- <result column="type" jdbcType="TINYINT" property="type" />
- <result column="official_room" jdbcType="TINYINT" property="officialRoom" />
- <result column="ab_channel_type" jdbcType="TINYINT" property="abChannelType" />
- <result column="reward_id" jdbcType="BIGINT" property="rewardId" />
- <result column="reward_money" jdbcType="BIGINT" property="rewardMoney" />
- <result column="serv_dura" jdbcType="INTEGER" property="servDura" />
- <result column="operator_status" jdbcType="TINYINT" property="operatorStatus" />
- <result column="avatar" jdbcType="VARCHAR" property="avatar" />
- <result column="room_desc" jdbcType="VARCHAR" property="roomDesc" />
- <result column="room_notice" jdbcType="VARCHAR" property="roomNotice" />
- <result column="back_pic" jdbcType="VARCHAR" property="backPic" />
- <result column="open_time" jdbcType="TIMESTAMP" property="openTime" />
- <result column="is_permit_room" jdbcType="TINYINT" property="isPermitRoom" />
- <result column="online_num" jdbcType="INTEGER" property="onlineNum" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="is_exception_close" jdbcType="BIT" property="isExceptionClose" />
- <result column="exception_close_time" jdbcType="TIMESTAMP" property="exceptionCloseTime" />
- <result column="recom_seq" jdbcType="BIGINT" property="recomSeq" />
- <result column="can_show" jdbcType="TINYINT" property="canShow" />
- <result column="def_backpic" jdbcType="VARCHAR" property="defBackpic" />
- <result column="audio_level" jdbcType="INTEGER" property="audioLevel" />
- <result column="charm_open" property="charmOpen" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List">
- uid, room_id, room_pwd, tag_id, tag_pict, room_tag, badge, meeting_name, title, valid,
- type, official_room, ab_channel_type, reward_id, reward_money, serv_dura, operator_status,
- avatar, room_desc, room_notice, back_pic, open_time, is_permit_room, online_num,
- create_time, update_time, is_exception_close, exception_close_time, recom_seq, can_show,
- def_backpic, audio_level, charm_open,face_type
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from room
- where uid = #{uid,jdbcType=BIGINT}
- </select>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.room.Room">
- insert into room (uid, room_id, room_pwd,
- tag_id, tag_pict, room_tag,
- badge, meeting_name, title,
- valid, type, official_room,
- ab_channel_type, reward_id, reward_money,
- serv_dura, operator_status, avatar,
- room_desc, room_notice, back_pic,
- open_time, is_permit_room, online_num,
- create_time, update_time, is_exception_close,
- exception_close_time, recom_seq, can_show,
- def_backpic, audio_level, charm_open)
- values (#{uid,jdbcType=BIGINT}, #{roomId,jdbcType=BIGINT}, #{roomPwd,jdbcType=VARCHAR},
- #{tagId,jdbcType=INTEGER}, #{tagPict,jdbcType=VARCHAR}, #{roomTag,jdbcType=VARCHAR},
- #{badge,jdbcType=VARCHAR}, #{meetingName,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
- #{valid,jdbcType=BIT}, #{type,jdbcType=TINYINT}, #{officialRoom,jdbcType=TINYINT},
- #{abChannelType,jdbcType=TINYINT}, #{rewardId,jdbcType=BIGINT}, #{rewardMoney,jdbcType=BIGINT},
- #{servDura,jdbcType=INTEGER}, #{operatorStatus,jdbcType=TINYINT}, #{avatar,jdbcType=VARCHAR},
- #{roomDesc,jdbcType=VARCHAR}, #{roomNotice,jdbcType=VARCHAR}, #{backPic,jdbcType=VARCHAR},
- #{openTime,jdbcType=TIMESTAMP}, #{isPermitRoom,jdbcType=TINYINT}, #{onlineNum,jdbcType=INTEGER},
- #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isExceptionClose,jdbcType=BIT},
- #{exceptionCloseTime,jdbcType=TIMESTAMP}, #{recomSeq,jdbcType=BIGINT}, #{canShow,jdbcType=TINYINT},
- #{defBackpic,jdbcType=VARCHAR}, #{audioLevel,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.room.Room">
- insert into room
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="uid != null">
- uid,
- </if>
- <if test="roomId != null">
- room_id,
- </if>
- <if test="roomPwd != null">
- room_pwd,
- </if>
- <if test="tagId != null">
- tag_id,
- </if>
- <if test="tagPict != null">
- tag_pict,
- </if>
- <if test="roomTag != null">
- room_tag,
- </if>
- <if test="badge != null">
- badge,
- </if>
- <if test="meetingName != null">
- meeting_name,
- </if>
- <if test="title != null">
- title,
- </if>
- <if test="valid != null">
- valid,
- </if>
- <if test="type != null">
- type,
- </if>
- <if test="officialRoom != null">
- official_room,
- </if>
- <if test="abChannelType != null">
- ab_channel_type,
- </if>
- <if test="rewardId != null">
- reward_id,
- </if>
- <if test="rewardMoney != null">
- reward_money,
- </if>
- <if test="servDura != null">
- serv_dura,
- </if>
- <if test="operatorStatus != null">
- operator_status,
- </if>
- <if test="avatar != null">
- avatar,
- </if>
- <if test="roomDesc != null">
- room_desc,
- </if>
- <if test="roomNotice != null">
- room_notice,
- </if>
- <if test="backPic != null">
- back_pic,
- </if>
- <if test="openTime != null">
- open_time,
- </if>
- <if test="isPermitRoom != null">
- is_permit_room,
- </if>
- <if test="onlineNum != null">
- online_num,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="updateTime != null">
- update_time,
- </if>
- <if test="isExceptionClose != null">
- is_exception_close,
- </if>
- <if test="exceptionCloseTime != null">
- exception_close_time,
- </if>
- <if test="recomSeq != null">
- recom_seq,
- </if>
- <if test="canShow != null">
- can_show,
- </if>
- <if test="defBackpic != null">
- def_backpic,
- </if>
- <if test="audioLevel != null">
- audio_level,
- </if>
- <if test="charmOpen != null">
- charm_open,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="uid != null">
- #{uid,jdbcType=BIGINT},
- </if>
- <if test="roomId != null">
- #{roomId,jdbcType=BIGINT},
- </if>
- <if test="roomPwd != null">
- #{roomPwd,jdbcType=VARCHAR},
- </if>
- <if test="tagId != null">
- #{tagId,jdbcType=INTEGER},
- </if>
- <if test="tagPict != null">
- #{tagPict,jdbcType=VARCHAR},
- </if>
- <if test="roomTag != null">
- #{roomTag,jdbcType=VARCHAR},
- </if>
- <if test="badge != null">
- #{badge,jdbcType=VARCHAR},
- </if>
- <if test="meetingName != null">
- #{meetingName,jdbcType=VARCHAR},
- </if>
- <if test="title != null">
- #{title,jdbcType=VARCHAR},
- </if>
- <if test="valid != null">
- #{valid,jdbcType=BIT},
- </if>
- <if test="type != null">
- #{type,jdbcType=TINYINT},
- </if>
- <if test="officialRoom != null">
- #{officialRoom,jdbcType=TINYINT},
- </if>
- <if test="abChannelType != null">
- #{abChannelType,jdbcType=TINYINT},
- </if>
- <if test="rewardId != null">
- #{rewardId,jdbcType=BIGINT},
- </if>
- <if test="rewardMoney != null">
- #{rewardMoney,jdbcType=BIGINT},
- </if>
- <if test="servDura != null">
- #{servDura,jdbcType=INTEGER},
- </if>
- <if test="operatorStatus != null">
- #{operatorStatus,jdbcType=TINYINT},
- </if>
- <if test="avatar != null">
- #{avatar,jdbcType=VARCHAR},
- </if>
- <if test="roomDesc != null">
- #{roomDesc,jdbcType=VARCHAR},
- </if>
- <if test="roomNotice != null">
- #{roomNotice,jdbcType=VARCHAR},
- </if>
- <if test="backPic != null">
- #{backPic,jdbcType=VARCHAR},
- </if>
- <if test="openTime != null">
- #{openTime,jdbcType=TIMESTAMP},
- </if>
- <if test="isPermitRoom != null">
- #{isPermitRoom,jdbcType=TINYINT},
- </if>
- <if test="onlineNum != null">
- #{onlineNum,jdbcType=INTEGER},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="isExceptionClose != null">
- #{isExceptionClose,jdbcType=BIT},
- </if>
- <if test="exceptionCloseTime != null">
- #{exceptionCloseTime,jdbcType=TIMESTAMP},
- </if>
- <if test="recomSeq != null">
- #{recomSeq,jdbcType=BIGINT},
- </if>
- <if test="canShow != null">
- #{canShow,jdbcType=TINYINT},
- </if>
- <if test="defBackpic != null">
- #{defBackpic,jdbcType=VARCHAR},
- </if>
- <if test="audioLevel != null">
- #{audioLevel,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.room.Room">
- update room
- <set>
- <if test="roomId != null">
- room_id = #{roomId,jdbcType=BIGINT},
- </if>
- <if test="roomPwd != null">
- room_pwd = #{roomPwd,jdbcType=VARCHAR},
- </if>
- <if test="tagId != null">
- tag_id = #{tagId,jdbcType=INTEGER},
- </if>
- <if test="tagPict != null">
- tag_pict = #{tagPict,jdbcType=VARCHAR},
- </if>
- <if test="roomTag != null">
- room_tag = #{roomTag,jdbcType=VARCHAR},
- </if>
- <if test="badge != null">
- badge = #{badge,jdbcType=VARCHAR},
- </if>
- <if test="meetingName != null">
- meeting_name = #{meetingName,jdbcType=VARCHAR},
- </if>
- <if test="title != null">
- title = #{title,jdbcType=VARCHAR},
- </if>
- <if test="valid != null">
- valid = #{valid,jdbcType=BIT},
- </if>
- <if test="type != null">
- type = #{type,jdbcType=TINYINT},
- </if>
- <if test="officialRoom != null">
- official_room = #{officialRoom,jdbcType=TINYINT},
- </if>
- <if test="abChannelType != null">
- ab_channel_type = #{abChannelType,jdbcType=TINYINT},
- </if>
- <if test="rewardId != null">
- reward_id = #{rewardId,jdbcType=BIGINT},
- </if>
- <if test="rewardMoney != null">
- reward_money = #{rewardMoney,jdbcType=BIGINT},
- </if>
- <if test="servDura != null">
- serv_dura = #{servDura,jdbcType=INTEGER},
- </if>
- <if test="operatorStatus != null">
- operator_status = #{operatorStatus,jdbcType=TINYINT},
- </if>
- <if test="avatar != null">
- avatar = #{avatar,jdbcType=VARCHAR},
- </if>
- <if test="roomDesc != null">
- room_desc = #{roomDesc,jdbcType=VARCHAR},
- </if>
- <if test="roomNotice != null">
- room_notice = #{roomNotice,jdbcType=VARCHAR},
- </if>
- <if test="backPic != null">
- back_pic = #{backPic,jdbcType=VARCHAR},
- </if>
- <if test="openTime != null">
- open_time = #{openTime,jdbcType=TIMESTAMP},
- </if>
- <if test="isPermitRoom != null">
- is_permit_room = #{isPermitRoom,jdbcType=TINYINT},
- </if>
- <if test="onlineNum != null">
- online_num = #{onlineNum,jdbcType=INTEGER},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="isExceptionClose != null">
- is_exception_close = #{isExceptionClose,jdbcType=BIT},
- </if>
- <if test="exceptionCloseTime != null">
- exception_close_time = #{exceptionCloseTime,jdbcType=TIMESTAMP},
- </if>
- <if test="recomSeq != null">
- recom_seq = #{recomSeq,jdbcType=BIGINT},
- </if>
- <if test="canShow != null">
- can_show = #{canShow,jdbcType=TINYINT},
- </if>
- <if test="defBackpic != null">
- def_backpic = #{defBackpic,jdbcType=VARCHAR},
- </if>
- <if test="audioLevel != null">
- audio_level = #{audioLevel,jdbcType=INTEGER},
- </if>
- <if test="charmOpen != null" >
- charm_open = #{charmOpen,jdbcType=INTEGER},
- </if>
- <if test="faceType != null" >
- face_type = #{faceType,jdbcType=INTEGER},
- </if>
- </set>
- where uid = #{uid,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.room.Room">
- update room
- set room_id = #{roomId,jdbcType=BIGINT},
- room_pwd = #{roomPwd,jdbcType=VARCHAR},
- tag_id = #{tagId,jdbcType=INTEGER},
- tag_pict = #{tagPict,jdbcType=VARCHAR},
- room_tag = #{roomTag,jdbcType=VARCHAR},
- badge = #{badge,jdbcType=VARCHAR},
- meeting_name = #{meetingName,jdbcType=VARCHAR},
- title = #{title,jdbcType=VARCHAR},
- valid = #{valid,jdbcType=BIT},
- type = #{type,jdbcType=TINYINT},
- official_room = #{officialRoom,jdbcType=TINYINT},
- ab_channel_type = #{abChannelType,jdbcType=TINYINT},
- reward_id = #{rewardId,jdbcType=BIGINT},
- reward_money = #{rewardMoney,jdbcType=BIGINT},
- serv_dura = #{servDura,jdbcType=INTEGER},
- operator_status = #{operatorStatus,jdbcType=TINYINT},
- avatar = #{avatar,jdbcType=VARCHAR},
- room_desc = #{roomDesc,jdbcType=VARCHAR},
- room_notice = #{roomNotice,jdbcType=VARCHAR},
- back_pic = #{backPic,jdbcType=VARCHAR},
- open_time = #{openTime,jdbcType=TIMESTAMP},
- is_permit_room = #{isPermitRoom,jdbcType=TINYINT},
- online_num = #{onlineNum,jdbcType=INTEGER},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- is_exception_close = #{isExceptionClose,jdbcType=BIT},
- exception_close_time = #{exceptionCloseTime,jdbcType=TIMESTAMP},
- recom_seq = #{recomSeq,jdbcType=BIGINT},
- can_show = #{canShow,jdbcType=TINYINT},
- def_backpic = #{defBackpic,jdbcType=VARCHAR},
- audio_level = #{audioLevel,jdbcType=INTEGER},
- charm_open = #{charmOpen,jdbcType=INTEGER}
- where uid = #{uid,jdbcType=BIGINT}
- </update>
- <select id="selectUserRoom" resultType="com.juxiao.xchat.module.xbd.dto.RoomDTO">
- <![CDATA[
- SELECT
- uid,
- room_id,
- room_pwd,
- tag_id,
- tag_pict,
- room_tag,
- badge,
- meeting_name,
- title,
- valid,
- `type`,
- official_room,
- ab_channel_type,
- reward_id,
- reward_money,
- serv_dura,
- operator_status,
- avatar,
- room_desc,
- room_notice,
- back_pic,
- open_time,
- is_permit_room,
- online_num,
- create_time,
- update_time,
- is_exception_close,
- exception_close_time,
- recom_seq,
- can_show,
- def_backpic,
- `gift_effect_switch`,
- `public_chat_switch`,
- ri.play_info AS playInfo,
- audio_level AS audioLevel,
- face_type,
- gift_card_switch
- FROM
- room r
- LEFT JOIN room_info ri ON ri.room_uid = r.uid
- ]]>
- <where> r.uid = #{uid}</where>
- </select>
- <select id="selectByRoomId" resultType="com.juxiao.xchat.module.xbd.dto.UsersRoomDTO">
- select r.uid,r.room_id as roomId,u.erban_no as erBanNo,u.nick,r.title
- from room r
- left join users u on u.uid = r.uid
- where r.room_id = #{roomId}
- </select>
- </mapper>
|