insert into smart_life.mcs_game(name, coupons, surplus_coupons, type, award_type, allocation, coins, address,
lat, lon, expire_at, cover, other_images, introduction, status, publish_at, is_del, merchant_id, created_at,
created_by, updated_at, updated_by)
values
(#{entity.name}, #{entity.coupons}, #{entity.surplusCoupons}, #{entity.type}, #{entity.awardType},
#{entity.allocation}, #{entity.coins}, #{entity.address}, #{entity.lat}, #{entity.lon}, #{entity.expireAt},
#{entity.cover}, #{entity.otherImages}, #{entity.introduction}, #{entity.status}, #{entity.publishAt},
#{entity.isDel}, #{entity.merchantId}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt},
#{entity.updatedBy})
insert into smart_life.mcs_game(name, coupons, surplus_coupons, type, award_type, allocation, coins, address,
lat, lon, expire_at, cover, other_images, introduction, status, publish_at, is_del, merchant_id, created_at,
created_by, updated_at, updated_by)
values
(#{entity.name}, #{entity.coupons}, #{entity.surplusCoupons}, #{entity.type}, #{entity.awardType},
#{entity.allocation}, #{entity.coins}, #{entity.address}, #{entity.lat}, #{entity.lon}, #{entity.expireAt},
#{entity.cover}, #{entity.otherImages}, #{entity.introduction}, #{entity.status}, #{entity.publishAt},
#{entity.isDel}, #{entity.merchantId}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt},
#{entity.updatedBy})
on duplicate key update
name = values(name) , coupons = values(coupons) , surplus_coupons = values(surplus_coupons) , type =
values(type) , award_type = values(award_type) , allocation = values(allocation) , coins = values(coins) ,
address = values(address) , lat = values(lat) , lon = values(lon) , expire_at = values(expire_at) , cover =
values(cover) , other_images = values(other_images) , introduction = values(introduction) , status =
values(status) , publish_at = values(publish_at) , is_del = values(is_del) , merchant_id = values(merchant_id) ,
created_at = values(created_at) , created_by = values(created_by) , updated_at = values(updated_at) , updated_by
= values(updated_by)
UPDATE mcs_game SET `status` = 3 WHERE merchant_id IN
#{item}