From a595d524fdb5a13d1fa034bb912d9bafeb01163e Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 22 Feb 2024 10:38:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/model/user.go | 1 + hdl/hdl_upgrade.go | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/db/model/user.go b/db/model/user.go index 9dccba2..90abea4 100644 --- a/db/model/user.go +++ b/db/model/user.go @@ -27,4 +27,5 @@ type User struct { SalePhone string `json:"sale_phone" xorm:"not null default '' comment('') VARCHAR(100)"` IsFake int `json:"is_fake" xorm:"not null default 0 comment('0真实 1虚拟') TINYINT(1)"` IsMarketer int `json:"is_marketer" xorm:"not null default 0 comment('是否市商 0否 1是') TINYINT(1)"` + IsNotDown int `json:"is_not_down" xorm:"not null default 0 comment('是否市商 0否 1是') TINYINT(1)"` } diff --git a/hdl/hdl_upgrade.go b/hdl/hdl_upgrade.go index a93e9f7..7a22bd2 100644 --- a/hdl/hdl_upgrade.go +++ b/hdl/hdl_upgrade.go @@ -139,7 +139,15 @@ func CommUplv(params map[string]string, blockStarChain string, eg *xorm.Engine, } eg.Where("uid=?", user.Uid).Cols("date").Update(&model.OneCirclesUserLvTime{Date: time.Now()}) AutoAudit = 1 + var task model.UserLevelUpgradeTask + eg.Where("scheme_id=? and task_type=22", DataDetail.AgentType).Get(&task) + if task.Id > 0 { + eg.Where("uid=?", uid).Cols("is_not_down").Update(&model.User{IsNotDown: 0}) + } else { + eg.Where("uid=?", uid).Cols("is_not_down").Update(&model.User{IsNotDown: 1}) + } } + } return result, AutoAudit } @@ -377,7 +385,6 @@ func GetFinishCount(params map[string]string, blockStarChain string, engine *xor if lvTime != nil && lvTime.Date.IsZero() == false { stime = lvTime.Date.Format("2006-01-02") } - etime := t.Format("2006-01-02") if params["is_view"] == "1" { if lvTime == nil || (lvTime != nil && lvTime.Date.IsZero()) {