rdluck il y a 4 ans
Parent
commit
66a94531cc
2 fichiers modifiés avec 6 ajouts et 4 suppressions
  1. 4 3
      models/free_viewer.go
  2. 2 1
      services/task.go

+ 4 - 3
models/free_viewer.go

@@ -14,9 +14,10 @@ func GetFreeViewerDetails(startTime,endTime string) (items []*FreeViewerDetails,
 	sql := `select u.real_name,u.mobile,u.note,u.created_time,max(uvh.created_time) as max_created_time
 	from wx_user u
 	LEFT JOIN user_view_history uvh on u.user_id = uvh.user_id
-	where company_id = 1
-	and apply_method<>2
-	and mobile is not null
+	where u.company_id = 1
+	and u.apply_method<>2
+	and u.mobile is not null
+	AND u.mobile<>''
 	and u.created_time > ?
 	and u.created_time <= ?
 	group by u.user_id`

+ 2 - 1
services/task.go

@@ -76,8 +76,9 @@ func TaskTest(){
 
 func Task123() {
 	fmt.Println("start")
-	//ReportViewDetail()
+	FreeViewerDetail()
 	fmt.Println("end")
+	return
 }
 
 func SendEmail() (err error) {