랜드 소유권 변경 처리
This commit is contained in:
@@ -25,6 +25,21 @@
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateDt" column="update_dt"/>
|
||||
</resultMap>
|
||||
<resultMap id="LandOwnerChangeResultMap" type="com.caliverse.admin.domain.entity.LandOwnerChange">
|
||||
<id property="id" column="id"/>
|
||||
<result property="landId" column="land_id"/>
|
||||
<result property="landName" column="land_name"/>
|
||||
<result property="buildingId" column="building_id"/>
|
||||
<result property="buildingName" column="building_name"/>
|
||||
<result property="userGuid" column="user_guid"/>
|
||||
<result property="isReserve" column="is_reserve"/>
|
||||
<result property="reservationDt" column="reservation_dt"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createDt" column="create_dt"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateDt" column="update_dt"/>
|
||||
</resultMap>
|
||||
<resultMap id="MessageResultMap" type="com.caliverse.admin.domain.entity.Message">
|
||||
<result property="title" column="title"/>
|
||||
<result property="language" column="language"/>
|
||||
@@ -123,9 +138,9 @@
|
||||
, (SELECT @row_number:=0) AS t
|
||||
) Z
|
||||
ORDER BY
|
||||
CASE WHEN Z.status = 'FAIL' OR Z.status = 'CANCEL' THEN 1 ELSE 0 END,
|
||||
CASE WHEN Z.status = 'FAIL' OR Z.status = 'CANCEL' THEN 1 ELSE 0 END
|
||||
<if test="orderby != null and orderby != ''">
|
||||
row_num ${orderby}
|
||||
,row_num ${orderby}
|
||||
</if>
|
||||
<if test="pageSize != null and pageSize != ''">
|
||||
LIMIT ${pageSize} OFFSET ${offset}
|
||||
@@ -219,6 +234,22 @@
|
||||
WHERE a.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getLandOwnerChangeDetail" parameterType="java.lang.Long" resultMap="LandOwnerChangeResultMap" >
|
||||
SELECT
|
||||
a.id
|
||||
, a.land_id
|
||||
, a.land_name
|
||||
, a.user_guid
|
||||
, a.reservation_dt
|
||||
, a.status
|
||||
, (SELECT email FROM admin WHERE id = a.create_by ) AS create_by
|
||||
, a.create_dt
|
||||
, (SELECT email FROM admin WHERE id = a.update_by ) AS update_by
|
||||
, a.update_dt
|
||||
FROM land_ownership_changes a
|
||||
WHERE a.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getMessage" parameterType="java.lang.Long" resultMap="MessageResultMap" >
|
||||
SELECT
|
||||
*
|
||||
@@ -233,6 +264,11 @@
|
||||
VALUES (#{landId}, #{landName}, #{landSize}, #{landSocket}, #{auctionSeq}, #{resvStartDt}, #{resvEndDt}, #{auctionStartDt}, #{auctionEndDt}, #{currencyType}, #{startPrice}, #{createBy}, #{updateBy})
|
||||
</insert>
|
||||
|
||||
<insert id="postLandOwnerChange" parameterType="com.caliverse.admin.domain.request.LandRequest" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO land_ownership_changes (land_id, land_name, building_id, building_name, user_guid, is_reserve, reservation_dt, create_by, update_by)
|
||||
VALUES (#{landId}, #{landName}, #{buildingId}, #{buildingName}, #{userGuid}, #{isReserve}, #{reservationDt}, #{createBy}, #{updateBy})
|
||||
</insert>
|
||||
|
||||
<insert id="insertMessage" parameterType="map">
|
||||
INSERT INTO message (target_id, type, content, language)
|
||||
VALUES (#{id}, 'LANDAUCTION', #{content}, #{language})
|
||||
@@ -251,6 +287,15 @@
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateLandOwnerChange" parameterType="com.caliverse.admin.domain.request.LandRequest">
|
||||
UPDATE land_ownership_changes
|
||||
SET user_guid = #{userGuid}
|
||||
, reservation_dt = #{reservationDt}
|
||||
, update_by = #{updateBy}
|
||||
, update_dt = NOW()
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteMessage" parameterType="map">
|
||||
DELETE FROM message
|
||||
WHERE target_id = #{id}
|
||||
@@ -282,6 +327,12 @@
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateStatusLandOwnedChange" parameterType="map">
|
||||
UPDATE land_ownership_changes
|
||||
SET status = #{status}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getScheduleLandAuctionList" resultMap="LandAuctionResultMap">
|
||||
SELECT id
|
||||
, land_id
|
||||
@@ -298,4 +349,20 @@
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="getScheduleLandOwnedChangeList" resultMap="LandOwnerChangeResultMap">
|
||||
SELECT id
|
||||
, land_id
|
||||
, land_name
|
||||
, building_id
|
||||
, building_name
|
||||
, status
|
||||
, user_guid
|
||||
, is_reserve
|
||||
, reservation_dt
|
||||
FROM land_ownership_changes
|
||||
WHERE (status = 'WAIT')
|
||||
AND deleted = 0
|
||||
AND is_reserve = 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user