a.id AS "id",
a.type AS "type",
a.title AS "title",
a.image AS "image",
a.thumb AS "thumb",
a.content AS "content",
a.show_flag AS "showFlag",
a.sort AS "sort",
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"
a.id AS "id",
a.type AS "type",
a.title AS "title",
a.image AS "image",
a.thumb AS "thumb",
LEFT(a.content,100) AS "content",
a.show_flag AS "showFlag",
a.sort AS "sort",
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"
INSERT INTO gc_web_contest(
id,
type,
title,
image,
thumb,
content,
show_flag,
sort,
create_by,
create_date,
update_by,
update_date,
remarks,
del_flag
) VALUES (
#{id},
#{type},
#{title},
#{image},
#{thumb},
#{content},
#{showFlag},
#{sort},
#{createBy.id},
#{createDate},
#{updateBy.id},
#{updateDate},
#{remarks},
#{delFlag}
)
UPDATE gc_web_contest SET
type = #{type},
title = #{title},
image = #{image},
thumb = #{thumb},
content = #{content},
show_flag = #{showFlag},
sort = #{sort},
update_by = #{updateBy.id},
update_date = #{updateDate},
remarks = #{remarks}
WHERE id = #{id}
UPDATE gc_web_contest SET
del_flag = #{DEL_FLAG_DELETE}
WHERE id = #{id}