|
@@ -148,8 +148,10 @@ func (l *AnalyzeContactField) Analyze(bot_wxid *string, contact_wxid *string) {
|
|
//yesterdayEnd := yesterdayStart.Add(24 * time.Hour)
|
|
//yesterdayEnd := yesterdayStart.Add(24 * time.Hour)
|
|
loc, _ := time.LoadLocation("Asia/Shanghai")
|
|
loc, _ := time.LoadLocation("Asia/Shanghai")
|
|
now := time.Now().In(loc)
|
|
now := time.Now().In(loc)
|
|
- yesterdayEnd := now.Truncate(24 * time.Hour).Add(-16 * time.Hour)
|
|
|
|
- yesterdayStart := yesterdayEnd.AddDate(0, 0, -1)
|
|
|
|
|
|
+ yesterdayEnd := now.Add(-8 * time.Hour)
|
|
|
|
+ yesterdayStart := now.Add(-32 * time.Hour)
|
|
|
|
+ //yesterdayEnd := now.Truncate(24 * time.Hour).Add(-16 * time.Hour)
|
|
|
|
+ //yesterdayStart := yesterdayEnd.AddDate(0, 0, -1)
|
|
predicates = append(predicates, usagedetail.CreatedAtGTE(yesterdayStart))
|
|
predicates = append(predicates, usagedetail.CreatedAtGTE(yesterdayStart))
|
|
predicates = append(predicates, usagedetail.CreatedAtLT(yesterdayEnd))
|
|
predicates = append(predicates, usagedetail.CreatedAtLT(yesterdayEnd))
|
|
if bot_wxid != nil && *bot_wxid != "" {
|
|
if bot_wxid != nil && *bot_wxid != "" {
|