a.id AS "id",
a.member_code AS "memberCode",
a.kennel_code AS "kennelCode",
a.name AS "name",
a.name_en AS "nameEn",
a.fci_name AS "fciName",
a.fci_name_backup AS "fciNameBackup",
a.breed AS "breed",
a.breed_name AS "breedName",
a.phone AS "phone",
a.website AS "website",
a.address AS "address",
a.postcode AS "postcode",
a.type AS "type",
a.end_time AS "endTime",
a.create_by_name AS "createByName.id",
a.review_state AS "reviewState",
a.review_remark AS "reviewRemark",
a.review_date AS "reviewDate",
a.fci_review_state AS "fciReviewState",
a.fci_review_remark AS "fciReviewRemark",
a.fci_review_date AS "fciReviewDate",
a.print_state AS "printState",
a.fci_print_state AS "fciPrintState",
a.fci_kennel_code AS "fciKennelCode",
a.fci_kennel_address AS "fciKennelAddress",
a.create_date AS "createDate",
a.create_by AS "createBy.id",
a.update_by AS "updateBy.id",
a.update_date AS "updateDate",
a.remarks AS "remarks",
a.operator AS "operator",
a.del_flag AS "delFlag",
a.calculation_state as "calculationState",
a.calculation_date as "calculationDate",
a.calculation_flag as "calculationFlag",
a.review_state_back as "reviewStateBack",
a.province as "province",
a.city as "city",
a.area as "area",
a.bank_card as "bankCard",
a.introduction as "introduction",
a.main_image as "mainImage",
a.business_telephone as "businessTelephone",
a.business_days as "businessDays",
a.opening_time as "openingTime",
a.closing_time as "closingTime",
a.main_dog_breed_first as "mainDogBreedFirst",
a.main_dog_breed_second as "mainDogBreedSecond",
a.main_dog_breed_third as "mainDogBreedThird",
a.main_dog_breed_fourth as "mainDogBreedFourth",
a.main_dog_breed_fifth as "mainDogBreedFifth",
a.main_dog_breed_sixth as "mainDogBreedSixth",
b.name AS "member.name",
b.name_en AS "member.nameEn",
b.member_end_date AS "member.memberEndDate",
b.member_type AS "member.memberType",
b.member_site AS "member.memberSite",
b.mobile AS "member.mobile",
b.province AS "member.province",
b.city AS "member.city",
b.street AS "member.street"
LEFT JOIN sys_member b ON b.member_code=a.member_code
INSERT INTO kennel(
id,
member_code,
kennel_code,
name,
name_en,
fci_name,
fci_name_backup,
breed,
breed_name,
phone,
website,
address,
postcode,
type,
create_by_name,
operator,
review_state,
review_remark,
fci_review_state,
fci_review_remark,
print_state,
fci_print_state,
fci_kennel_code,
fci_kennel_address,
province,
city,
area,
bank_card,
introduction,
main_image,
business_telephone,
business_days,
opening_time,
closing_time,
main_dog_breed_first,
main_dog_breed_second,
main_dog_breed_third,
main_dog_breed_fourth,
main_dog_breed_fifth,
main_dog_breed_sixth,
create_date,
create_by,
update_by,
update_date,
remarks,
end_time,
del_flag,
calculation_state,
review_state_back,
calculation_flag
) VALUES (
#{id},
#{memberCode},
#{memberCode},
#{name},
#{nameEn},
#{fciName},
#{fciNameBackup},
#{breed},
#{breedName},
#{phone},
#{website},
#{address},
#{postcode},
#{type},
#{createByName},
#{operator},
#{reviewState},
#{reviewRemark},
#{fciReviewState},
#{fciReviewRemark},
#{printState},
#{fciPrintState},
#{fciKennelCode},
#{fciKennelAddress},
#{province},
#{city},
#{area},
#{bankCard},
#{introduction},
#{mainImage},
#{businessTelephone},
#{businessDays},
#{openingTime},
#{closingTime},
#{mainDogBreedFirst},
#{mainDogBreedSecond},
#{mainDogBreedThird},
#{mainDogBreedFourth},
#{mainDogBreedFifth},
#{mainDogBreedSixth},
#{createDate},
#{createBy.id},
#{updateBy.id},
#{updateDate},
#{remarks},
#{endTime},
#{delFlag},
#{calculationState},
#{reviewStateBack},
#{calculationFlag}
)
UPDATE kennel SET
name = #{name},
name_en = #{nameEn},
fci_name = #{fciName},
fci_name_backup = #{fciNameBackup},
fci_kennel_address = #{fciKennelAddress},
province = #{province},
city = #{city},
area = #{area},
address = #{address},
bank_card = #{bankCard},
introduction = #{introduction},
main_image = #{mainImage},
business_telephone = #{businessTelephone},
business_days = #{businessDays},
opening_time = #{openingTime},
closing_time = #{closingTime},
main_dog_breed_first = #{mainDogBreedFirst},
main_dog_breed_second = #{mainDogBreedSecond},
main_dog_breed_third = #{mainDogBreedThird},
main_dog_breed_fourth = #{mainDogBreedFourth},
main_dog_breed_fifth = #{mainDogBreedFifth},
main_dog_breed_sixth = #{mainDogBreedSixth},
fci_kennel_code=#{fciKennelCode},
review_state=#{reviewState},
review_remark=#{reviewRemark},
fci_review_state=#{fciReviewState},
fci_review_remark=#{fciReviewRemark},
fci_review_date=#{fciReviewDate},
review_date=#{reviewDate},
calculation_date=#{calculationDate},
calculation_state=#{calculationState},
calculation_flag=#{calculationFlag},
review_state_back = #{reviewStateBack},
member_code = #{memberCode},
kennel_code = #{kennelCode},
end_time = #{endTime},
type = #{type},
fci_review_date=#{fciReviewDate},
print_state=#{printState},
update_by = #{updateBy.id},
update_date = #{updateDate},
fci_print_state=#{fciPrintState},
remarks = #{remarks}
WHERE id = #{id}
UPDATE kennel SET
remarks = concat(IFNULL(remarks,''),#{remarks}),
del_flag = #{DEL_FLAG_DELETE}
WHERE id = #{id}
UPDATE kennel SET
type = #{type},
update_by = #{updateBy.id},
update_date = #{updateDate},
end_time = #{endTime}
WHERE id = #{id}
UPDATE kennel SET
update_by = #{updateBy.id},
update_date = #{updateDate},
end_time = #{endTime}
WHERE id = #{id}
DELETE FROM kennel
WHERE member_code = #{memberCode}
AND end_time IS NULL
AND LENGTH(id) = 32
DELETE FROM kennel
WHERE id = #{id}
AND end_time IS NULL
AND LENGTH(id) = 32
UPDATE kennel SET
remarks = '犬舍注册订单删除',
del_flag = '1'
WHERE id = #{id}
AND end_time IS NULL
AND LENGTH(id) = 32
UPDATE kennel SET
member_code=#{memberCode},
kennel_code=#{kennelCode},
name = #{name},
name_en = #{nameEn},
fci_name = #{fciName},
fci_name_backup = #{fciNameBackup},
fci_kennel_address = #{fciKennelAddress},
province = #{province},
city = #{city},
area = #{area},
address = #{address},
bank_card = #{bankCard},
introduction = #{introduction},
main_image = #{mainImage},
business_telephone = #{businessTelephone},
business_days = #{businessDays},
opening_time = #{openingTime},
closing_time = #{closingTime},
main_dog_breed_first = #{mainDogBreedFirst},
main_dog_breed_second = #{mainDogBreedSecond},
main_dog_breed_third = #{mainDogBreedThird},
main_dog_breed_fourth = #{mainDogBreedFourth},
main_dog_breed_fifth = #{mainDogBreedFifth},
main_dog_breed_sixth = #{mainDogBreedSixth},
fci_kennel_code=#{fciKennelCode},
review_state=#{reviewState},
review_remark=#{reviewRemark},
fci_review_state=#{fciReviewState},
fci_review_remark=#{fciReviewRemark},
fci_review_date=#{fciReviewDate},
review_date=#{reviewDate},
calculation_date=#{calculationDate},
calculation_state=#{calculationState},
calculation_flag=#{calculationFlag},
review_state_back = #{reviewStateBack},
fci_review_date=#{fciReviewDate},
print_state=#{printState},
update_by = #{updateBy.id},
update_date = #{updateDate},
fci_print_state=#{fciPrintState},
remarks = #{remarks}
,end_time = #{endTime}
,type = #{type}
WHERE id = #{id}
update kennel set end_time = #{kennelEndDate} where member_code = #{memberCode}
update kennel set end_time = #{kennelEndDate} where id = #{id}