Browse Source

更新

master
huangjiajun 9 months ago
parent
commit
a595d524fd
2 changed files with 9 additions and 1 deletions
  1. +1
    -0
      db/model/user.go
  2. +8
    -1
      hdl/hdl_upgrade.go

+ 1
- 0
db/model/user.go View File

@@ -27,4 +27,5 @@ type User struct {
SalePhone string `json:"sale_phone" xorm:"not null default '' comment('') VARCHAR(100)"` 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)"` 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)"` 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)"`
} }

+ 8
- 1
hdl/hdl_upgrade.go View File

@@ -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()}) eg.Where("uid=?", user.Uid).Cols("date").Update(&model.OneCirclesUserLvTime{Date: time.Now()})
AutoAudit = 1 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 return result, AutoAudit
} }
@@ -377,7 +385,6 @@ func GetFinishCount(params map[string]string, blockStarChain string, engine *xor
if lvTime != nil && lvTime.Date.IsZero() == false { if lvTime != nil && lvTime.Date.IsZero() == false {
stime = lvTime.Date.Format("2006-01-02") stime = lvTime.Date.Format("2006-01-02")
} }

etime := t.Format("2006-01-02") etime := t.Format("2006-01-02")
if params["is_view"] == "1" { if params["is_view"] == "1" {
if lvTime == nil || (lvTime != nil && lvTime.Date.IsZero()) { if lvTime == nil || (lvTime != nil && lvTime.Date.IsZero()) {


Loading…
Cancel
Save