This commit is contained in:
lwl0608 2024-11-01 16:35:05 +08:00
parent 6c8fcc1e95
commit 92c02bf165
2 changed files with 22 additions and 6 deletions

View File

@ -1,9 +1,14 @@
from lib.all import * from lib.all import *
csv_w = Csv( csv_w = Csv(
"income_10_991080.csv", ["用户id", "昵称", "空间解锁", "主播收入钻石"] "income_10_983565.csv", ["用户id", "昵称", "空间解锁", "主播收入钻石"]
) )
st_str = "2024-10-01 00:00:00"
et_str = "2024-11-01 00:00:00"
uids = [983565]
class S: class S:
def __init__(self): def __init__(self):
@ -97,7 +102,7 @@ select mid, sum(`change`) as income from vas_ch_income where mid in (%s) and ct>
return mid_income_map return mid_income_map
def proc(self): def proc(self):
tp_uids = [991080] tp_uids = uids
tp_mids = list() tp_mids = list()
for uid in tp_uids: for uid in tp_uids:
tp_mids.append(self.uid2mid(uid)) tp_mids.append(self.uid2mid(uid))
@ -110,8 +115,8 @@ select mid, sum(`change`) as income from vas_ch_income where mid in (%s) and ct>
# 空间解锁数 # 空间解锁数
zid_cnt_map = self.get_zone_admission_cnt( zid_cnt_map = self.get_zone_admission_cnt(
zids, zids,
get_ts_by_str("2024-08-01 00:00:00"), get_ts_by_str(st_str),
get_ts_by_str("2024-09-01 00:00:00") get_ts_by_str(et_str)
) )
print(zid_cnt_map) print(zid_cnt_map)
@ -124,8 +129,8 @@ select mid, sum(`change`) as income from vas_ch_income where mid in (%s) and ct>
# 收入 # 收入
mid_income_map = self.get_streamer_income( mid_income_map = self.get_streamer_income(
streamer_mids, streamer_mids,
get_ts_by_str("2024-10-01 00:00:00"), get_ts_by_str(st_str),
get_ts_by_str("2024-11-01 00:00:00") get_ts_by_str(et_str)
) )
print(mid_income_map) print(mid_income_map)

11
vas/x/transfer.py Normal file
View File

@ -0,0 +1,11 @@
from lib.all import *
data = Csv('tixianmingxi.csv').read_all()
csv_ = Csv("提现明细.csv", ["提现钻石", "时间"])
for d in data:
dias = d[1]
ct = get_time_str_by_ts(int(d[0]))
csv_.append([[dias, ct]])