This commit is contained in:
ping 2026-08-19 16:16:15 +08:00
parent 5a95271bb8
commit 50db2df586
4 changed files with 19 additions and 0 deletions

View File

@ -11,6 +11,8 @@ async def change_ecs_name(ns={}):
"EcsId": ns.get("EcsId"), "EcsId": ns.get("EcsId"),
"Name": ns.get("Name") "Name": ns.get("Name")
} }
print(body)
print(get_signature(action, method, ecs_url, param))
url = get_signature(action, method, ecs_url, param) url = get_signature(action, method, ecs_url, param)
async with aiohttp.ClientSession() as session: async with aiohttp.ClientSession() as session:
async with session.request(method, url, json=body) as response: async with session.request(method, url, json=body) as response:

View File

@ -6,6 +6,10 @@ async def delete_eip(ns={}):
param = {} param = {}
url = get_signature(action, method, NETWORK_URL, param=param) url = get_signature(action, method, NETWORK_URL, param=param)
body = {'EIPId': ns.get('EIPId')} body = {'EIPId': ns.get('EIPId')}
print(body)
print(url)
async with aiohttp.ClientSession() as session: async with aiohttp.ClientSession() as session:
async with session.request(method, url, json=body) as response: async with session.request(method, url, json=body) as response:
resp = await response.text() resp = await response.text()

View File

@ -2,6 +2,12 @@ async def addinvitecode(ns):
""" """
生成邀请码 生成邀请码
""" """
import datetime
now = datetime.datetime.now()
start_of_day = now.replace(hour=0, minute=0, second=0, microsecond=0)
end_of_day = now.replace(hour=23, minute=59, second=59, microsecond=999999)
db = DBPools() db = DBPools()
async with db.sqlorContext('kboss') as sor: async with db.sqlorContext('kboss') as sor:
if ns['promotingid'] and ns['iusserid']: if ns['promotingid'] and ns['iusserid']:

View File

@ -1,4 +1,11 @@
async def get_customer_mailcode(ns): async def get_customer_mailcode(ns):
import datetime
now = datetime.datetime.now()
if now.hour < 10:
print('now.hour < 10')
db = DBPools() db = DBPools()
async with db.sqlorContext('kboss') as sor: async with db.sqlorContext('kboss') as sor:
user = await sor.R('users', {'id': ns.get('user_id')}) user = await sor.R('users', {'id': ns.get('user_id')})