|
@@ -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)
|