Răsfoiți Sursa

feat:p525 统计用户今日下载次数调整

fuwencai 1 an în urmă
părinte
comite
21369d1b14
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      services/userlib/userDocService.go

+ 1 - 1
services/userlib/userDocService.go

@@ -478,7 +478,7 @@ func UserMerge(mergeUser, mergedUser, appId string) (bool, string) {
 // GetTodayCount 获取今天的数量
 func GetTodayCount(in *userlib.UserTodayCountReq) (count int64, err error) {
 	todayStart := fmt.Sprintf("%s 00:00:00", date.NowFormat(date.Date_Short_Layout))
-	q := "SELECT count(*) FROM jydocs.download_collection_record dcr left join doc d on(dcr.docId=d.id)  where dcr.userId=? and dcr.date>=? and dcr.category=1   and dcr.appId=? and d.productType=?"
+	q := "SELECT count(*) FROM jydocs.download_collection_record dcr left join doc d on(dcr.docId=d.id)  where dcr.userId=? and dcr.date>=? and dcr.category=1   and dcr.appId=? and d.productType=? and d.source=2"
 	err = docRpcUtil.GetJyDocsDB().Raw(q, in.UserId, todayStart, in.AppId, in.ProductType).Count(&count).Error
 	if err != nil {
 		log.Println("GetTodayCount err:", in, err)