Ver a proveniência

升级

master
huangjiajun há 5 dias
ascendente
cometimento
b9cebfb90a
1 ficheiros alterados com 2 adições e 2 eliminações
  1. +2
    -2
      rule/user_upgrade.go

+ 2
- 2
rule/user_upgrade.go Ver ficheiro

@@ -144,7 +144,7 @@ func ExtendUserCountWithLv(eg *xorm.Engine, uid, lv int) int64 {
func ExtendUserCountWithDay(eg *xorm.Engine, uid, day, activityDay int) int64 {
var user []model.User
today := utils.GetTimeRange("today")
times := today["start"] - int64(day*86400)
times := today["end"] - int64(day*86400)
eg.Where("parent_uid=? and create_at>=?", uid, times).Find(&user)
var num int64 = 0
if len(user) > 0 {
@@ -171,7 +171,7 @@ func ExtendUserCountWithDay(eg *xorm.Engine, uid, day, activityDay int) int64 {
// 直推人数
func ExtendUserCountActivity(eg *xorm.Engine, uid, day, activityNum, finishCount int) int64 {
today := utils.GetTimeRange("today")
times := today["start"] - int64(day*86400)
times := today["end"] - int64(day*86400)
sql := `SELECT COUNT(*) as count,u.id FROM user u
LEFT JOIN egg_sign_in esi on esi.uid=u.id
WHERE esi.start_time>='%s' and u.parent_uid=%d GROUP BY u.id HAVING count>=%d LIMIT %d`


Carregando…
Cancelar
Guardar