Das Löschen der Wiki-Seite „河北版上线SQL“ kann nicht rückgängig gemacht werden. Fortfahren?
INSERT INTO `wx_msg_validationcode_model` (`id`,
`tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`, `open`, `msg_type`, `role_type`)
VALUES
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000))
, '${tenant_id}', 28, '会员生日券开启', '富茂服务商', '亲到的{userName},在您的生日到来之际,我们精心的为您准备了一份生日礼物,并在生日当天消费领取{creditScale}倍积分,赶快打开{mallName}微信小程序领取您的专属生日礼物吧!', now(), 0, 5, NULL, NULL, 0, 1, 3);
INSERT INTO `wx_msg_validationcode_model` (`id`,
`tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`, `open`, `msg_type`, `role_type`)
VALUES
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000))
, '${tenant_id}', 29, '会员生日券未开启', '富茂中心', '亲到的{userName},在您的生日到来之际,我们精心的为您准备了一份生日礼物,赶快打开{mallName}微信小程序领取您的专属生日礼物吧!', now(), 0, 5, NULL, NULL, 0, 1, 3);
update wx_c_user_basic_info cub,wx_c_user c set cub.poins=c.score,cub.update_date=now() where c.id=cub.id
update wx_c_user_basic_info cub,wx_c_user c set cub.credit=c.credit,cub.update_date=now() where c.id=cub.id
update wx_coupon c, (select * from (select c2.id, c2.inventory, c2.remain_inventory, c2.create_date, c2.update_date,
(select count(*) from wx_coupon_order co left join wx_order o on co.order_id=o.id
where co.coupon_id=c2.id and o.order_status in (0, 1, 3, 5, 6, 7, 10, 11, 15) and co.coupon_order_status in (0,1,2,4,5,6,8,100)) as sended
from wx_coupon c2 where (c2.valid_type=1 and c2.valid_end_date < now())) coupon
where coupon.inventory!=(coupon.remain_inventory + coupon.sended) and coupon.inventory!=coupon.remain_inventory) c1
set c.update_date =now(),c.remain_inventory=c.inventory- c1.sended
where c.id=c1.id;
Das Löschen der Wiki-Seite „河北版上线SQL“ kann nicht rückgängig gemacht werden. Fortfahren?