a.id AS "id",
a.floorTitle AS "floorTitle",
a.floorDetail AS "floorDetail",
a.type AS "type",
a.sort AS "sort",
a.wwwEnabledStatus AS "wwwEnabledStatus",
a.crmEnabledStatus AS "crmEnabledStatus",
a.createBy AS "createBy.id",
a.createDate AS "createDate",
a.updateBy AS "updateBy.id",
a.updateDate AS "updateDate",
a.delFlag AS "delFlag"
INSERT INTO new_page_floor(
floorTitle,
floorDetail,
type,
sort,
wwwEnabledStatus,
crmEnabledStatus,
createBy,
createDate,
updateBy,
updateDate,
delFlag
) VALUES (
#{floorTitle},
#{floorDetail},
#{type},
#{sort},
#{wwwEnabledStatus},
#{crmEnabledStatus},
#{createBy.id},
#{createDate},
#{updateBy.id},
#{updateDate},
#{delFlag}
)
UPDATE new_page_floor SET
floorTitle = #{floorTitle},
floorDetail = #{floorDetail},
type = #{type},
sort = #{sort},
wwwEnabledStatus = #{wwwEnabledStatus},
crmEnabledStatus = #{crmEnabledStatus},
createBy = #{createBy.id},
createDate = #{createDate},
updateBy = #{updateBy.id},
updateDate = #{updateDate},
delFlag = #{delFlag}
WHERE id = #{id}
UPDATE new_page_floor SET delFlag = 1
WHERE id = #{id}
UPDATE new_page_floor a SET a.wwwEnabledStatus = #{param1}
WHERE a.id IN
#{id}
UPDATE new_page_floor a SET a.crmEnabledStatus = #{param1}
WHERE a.id IN
#{id}
UPDATE new_page_floor SET
sort = #{sort}
WHERE id = #{id}
INSERT INTO `new_page_floor_content` (
`floorId`, `templateType`, `pcAdsImage1`,
`pcAdsImage2`, `pcAdsImage3`, `pcAdsImage4`, `pcAdsImage5`, `appletsAdsImage1`,
`appletsAdsImage2`, `appletsAdsImage3`,`appletsAdsImage4`, `appletsAdsImage5`,adsLink1,
adsLink2, adsLink3,adsLink4, adsLink5, centreId
)
VALUES
(
#{floorId}, #{templateType}, #{pcAdsImage1},
#{pcAdsImage2}, #{pcAdsImage3},#{pcAdsImage4}, #{pcAdsImage5}, #{appletsAdsImage1},
#{appletsAdsImage2}, #{appletsAdsImage3}, #{appletsAdsImage4}, #{appletsAdsImage5}, #{adsLink1},
#{adsLink2}, #{adsLink3}, #{adsLink4}, #{adsLink5}, #{centreId}
)
UPDATE
`new_page_floor_content`
SET
`floorId` = #{floorId},
`centreId` = #{centreId},
`templateType` = #{templateType},
`pcAdsImage1` = #{pcAdsImage1},
`pcAdsImage2` = #{pcAdsImage2},
`pcAdsImage3` = #{pcAdsImage3},
`pcAdsImage4` = #{pcAdsImage4},
`pcAdsImage5` = #{pcAdsImage5},
`appletsAdsImage1` = #{appletsAdsImage1},
`appletsAdsImage2` = #{appletsAdsImage2},
`appletsAdsImage3` = #{appletsAdsImage3},
`appletsAdsImage4` = #{appletsAdsImage4},
`appletsAdsImage5` = #{appletsAdsImage5},
`adsLink1` = #{adsLink1},
`adsLink2` = #{adsLink2},
`adsLink3` = #{adsLink3},
`adsLink4` = #{adsLink4},
`adsLink5` = #{adsLink5}
WHERE `id` = #{id}
DELETE FROM
new_page_floor_image
WHERE
floorId = #{floorId}
centreId = #{floorId}
INSERT INTO `new_page_floor_image` (
`floorId`, `productId`, `name`, `link`,
`image`,`appletsImage`, `adsImage`, `label`, `content`, `pcStatus`, `appletsStatus`,
`sort`, `createDate`, centreId
)
VALUES
(
#{floorId}, #{productId}, #{name}, #{link},
#{image},#{appletsImage}, #{adsImage}, #{label}, #{content}, #{pcStatus}, #{appletsStatus},
#{sort}, #{createDate}, #{centreId}
)