时间问题处理
This commit is contained in:
1 parent
41190a25ae
commit
d910c1afe8
66 files changed
+604
-393
No files matched your search
@@ -6,7 +6,7 @@ SET @rental_user_id = NULL;
|
||||
SET @rental_operator_id = 1;
|
||||
START TRANSACTION;
|
||||
INSERT INTO rent_package(package_code,revision,name,network,resource_type,resource_quantity,redundancy_percent,duration_seconds,sale_amount,supplier_amount,supplier_fee_percent,fee_limit_sun,delegate_lock,status,rules,version,created_at,updated_at)
|
||||
SELECT s.code,1,s.name,'NILE',s.resource,s.quantity,20,3600,s.sale,s.gross,5,1000000,0,'ACTIVE',JSON_OBJECT('refund','MANUAL_REVIEW','delegate_lock',FALSE),0,UTC_TIMESTAMP(3),UTC_TIMESTAMP(3)
|
||||
SELECT s.code,1,s.name,'NILE',s.resource,s.quantity,20,3600,s.sale,s.gross,5,1000000,0,'ACTIVE',JSON_OBJECT('refund','MANUAL_REVIEW','delegate_lock',FALSE),0,CURRENT_TIMESTAMP(3),CURRENT_TIMESTAMP(3)
|
||||
FROM (
|
||||
SELECT 'DEMO_ENERGY_65K' code,'能量基础套餐 65000 / 1小时' name,'ENERGY' resource,65000 quantity,3.000000 sale,2.400000 gross
|
||||
UNION ALL SELECT 'DEMO_ENERGY_130K','能量进阶套餐 130000 / 1小时','ENERGY',130000,5.000000,4.000000
|
||||
@@ -15,7 +15,7 @@ FROM (
|
||||
|
||||
-- 重跑不改价格;每个分类只在尚无当前绑定时插入。
|
||||
INSERT INTO rent_user_package(user_id,package_id,network,resource_type,status,default_slot,created_by,version,created_at,updated_at)
|
||||
SELECT u.user_id,p.id,p.network,p.resource_type,'ACTIVE',1,@rental_operator_id,0,UTC_TIMESTAMP(3),UTC_TIMESTAMP(3)
|
||||
SELECT u.user_id,p.id,p.network,p.resource_type,'ACTIVE',1,@rental_operator_id,0,CURRENT_TIMESTAMP(3),CURRENT_TIMESTAMP(3)
|
||||
FROM sys_user u JOIN rent_package p ON p.package_code IN ('DEMO_ENERGY_65K','DEMO_BANDWIDTH_1500') AND p.revision=1 AND p.status='ACTIVE'
|
||||
WHERE u.user_id=@rental_user_id AND u.status='0' AND u.del_flag='0'
|
||||
AND NOT EXISTS(SELECT 1 FROM rent_user_package b WHERE b.user_id=u.user_id AND b.package_id=p.id)
|
||||
|
||||
Reference in new issue
Block a user