Browse Source

上海策略平台同步添加,导入用户来源

xingzai 2 years ago
parent
commit
869cad1863
2 changed files with 2 additions and 2 deletions
  1. 1 1
      models/send_company_user.go
  2. 1 1
      services/activity.go

+ 1 - 1
models/send_company_user.go

@@ -223,7 +223,7 @@ type WxUserOpLogResp struct {
 //获取指定时间内更新的用户
 func GetWxUserOpLog(createTime string) (items []*WxUserOpLogResp, err error) {
 	o := orm.NewOrm()
-	sql := ` SELECT company_id FROM wx_user_op_log WHERE  log_type IN ('add','edit') AND create_time >=  '` + createTime + `' AND company_id > 1 GROUP BY company_id `
+	sql := ` SELECT company_id FROM wx_user_op_log WHERE  log_type IN ('add','edit','import') AND create_time >=  '` + createTime + `' AND company_id > 1 GROUP BY company_id `
 	_, err = o.Raw(sql).QueryRows(&items)
 	return
 }

+ 1 - 1
services/activity.go

@@ -610,7 +610,7 @@ func ActivityAttendanceDetail(cont context.Context) (err error) {
 	}()
 	var activityIds string
 	fmt.Println("开始同步")
-	dateTime := time.Now().AddDate(0, 0, -1).Format(utils.FormatDate)
+	dateTime := time.Now().AddDate(0, 0, -14).Format(utils.FormatDate)
 	dateNow := time.Now().AddDate(0, 0, 0).Format(utils.FormatDate)
 	startDate := dateTime + " 00:00:00"
 	endDate := dateNow + " 23:59:59"