|
@@ -434,9 +434,9 @@ def get_cache_rank_list(match_id,today):
|
|
|
player["total_income"] = "{}%".format(today_record["total_income"]*100)
|
|
player["total_income"] = "{}%".format(today_record["total_income"]*100)
|
|
|
player["today_income"] = "{}%".format(today_record["today_income"]*100)
|
|
player["today_income"] = "{}%".format(today_record["today_income"]*100)
|
|
|
|
|
|
|
|
- if player["org_today_income"] >= 0.09:
|
|
|
|
|
|
|
+ if player["org_today_income"] >= 0.05:
|
|
|
win_count += 1
|
|
win_count += 1
|
|
|
- if player["org_today_income"] <= -0.09:
|
|
|
|
|
|
|
+ if player["org_today_income"] <= -0.05:
|
|
|
loss_count += 1
|
|
loss_count += 1
|
|
|
|
|
|
|
|
try:
|
|
try:
|
|
@@ -787,14 +787,18 @@ def add_model(cls,**kwargs):
|
|
|
else:
|
|
else:
|
|
|
today_income = 0.0
|
|
today_income = 0.0
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- total_income = (today_fund-init_fund-fundin)/(init_fund+fundin)
|
|
|
|
|
obj.today_income = round(today_income,4)
|
|
obj.today_income = round(today_income,4)
|
|
|
- obj.total_income = round(total_income,4)
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
if flag:
|
|
if flag:
|
|
|
- cm.Player.objects.filter(user_id=user_id,match_id=match_id).update(fund=init_fund+fundin)
|
|
|
|
|
- obj.init_fund = init_fund + fundin
|
|
|
|
|
|
|
+ total_income = (today_fund-init_fund-fundin)/(init_fund+fundin)
|
|
|
|
|
+ cm.Player.objects.filter(user_id=user_id,match_id=match_id).update(fund=init_fund+fundin)
|
|
|
|
|
+ obj.init_fund = init_fund + fundin
|
|
|
|
|
+ else:
|
|
|
|
|
+ total_income = (today_fund - init_fund)/float(init_fund) if init_fund else 0.0
|
|
|
|
|
+
|
|
|
|
|
+ obj.total_income = round(total_income,4)
|
|
|
|
|
+
|
|
|
#出资金
|
|
#出资金
|
|
|
else:
|
|
else:
|
|
|
fundout = fundout - fundin
|
|
fundout = fundout - fundin
|
|
@@ -804,15 +808,17 @@ def add_model(cls,**kwargs):
|
|
|
else:
|
|
else:
|
|
|
today_income = 0.0
|
|
today_income = 0.0
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- total_income = (today_fund+fundout-init_fund)/init_fund if init_fund else 0.0
|
|
|
|
|
-
|
|
|
|
|
obj.today_income = round(today_income,4)
|
|
obj.today_income = round(today_income,4)
|
|
|
- obj.total_income = round(total_income,4)
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
if flag:
|
|
if flag:
|
|
|
|
|
+ total_income = (today_fund+fundout-init_fund)/init_fund if init_fund else 0.0
|
|
|
cm.Player.objects.filter(user_id=user_id,match_id=match_id).update(fund=round(today_fund/(1+total_income),4))
|
|
cm.Player.objects.filter(user_id=user_id,match_id=match_id).update(fund=round(today_fund/(1+total_income),4))
|
|
|
obj.init_fund = round(today_fund/(1+total_income),4)
|
|
obj.init_fund = round(today_fund/(1+total_income),4)
|
|
|
|
|
+ else:
|
|
|
|
|
+ total_income = (today_fund - init_fund)/float(init_fund) if init_fund else 0.0
|
|
|
|
|
+
|
|
|
|
|
+ obj.total_income = round(total_income,4)
|
|
|
|
|
|
|
|
if float(today_income)>0.4:
|
|
if float(today_income)>0.4:
|
|
|
raise ce.TipException(u"今日盈利已超过40%,请仔细核对数据或直接联系顽主!")
|
|
raise ce.TipException(u"今日盈利已超过40%,请仔细核对数据或直接联系顽主!")
|