a.id AS "id",
a.hotel_phone AS "hotelPhone",
a.hotel_longitude AS "hotelLongitude",
a.hotel_latitude AS "hotelLatitude",
a.hotel_address AS "hotelAddress",
a.hotel_name AS "hotelName",
a.hotel_info AS "hotelInfo",
a.hotel_line AS "hotelLine",
a.create_time AS "createTime",
a.create_by AS "createBy.id",
a.create_date AS "createDate",
a.update_by AS "updateBy.id",
a.update_date AS "updateDate",
a.remarks AS "remarks",
a.del_flag AS "delFlag",
b.image_min_url AS "imageMinUrl",
b.image_max_url AS "imageMaxUrl"
left join cku_image b on a.id = b.hotel_id
INSERT INTO cku_hotel(
id,
hotel_phone,
hotel_longitude,
hotel_latitude,
hotel_address,
hotel_name,
hotel_info,
hotel_line,
create_time,
create_by,
create_date,
update_by,
update_date,
remarks,
del_flag
) VALUES (
#{id},
#{hotelPhone},
#{hotelLongitude},
#{hotelLatitude},
#{hotelAddress},
#{hotelName},
#{hotelInfo},
#{hotelLine},
#{createTime},
#{createBy.id},
#{createDate},
#{updateBy.id},
#{updateDate},
#{remarks},
#{delFlag}
)
UPDATE cku_hotel SET
hotel_phone = #{hotelPhone},
hotel_longitude = #{hotelLongitude},
hotel_latitude = #{hotelLatitude},
hotel_address = #{hotelAddress},
hotel_name = #{hotelName},
hotel_info = #{hotelInfo},
hotel_line = #{hotelLine},
create_time = #{createTime},
update_by = #{updateBy.id},
update_date = #{updateDate},
remarks = #{remarks}
WHERE id = #{id}
UPDATE cku_hotel SET
del_flag = #{DEL_FLAG_DELETE}
WHERE id = #{id}