|
@@ -48,6 +48,27 @@
|
|
|
<if test="projectItemTargetId != 0">
|
|
|
and projectItemTargetId = #{projectItemTargetId}
|
|
|
</if>
|
|
|
+ <if test="roomTypeId != 0">
|
|
|
+ and roomTypeId = #{roomTypeId}
|
|
|
+ </if>
|
|
|
+ <if test="roomNumber != null">
|
|
|
+ and roomNumber = #{roomNumber}
|
|
|
+ </if>
|
|
|
+ <if test="roomState == 0 or roomState == 1">
|
|
|
+ and roomState = #{roomState}
|
|
|
+ </if>
|
|
|
+ <if test="investmentState == 0 or investmentState == 1">
|
|
|
+ and investmentState = #{investmentState}
|
|
|
+ </if>
|
|
|
+ <if test="invocationDate != null">
|
|
|
+ and invocationDate = #{invocationDate}
|
|
|
+ </if>
|
|
|
+ <if test="decoration != 0">
|
|
|
+ and decoration = #{decoration}
|
|
|
+ </if>
|
|
|
+ <if test="propertyCertificateNumber != null">
|
|
|
+ and propertyCertificateNumber = #{propertyCertificateNumber}
|
|
|
+ </if>
|
|
|
<if test="tagIds != null">and
|
|
|
<foreach item="tagId" collection="tagIds.split(',')" open="(" separator=" and " close=")">
|
|
|
FIND_IN_SET (#{tagId}, tagIds)
|
|
@@ -74,6 +95,95 @@
|
|
|
DELETE FROM project_item_target_room WHERE projectId=#{projectId}
|
|
|
</delete>
|
|
|
|
|
|
+ <select id="getTotalCount" parameterType="com.bosshand.virgo.api.model.ProjectItemTargetRoom" resultType="Integer">
|
|
|
+ SELECT count(*) FROM project_item_target_room
|
|
|
+ <where>
|
|
|
+ <if test="projectId != 0">
|
|
|
+ and projectId = #{projectId}
|
|
|
+ </if>
|
|
|
+ <if test="projectItemId != 0">
|
|
|
+ and projectItemId = #{projectItemId}
|
|
|
+ </if>
|
|
|
+ <if test="projectItemTargetId != 0">
|
|
|
+ and projectItemTargetId = #{projectItemTargetId}
|
|
|
+ </if>
|
|
|
+ <if test="roomTypeId != 0">
|
|
|
+ and roomTypeId = #{roomTypeId}
|
|
|
+ </if>
|
|
|
+ <if test="roomNumber != null">
|
|
|
+ and roomNumber = #{roomNumber}
|
|
|
+ </if>
|
|
|
+ <if test="roomState == 0 or roomState == 1">
|
|
|
+ and roomState = #{roomState}
|
|
|
+ </if>
|
|
|
+ <if test="investmentState == 0 or investmentState == 1">
|
|
|
+ and investmentState = #{investmentState}
|
|
|
+ </if>
|
|
|
+ <if test="invocationDate != null">
|
|
|
+ and invocationDate = #{invocationDate}
|
|
|
+ </if>
|
|
|
+ <if test="decoration != 0">
|
|
|
+ and decoration = #{decoration}
|
|
|
+ </if>
|
|
|
+ <if test="propertyCertificateNumber != null">
|
|
|
+ and propertyCertificateNumber = #{propertyCertificateNumber}
|
|
|
+ </if>
|
|
|
+ <if test="tagIds != null">and
|
|
|
+ <foreach item="tagId" collection="tagIds.split(',')" open="(" separator=" and " close=")">
|
|
|
+ FIND_IN_SET (#{tagId}, tagIds)
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="openState == 0 or openState == 1">
|
|
|
+ and openState = #{openState}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getLimit" resultMap="projectItemTargetRoomResult">
|
|
|
+ SELECT * FROM project_item_target_room
|
|
|
+ <where>
|
|
|
+ <if test="p.projectId != 0">
|
|
|
+ and projectId = #{p.projectId}
|
|
|
+ </if>
|
|
|
+ <if test="p.projectItemId != 0">
|
|
|
+ and projectItemId = #{p.projectItemId}
|
|
|
+ </if>
|
|
|
+ <if test="p.projectItemTargetId != 0">
|
|
|
+ and projectItemTargetId = #{p.projectItemTargetId}
|
|
|
+ </if>
|
|
|
+ <if test="p.roomTypeId != 0">
|
|
|
+ and roomTypeId = #{p.roomTypeId}
|
|
|
+ </if>
|
|
|
+ <if test="p.roomNumber != null">
|
|
|
+ and roomNumber = #{p.roomNumber}
|
|
|
+ </if>
|
|
|
+ <if test="p.roomState == 0 or p.roomState == 1">
|
|
|
+ and roomState = #{p.roomState}
|
|
|
+ </if>
|
|
|
+ <if test="p.investmentState == 0 or p.investmentState == 1">
|
|
|
+ and investmentState = #{p.investmentState}
|
|
|
+ </if>
|
|
|
+ <if test="p.invocationDate != null">
|
|
|
+ and invocationDate = #{p.invocationDate}
|
|
|
+ </if>
|
|
|
+ <if test="p.decoration != 0">
|
|
|
+ and decoration = #{p.decoration}
|
|
|
+ </if>
|
|
|
+ <if test="p.propertyCertificateNumber != null">
|
|
|
+ and propertyCertificateNumber = #{p.propertyCertificateNumber}
|
|
|
+ </if>
|
|
|
+ <if test="p.tagIds != null">and
|
|
|
+ <foreach item="tagId" collection="p.tagIds.split(',')" open="(" separator=" and " close=")">
|
|
|
+ FIND_IN_SET (#{tagId}, tagIds)
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="p.openState == 0 or p.openState == 1">
|
|
|
+ and openState = #{p.openState}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ limit #{currIndex} , #{pageSize}
|
|
|
+ </select>
|
|
|
+
|
|
|
<update id="update" parameterType="com.bosshand.virgo.api.model.ProjectItemTargetRoom">
|
|
|
UPDATE project_item_target_room
|
|
|
<trim prefix="set" suffixOverrides=",">
|