2024-02-22 17:18:25 +08:00
|
|
|
<?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.ics.admin.mapper.meeting.RoomContentMapper">
|
|
|
|
|
|
|
|
<resultMap type="com.ics.admin.domain.meeting.RoomContent" id="RoomContentResult">
|
|
|
|
<result property="id" column="id" />
|
|
|
|
<result property="type" column="type" />
|
|
|
|
<result property="meetingName" column="meeting_name" />
|
|
|
|
<result property="capacityNum" column="capacity_num" />
|
|
|
|
<result property="expandNum" column="expand_num" />
|
|
|
|
<result property="indoorPicUrl" column="indoor_pic_url" />
|
|
|
|
<result property="startTime" column="start_time" />
|
|
|
|
<result property="endDate" column="end_date" />
|
|
|
|
<result property="priceUnit" column="price_unit" />
|
|
|
|
<result property="money" column="money" />
|
|
|
|
<result property="isShow" column="is_show" />
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
<result property="version" column="version" />
|
|
|
|
<result property="deleteFlag" column="delete_flag" />
|
|
|
|
<result property="roomId" column="room_id" />
|
|
|
|
<result property="shape" column="shape" />
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectRoomContentVo">
|
|
|
|
SELECT id, type, meeting_name, capacity_num, expand_num, indoor_pic_url, start_time, end_date, price_unit, money, is_show, create_by, create_time, update_by, update_time, version, delete_flag, room_id, shape FROM tb_room_content
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectRoomContentList" parameterType="RoomContent" resultMap="RoomContentResult">
|
|
|
|
<include refid="selectRoomContentVo"/>
|
|
|
|
<where>
|
|
|
|
<if test="meetingName != null and meetingName != ''"> AND meeting_name LIKE CONCAT('%', #{meetingName}, '%')</if>
|
2024-03-02 17:03:07 +08:00
|
|
|
<if test="typeValue != null and typeValue != ''"> AND `type`= #{typeValue}</if>
|
|
|
|
<if test="capacityNum != null and capacityNum != ''"> AND capacity_num =#{capacityNum}</if>
|
|
|
|
<if test="shape != null and shape != ''"> AND shape =#{shape}</if>
|
2024-02-22 17:18:25 +08:00
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectRoomContentById" parameterType="Long" resultMap="RoomContentResult">
|
|
|
|
<include refid="selectRoomContentVo"/>
|
|
|
|
WHERE id = #{id}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<insert id="insertRoomContent" parameterType="RoomContent">
|
|
|
|
INSERT INTO tb_room_content
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="id != null ">id,</if>
|
|
|
|
<if test="type != null ">type,</if>
|
|
|
|
<if test="meetingName != null and meetingName != ''">meeting_name,</if>
|
|
|
|
<if test="capacityNum != null ">capacity_num,</if>
|
|
|
|
<if test="expandNum != null ">expand_num,</if>
|
|
|
|
<if test="indoorPicUrl != null and indoorPicUrl != ''">indoor_pic_url,</if>
|
|
|
|
<if test="startTime != null ">start_time,</if>
|
|
|
|
<if test="endDate != null ">end_date,</if>
|
|
|
|
<if test="priceUnit != null and priceUnit != ''">price_unit,</if>
|
|
|
|
<if test="money != null and money != ''">money,</if>
|
|
|
|
<if test="isShow != null ">is_show,</if>
|
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
|
<if test="createTime != null ">create_time,</if>
|
|
|
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
|
|
|
<if test="updateTime != null ">update_time,</if>
|
|
|
|
<if test="version != null ">version,</if>
|
|
|
|
<if test="deleteFlag != null ">delete_flag,</if>
|
|
|
|
<if test="roomId != null ">room_id,</if>
|
|
|
|
<if test="shape != null and shape != ''">shape,</if>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="id != null ">#{id},</if>
|
|
|
|
<if test="type != null ">#{type},</if>
|
|
|
|
<if test="meetingName != null and meetingName != ''">#{meetingName},</if>
|
|
|
|
<if test="capacityNum != null ">#{capacityNum},</if>
|
|
|
|
<if test="expandNum != null ">#{expandNum},</if>
|
|
|
|
<if test="indoorPicUrl != null and indoorPicUrl != ''">#{indoorPicUrl},</if>
|
|
|
|
<if test="startTime != null ">#{startTime},</if>
|
|
|
|
<if test="endDate != null ">#{endDate},</if>
|
|
|
|
<if test="priceUnit != null and priceUnit != ''">#{priceUnit},</if>
|
|
|
|
<if test="money != null and money != ''">#{money},</if>
|
|
|
|
<if test="isShow != null ">#{isShow},</if>
|
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
|
<if test="createTime != null ">#{createTime},</if>
|
|
|
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
|
|
|
<if test="updateTime != null ">#{updateTime},</if>
|
|
|
|
<if test="version != null ">#{version},</if>
|
|
|
|
<if test="deleteFlag != null ">#{deleteFlag},</if>
|
|
|
|
<if test="roomId != null ">#{roomId},</if>
|
|
|
|
<if test="shape != null and shape != ''">#{shape},</if>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
<update id="updateRoomContent" parameterType="RoomContent">
|
|
|
|
UPDATE tb_room_content
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<if test="type != null ">type = #{type},</if>
|
|
|
|
<if test="meetingName != null and meetingName != ''">meeting_name = #{meetingName},</if>
|
|
|
|
<if test="capacityNum != null ">capacity_num = #{capacityNum},</if>
|
|
|
|
<if test="expandNum != null ">expand_num = #{expandNum},</if>
|
|
|
|
<if test="indoorPicUrl != null and indoorPicUrl != ''">indoor_pic_url = #{indoorPicUrl},</if>
|
|
|
|
<if test="startTime != null ">start_time = #{startTime},</if>
|
|
|
|
<if test="endDate != null ">end_date = #{endDate},</if>
|
|
|
|
<if test="priceUnit != null and priceUnit != ''">price_unit = #{priceUnit},</if>
|
|
|
|
<if test="money != null and money != ''">money = #{money},</if>
|
|
|
|
<if test="isShow != null ">is_show = #{isShow},</if>
|
|
|
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
|
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
|
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
|
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
|
|
|
<if test="version != null ">version = #{version},</if>
|
|
|
|
<if test="deleteFlag != null ">delete_flag = #{deleteFlag},</if>
|
|
|
|
<if test="roomId != null ">room_id = #{roomId},</if>
|
|
|
|
<if test="shape != null and shape != ''">shape = #{shape},</if>
|
|
|
|
</trim>
|
|
|
|
WHERE id = #{id}
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<delete id="deleteRoomContentById" parameterType="Long">
|
|
|
|
DELETE FROM tb_room_content WHERE id = #{id}
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
<delete id="deleteRoomContentByIds" parameterType="String">
|
|
|
|
DELETE FROM tb_room_content where id in
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
#{id}
|
|
|
|
</foreach>
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
</mapper>
|