Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.5.2
zouap 4 years ago
parent
commit
df2603806f
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      models/user_business_analysis.go

+ 5
- 5
models/user_business_analysis.go View File

@@ -541,9 +541,9 @@ func QueryUserStaticDataPage(opts *UserBusinessAnalysisQueryOptions) ([]*UserBus
statictisSess := xStatistic.NewSession()
defer statictisSess.Close()

currentTimeNow := time.Now()
pageStartTime := getLastCountDate()
pageEndTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 23, 59, 59, 0, currentTimeNow.Location()).Unix()
//currentTimeNow := time.Now()
//pageStartTime := getLastCountDate()
//pageEndTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 23, 59, 59, 0, currentTimeNow.Location()).Unix()

var cond = builder.NewCond()
if len(opts.UserName) > 0 {
@@ -552,10 +552,10 @@ func QueryUserStaticDataPage(opts *UserBusinessAnalysisQueryOptions) ([]*UserBus
)
}
cond = cond.And(
builder.Gte{"count_date": pageStartTime},
builder.Gte{"count_date": opts.StartTime},
)
cond = cond.And(
builder.Lte{"count_date": pageEndTime},
builder.Lte{"count_date": opts.EndTime},
)

count, err := statictisSess.Where(cond).Count(new(UserBusinessAnalysis))


Loading…
Cancel
Save