insert into cm_mall_active (organizeId, topic, enabledStatus, activeType, addTime)
VALUES (#{organizeId}, #{topic}, #{enabledStatus}, #{activeType}, now())
insert into cm_mall_active_image(activeId, image,topic)
VALUES (#{activeId}, #{image},#{topic})
insert into cm_mall_active_product(activeId, productId, sort)
VALUES (#{id}, #{productId}, #{sort})
insert into cm_mall_active_product(activeId, imageId, productId, sort)
values (#{activeId}, #{imageId},#{productId}, #{sort})
update cm_mall_active
topic = #{topic},
enabledStatus = #{enabledStatus}
where id = #{id}
UPDATE cm_mall_active
SET enabledStatus=
(CASE
WHEN enabledStatus = 1
THEN 0
ELSE 1 END)
WHERE id = #{id}
delete
from cm_mall_active_product
where activeId = #{id}
delete
from cm_mall_active_image
where activeId = #{id}
delete
from cm_mall_active
where id = #{id}
delete
from cm_mall_active_image
where activeId = #{id}
delete
from cm_mall_active_product
where activeId = #{id}