select id
, goods_name
, goods_title
, class_id
, class_idtwo
, class_idthree
, goods_img
, post_fee
, monthly_sales
, stock
, spec
, param
, has_spec
, is_recommend
, is_hot
, status
, share_img
, share_title
, tips
, sort
, create_at
, update_at
, del_flag
, tag
, shop_id
, supplier_id
, goods_video
, commission
, check_status
, is_copy
, show_status
, copy_id
, integral
, is_web
, kilograms
, halal
, pricingreference
from mall_goods_goods
insert into mall_goods_goods
goods_name,
goods_title,
class_id,
class_idtwo,
class_idthree,
goods_img,
post_fee,
monthly_sales,
stock,
spec,
param,
has_spec,
is_recommend,
is_hot,
status,
share_img,
share_title,
sort,
create_at,
update_at,
del_flag,
tips,
tag,
goods_brand,
goods_origin,
goods_content,
goods_warranty,
goods_storage,
shop_id,
supplier_id,
commission,
goods_video,
check_status,
is_copy,
show_status,
copy_id,
integral,
is_web,
kilograms,
halal,
pricingreference,
#{goodsName},
#{goodsTitle},
#{classId},
#{classIdtwo},
#{classIdthree},
#{goodsImg},
#{postFee},
#{monthlySales},
#{stock},
#{spec},
#{param},
#{hasSpec},
#{isRecommend},
#{isHot},
#{status},
#{shareImg},
#{shareTitle},
#{sort},
#{createAt},
#{updateAt},
#{delFlag},
#{tips},
#{tag},
#{goodsBrand},
#{goodsOrigin},
#{goodsContent},
#{goodsWarranty},
#{goodsStorage},
#{shopId},
#{supplierId},
#{commission},
#{goodsVideo},
#{checkStatus},
#{isCopy},
#{showStatus},
#{copyId},
#{integral},
#{isWeb},
#{kilograms},
#{halal},
#{pricingreference},
update mall_goods_goods
goods_name = #{goodsName},
goods_title = #{goodsTitle},
class_id = #{classId},
class_idtwo = #{classIdtwo},
class_idthree = #{classIdthree},
goods_img = #{goodsImg},
post_fee = #{postFee},
monthly_sales = #{monthlySales},
stock = #{stock},
spec = #{spec},
param = #{param},
has_spec = #{hasSpec},
is_recommend = #{isRecommend},
is_hot = #{isHot},
status = #{status},
share_img = #{shareImg},
share_title = #{shareTitle},
sort = #{sort},
create_at = #{createAt},
update_at = #{updateAt},
del_flag = #{delFlag},
tips = #{tips},
tag = #{tag},
goods_brand = #{goodsBrand},
goods_origin = #{goodsOrigin},
goods_content = #{goodsContent},
goods_warranty = #{goodsWarranty},
goods_storage = #{goodsStorage},
shop_id = #{shopId},
supplier_id = #{supplierId},
supplier_id_two = #{supplierIdTwo},
supplier_id_three = #{supplierIdThree},
supplier_ids = #{supplierIds},
commission = #{commission},
goods_video = #{goodsVideo},
check_status = #{checkStatus},
is_copy = #{isCopy},
show_status = #{showStatus},
copy_id = #{copyId},
integral = #{integral},
is_web = #{isWeb},
supplier_ids = #{supplierIds},
kilograms = #{kilograms},
halal = #{halal},
pricingreference = #{pricingreference},
where id = #{id}
update mall_goods_goods
set monthly_sales = monthly_sales + #{count}
where id = #{goodsId}
update mall_goods_goods
set stock = stock - #{count}
where id = #{goodsId}
delete
from mall_goods_goods
where id = #{id}
update mall_goods_goods SET del_flag = '1' where id in
#{id}
update mall_goods_goods
set stock = stock + #{total},
monthly_sales = monthly_sales - #{total}
where id = #{goodsId}
UPDATE mall_goods_goods
SET show_status =
CASE
WHEN #{showStatus} = 1 and id = 199 THEN 0
WHEN #{showStatus} = 1 and id != 199 THEN 1
WHEN #{showStatus} = 0 and id = 199 THEN 1
WHEN #{showStatus} = 0 and id != 199 THEN 0
ELSE 0
END
UPDATE mall_goods_class
SET show_status =
CASE
WHEN #{showStatus} = 1 and (id = 131 or id = 132) THEN 0
WHEN #{showStatus} = 1 and (id != 131 or id != 132) THEN 1
WHEN #{showStatus} = 0 and (id = 131 or id = 132) THEN 1
WHEN #{showStatus} = 0 and (id != 131 or id != 132) THEN 0
ELSE 0
END
update mall_goods_goods
goods_name = #{goodsName},
goods_title = #{goodsTitle},
goods_brand = #{goodsBrand},
goods_origin = #{goodsOrigin},
goods_content = #{goodsContent},
goods_warranty = #{goodsWarranty},
goods_storage = #{goodsStorage},
class_id = #{classId},
class_idtwo = #{classIdtwo},
class_idthree = #{classIdthree},
goods_img = #{goodsImg},
goods_video = #{goodsVideo},
post_fee = #{postFee},
monthly_sales = #{monthlySales},
stock = #{stock},
spec = #{spec},
is_recommend = #{isRecommend},
is_hot = #{isHot},
status = #{status},
tips = #{tips},
tag = #{tag},
commission = #{commission},
show_status = #{showStatus},
integral = #{integral},
is_web = #{isWeb},
kilograms = #{kilograms},
halal = #{halal},
pricingreference = #{pricingreference},
where copy_id = #{copyId}
update mall_goods_goods
stock = #{item.stock},
copy_id = #{item.copyId},
update_at = #{item.updateAt},
where id = #{item.id}
update mall_goods_goods SET del_flag = '1' where copy_id in
#{id}