123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- <?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.home.HomeHotManualRecommMapper" >
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.home.HomeHotManualRecomm" >
- <id column="recomm_id" property="recommId" jdbcType="INTEGER" />
- <result column="uid" property="uid" jdbcType="BIGINT" />
- <result column="seq_no" property="seqNo" jdbcType="INTEGER" />
- <result column="status" property="status" jdbcType="TINYINT" />
- <result column="start_valid_time" property="startValidTime" jdbcType="VARCHAR" />
- <result column="end_valid_time" property="endValidTime" jdbcType="VARCHAR" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- <result column="view_type" property="viewType" jdbcType="TINYINT" />
- <result column="custom_tag" property="customTag" jdbcType="VARCHAR" />
- <result column="type" property="type" jdbcType="TINYINT" />
- </resultMap>
- <sql id="Base_Column_List" >
- recomm_id, uid, seq_no, status, start_valid_time, end_valid_time, create_time, view_type,custom_tag,type
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from home_hot_manual_recomm
- where recomm_id = #{recommId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from home_hot_manual_recomm
- where recomm_id = #{recommId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.home.HomeHotManualRecomm" >
- insert into home_hot_manual_recomm (recomm_id, uid, seq_no,
- status, start_valid_time, end_valid_time,
- create_time, view_type,custom_tag,type)
- values (#{recommId,jdbcType=INTEGER}, #{uid,jdbcType=BIGINT}, #{seqNo,jdbcType=INTEGER},
- #{status,jdbcType=TINYINT}, #{startValidTime,jdbcType=VARCHAR}, #{endValidTime,jdbcType=VARCHAR},
- #{createTime,jdbcType=TIMESTAMP}, #{viewType,jdbcType=TINYINT},#{customTag,jdbcType=VARCHAR},#{type,jdbcType=TINYINT})
- </insert>
- <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.home.HomeHotManualRecomm" >
- insert into home_hot_manual_recomm
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="recommId != null" >
- recomm_id,
- </if>
- <if test="uid != null" >
- uid,
- </if>
- <if test="seqNo != null" >
- seq_no,
- </if>
- <if test="status != null" >
- status,
- </if>
- <if test="startValidTime != null and startValidTime != ''" >
- start_valid_time,
- </if>
- <if test="endValidTime != null and endValidTime != ''" >
- end_valid_time,
- </if>
- <if test="createTime != null" >
- create_time,
- </if>
- <if test="viewType != null" >
- view_type,
- </if>
- <if test="customTag != null and customTag != ''" >
- custom_tag,
- </if>
- <if test="type != null" >
- type,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="recommId != null" >
- #{recommId,jdbcType=INTEGER},
- </if>
- <if test="uid != null" >
- #{uid,jdbcType=BIGINT},
- </if>
- <if test="seqNo != null" >
- #{seqNo,jdbcType=INTEGER},
- </if>
- <if test="status != null" >
- #{status,jdbcType=TINYINT},
- </if>
- <if test="startValidTime != null" >
- #{startValidTime,jdbcType=VARCHAR},
- </if>
- <if test="endValidTime != null" >
- #{endValidTime,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null" >
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="viewType != null" >
- #{viewType,jdbcType=TINYINT},
- </if>
- <if test="customTag != null" >
- #{customTag,jdbcType=VARCHAR},
- </if>
- <if test="type != null" >
- #{type,jdbcType=TINYINT},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.home.HomeHotManualRecomm" >
- update home_hot_manual_recomm
- <set >
- <if test="uid != null" >
- uid = #{uid,jdbcType=BIGINT},
- </if>
- <if test="seqNo != null" >
- seq_no = #{seqNo,jdbcType=INTEGER},
- </if>
- <if test="status != null" >
- status = #{status,jdbcType=TINYINT},
- </if>
- <if test="startValidTime != null and startValidTime != ''" >
- start_valid_time = #{startValidTime,jdbcType=VARCHAR},
- </if>
- <if test="endValidTime != null and endValidTime != ''" >
- end_valid_time = #{endValidTime,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null" >
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="viewType != null" >
- view_type = #{viewType,jdbcType=TINYINT},
- </if>
- <if test="customTag != null and customTag != ''" >
- custom_tag = #{customTag,jdbcType=VARCHAR},
- </if>
- <if test="type != null" >
- type = #{type,jdbcType=TINYINT},
- </if>
- </set>
- where recomm_id = #{recommId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.home.HomeHotManualRecomm" >
- update home_hot_manual_recomm
- set uid = #{uid,jdbcType=BIGINT},
- seq_no = #{seqNo,jdbcType=INTEGER},
- status = #{status,jdbcType=TINYINT},
- start_valid_time = #{startValidTime,jdbcType=VARCHAR},
- end_valid_time = #{endValidTime,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- view_type = #{viewType,jdbcType=TINYINT},
- custom_tag = #{customTag,jdbcType=VARCHAR},
- type = #{type,jdbcType=TINYINT}
- where recomm_id = #{recommId,jdbcType=INTEGER}
- </update>
- <select id="selectHomeHotManualRecommByList" resultType="com.juxiao.xchat.module.xbd.vo.HomeHotManualRecommVO">
- select h.recomm_id as recommId,h.uid,h.seq_no as seqNo,h.type,h.status,h.start_valid_time as startValidTime,h.end_valid_time as endValidTime,
- h.view_type as viewType, r.title, r.is_permit_room as isPermitRoom, u.erban_no as erBanNo,h.create_time as createTime
- from home_hot_manual_recomm h
- INNER JOIN room r on h.uid = r.uid
- INNER JOIN users u on r.uid = u.uid
- <where>
- 1 = 1
- <if test="erBanNo != null">
- AND u.erban_no = #{erBanNo}
- </if>
- <if test="viewType != null">
- AND view_type = #{viewType}
- </if>
- </where>
- order by h.start_valid_time desc
- </select>
- </mapper>
|