select id,
hotel_homestay_id,
mobile,
id_card,
id_card_type,
name,
sex,
birthday,
source,
total_amount_spent,
total_order_count,
last_order_time,
is_blacklisted,
remark,
create_time,
create_by,
create_zdy_user_id,
update_time,
update_by,
is_deleted
from zdy_hotel_homestay_customer
insert into zdy_hotel_homestay_customer
hotel_homestay_id,
mobile,
id_card,
id_card_type,
name,
sex,
birthday,
source,
total_amount_spent,
total_order_count,
last_order_time,
is_blacklisted,
remark,
create_time,
create_by,
create_zdy_user_id,
update_time,
update_by,
is_deleted,
#{hotelHomestayId},
#{mobile},
#{idCard},
#{idCardType},
#{name},
#{sex},
#{birthday},
#{source},
#{totalAmountSpent},
#{totalOrderCount},
#{lastOrderTime},
#{blacklisted},
#{remark},
#{createTime},
#{createBy},
#{createZdyUserId},
#{updateTime},
#{updateBy},
#{deleted},
update zdy_hotel_homestay_customer
hotel_homestay_id =
#{hotelHomestayId},
mobile =
#{mobile},
id_card =
#{idCard},
id_card_type =
#{idCardType},
name =
#{name},
sex =
#{sex},
birthday =
#{birthday},
source =
#{source},
total_amount_spent =
#{totalAmountSpent},
total_order_count =
#{totalOrderCount},
last_order_time =
#{lastOrderTime},
is_blacklisted =
#{blacklisted},
remark =
#{remark},
create_time =
#{createTime},
create_by =
#{createBy},
create_zdy_user_id =
#{createZdyUserId},
update_time =
#{updateTime},
update_by =
#{updateBy},
is_deleted =
#{deleted},
where id = #{id}
update zdy_hotel_homestay_customer
set is_deleted = 1
where id = #{id}
update zdy_hotel_homestay_customer set is_deleted = 1 where id in
#{id}
update zdy_hotel_homestay_customer
name =
#{name},
sex =
#{sex},
birthday =
#{birthday},
source =
#{source},
total_amount_spent =
#{totalAmountSpent},
total_order_count =
#{totalOrderCount},
last_order_time =
#{lastOrderTime},
is_blacklisted =
#{blacklisted},
remark =
#{remark},
create_time =
#{createTime},
create_by =
#{createBy},
create_zdy_user_id =
#{createZdyUserId},
update_time =
#{updateTime},
update_by =
#{updateBy},
is_deleted =
#{deleted},
where
mobile = #{mobile}
and hotel_homestay_id = #{hotelHomestayId}
and is_deleted = 0
update zdy_hotel_homestay_customer
set
total_order_count = total_order_count + 1,
last_order_time = #{zdyHotelHomestayCustomer.lastOrderTime}
where id in
#{id}