a.id AS "id",
a.birth_code AS "birthCode",
a.nickname AS "nickname",
a.state AS "state",
a.dog_breed AS "dogBreed",
a.member_code AS "memberCode",
a.price AS "price",
a.main_label AS "mainLabel",
a.label AS "label",
a.recommend_info AS "recommendInfo",
a.cover_img_id AS "coverImgId",
a.other_img_id AS "otherImgId",
a.city AS "city",
a.birthdate AS "birthdate",
a.gender AS "gender",
a.add_time AS "addTime",
a.view_count AS "viewCount",
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 breeder_pup(
id,
birth_code,
nickname,
state,
dog_breed,
member_code,
main_label,
label,
recommend_info,
cover_img_id,
other_img_id,
city,
birthdate,
gender,
add_time,
create_by,
create_date,
update_by,
update_date,
remarks,
del_flag
) VALUES (
#{id},
#{birthCode},
#{nickname},
#{state},
#{dogBreed},
#{memberCode},
#{mainLabel},
#{label},
#{recommendInfo},
#{coverImgId},
#{otherImgId},
#{city},
#{birthdate},
#{gender},
#{addTime},
#{createBy.id},
#{createDate},
#{updateBy.id},
#{updateDate},
#{remarks},
#{delFlag}
)
UPDATE breeder_pup SET
nickname = #{nickname},
state = #{state},
main_label = #{mainLabel},
label = #{label},
recommend_info = #{recommendInfo},
cover_img_id = #{coverImgId},
other_img_id = #{otherImgId},
city = #{city},
add_time = #{addTime},
update_by = #{updateBy.id},
update_date = #{updateDate},
remarks = #{remarks}
WHERE id = #{id}
UPDATE breeder_pup SET
del_flag = #{DEL_FLAG_DELETE}
WHERE id = #{id}
UPDATE breeder_pup SET
view_count = view_count+1
WHERE id = #{id}