fix
This commit is contained in:
parent
16daea2263
commit
ed3af8c274
|
@ -68,6 +68,19 @@ and mid>0
|
|||
return safe_get_int(docs[0], "dias")
|
||||
return 0
|
||||
|
||||
# 获取官方钻石
|
||||
def get_official_ext_dias(self):
|
||||
sql = '''
|
||||
select sum(`change`) dias
|
||||
from vas_ch_income
|
||||
where ct>={} and ct<{}
|
||||
and mid in (159)
|
||||
'''.format(self.st, self.et)
|
||||
docs = self.mysql_db_vas.query(sql)
|
||||
if len(docs) > 0:
|
||||
return safe_get_int(docs[0], "dias")
|
||||
return 0
|
||||
|
||||
def insert_day_detail(self, data: tuple):
|
||||
sql = '''insert into vas_day_detail (
|
||||
ptime,
|
||||
|
@ -105,6 +118,7 @@ and mid>0
|
|||
zone_moment_money = 0
|
||||
other_cnt = 0
|
||||
other_money = 0
|
||||
official_ext_dias = self.get_official_ext_dias()
|
||||
|
||||
sold_list = self.get_product_sold_list()
|
||||
for sold in sold_list:
|
||||
|
@ -127,7 +141,7 @@ and mid>0
|
|||
else:
|
||||
other_cnt += cnt
|
||||
other_money += money
|
||||
streamer_dias = self.get_streamer_dias()
|
||||
streamer_dias = self.get_streamer_dias() - official_ext_dias
|
||||
streamer_money = int(streamer_dias / 10)
|
||||
official_money = total_money - streamer_money
|
||||
data = (
|
||||
|
|
Loading…
Reference in New Issue