|
|
|
@ -144,7 +144,7 @@ func DrawVipBonus(c *gin.Context) { |
|
|
|
bonus := con.Bonus |
|
|
|
bonus := con.Bonus |
|
|
|
if bonus <= 0 { |
|
|
|
if bonus <= 0 { |
|
|
|
a.Code = values.CodeParam |
|
|
|
a.Code = values.CodeParam |
|
|
|
a.Msg = "reward invalid" |
|
|
|
a.Msg = "इनाम अमान्य" |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
newDraws := vip.Draws | flag |
|
|
|
newDraws := vip.Draws | flag |
|
|
|
@ -193,7 +193,7 @@ func DrawVipCashback(c *gin.Context) { |
|
|
|
db.Mysql().UpdateResW(&common.VipData{}, map[string]interface{}{"profit_time": now.Unix(), "cashback": 0, "profit": 0}, |
|
|
|
db.Mysql().UpdateResW(&common.VipData{}, map[string]interface{}{"profit_time": now.Unix(), "cashback": 0, "profit": 0}, |
|
|
|
fmt.Sprintf("uid = %v and profit_time = %v", a.UID, vip.ProfitTime)) |
|
|
|
fmt.Sprintf("uid = %v and profit_time = %v", a.UID, vip.ProfitTime)) |
|
|
|
a.Code = values.CodeParam |
|
|
|
a.Code = values.CodeParam |
|
|
|
a.Msg = "reward invalid" |
|
|
|
a.Msg = "इनाम अमान्य" |
|
|
|
return |
|
|
|
return |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
cashback = vip.Profit * con.Cashback / 1000 |
|
|
|
cashback = vip.Profit * con.Cashback / 1000 |
|
|
|
@ -208,7 +208,7 @@ func DrawVipCashback(c *gin.Context) { |
|
|
|
db.Mysql().UpdateResW(&common.VipData{}, map[string]interface{}{"profit_time": now.Unix(), "cashback": 0, "profit": 0}, |
|
|
|
db.Mysql().UpdateResW(&common.VipData{}, map[string]interface{}{"profit_time": now.Unix(), "cashback": 0, "profit": 0}, |
|
|
|
fmt.Sprintf("uid = %v and profit_time = %v", a.UID, vip.ProfitTime)) |
|
|
|
fmt.Sprintf("uid = %v and profit_time = %v", a.UID, vip.ProfitTime)) |
|
|
|
a.Code = values.CodeParam |
|
|
|
a.Code = values.CodeParam |
|
|
|
a.Msg = "reward invalid" |
|
|
|
a.Msg = "इनाम अमान्य" |
|
|
|
return |
|
|
|
return |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
cashback = vip.Profit * con.Cashback / 1000 |
|
|
|
cashback = vip.Profit * con.Cashback / 1000 |
|
|
|
@ -220,7 +220,7 @@ func DrawVipCashback(c *gin.Context) { |
|
|
|
|
|
|
|
|
|
|
|
if cashback <= 0 { |
|
|
|
if cashback <= 0 { |
|
|
|
a.Code = values.CodeParam |
|
|
|
a.Code = values.CodeParam |
|
|
|
a.Msg = "reward invalid" |
|
|
|
a.Msg = "इनाम अमान्य" |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -233,7 +233,7 @@ func DrawVipCashback(c *gin.Context) { |
|
|
|
if err != nil || rows == 0 { |
|
|
|
if err != nil || rows == 0 { |
|
|
|
log.Error("err:%v", err) |
|
|
|
log.Error("err:%v", err) |
|
|
|
a.Code = values.CodeParam |
|
|
|
a.Code = values.CodeParam |
|
|
|
a.Msg = "reward invalid" |
|
|
|
a.Msg = "इनाम अमान्य" |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
_, err = call.UpdateCurrencyPro(&common.UpdateCurrency{ |
|
|
|
_, err = call.UpdateCurrencyPro(&common.UpdateCurrency{ |
|
|
|
|