|
@@ -14,11 +14,11 @@ func DocGetCheck(docId, userId, appId string) stdlib.DocGetCheckResp {
|
|
|
var buyCount int64
|
|
|
var collectCount int64
|
|
|
isbuy, isCollect := false, false
|
|
|
- jyDocsRpcUtil.GetJyDocsDB().Table("download_collection_record").Where("docId = ? and userId = ? and appId = ? and category = 1", docId, userId, appId).Count(&buyCount)
|
|
|
+ jyDocsRpcUtil.GetJyDocsDB().Table("user_doc").Where("docId = ? and userId = ? and appId = ? and isDownload = 1", docId, userId, appId).Count(&buyCount)
|
|
|
if buyCount > 0 {
|
|
|
isbuy = true
|
|
|
}
|
|
|
- jyDocsRpcUtil.GetJyDocsDB().Table("download_collection_record").Where("docId = ? and userId = ? and appId = ? and category = 2", docId, userId, appId).Count(&collectCount)
|
|
|
+ jyDocsRpcUtil.GetJyDocsDB().Table("user_doc").Where("docId = ? and userId = ? and appId = ? and isCollection = 1", docId, userId, appId).Count(&collectCount)
|
|
|
if collectCount > 0 {
|
|
|
isCollect = true
|
|
|
}
|