소스 검색

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

fuwencai 1 년 전
부모
커밋
21369d1b14
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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)