|
@@ -355,7 +355,7 @@ func UserDocsList(in *userlib.UserDocsRequest) ([]*model.UserDoc, int64, bool, s
|
|
case int64(1):
|
|
case int64(1):
|
|
//收藏的
|
|
//收藏的
|
|
err := docRpcUtil.GetJyDocsDB().Table("user_doc").Raw("SELECT count(*) FROM jydocs.user_doc ud inner join doc d on (ud.docId=d.id) where ud.userId=? and ud.isCollection=1 and ud.appId=? and d.isDelete=0 ", in.UserId, in.AppId).Count(&count)
|
|
err := docRpcUtil.GetJyDocsDB().Table("user_doc").Raw("SELECT count(*) FROM jydocs.user_doc ud inner join doc d on (ud.docId=d.id) where ud.userId=? and ud.isCollection=1 and ud.appId=? and d.isDelete=0 ", in.UserId, in.AppId).Count(&count)
|
|
- err = docRpcUtil.GetJyDocsDB().Table("user_doc").Raw("SELECT ud.create_at,ud.update_at,ud.docCategory,ud.isDownload,ud.isCollection,d.price as cost,d.docTags,d.docFileType,d.docName,d.docFileSuffix,d.docFileSize,d.docPageSize,d.docSummary,d.source,d.product_type FROM jydocs.user_doc ud inner join doc d on (ud.docId=d.id) where ud.userId=? and ud.isCollection=1 and ud.appId=? and d.isDelete=0 order by create_at desc limit ?,?", in.UserId, in.AppId, startIndex, in.PageSize).Find(&data)
|
|
|
|
|
|
+ err = docRpcUtil.GetJyDocsDB().Table("user_doc").Raw("SELECT ud.create_at,ud.update_at,ud.docCategory,ud.isDownload,ud.isCollection,d.price as cost,d.docTags,d.docFileType,d.docName,d.docFileSuffix,d.docFileSize,d.docPageSize,d.docSummary,d.source,d.productType FROM jydocs.user_doc ud inner join doc d on (ud.docId=d.id) where ud.userId=? and ud.isCollection=1 and ud.appId=? and d.isDelete=0 order by create_at desc limit ?,?", in.UserId, in.AppId, startIndex, in.PageSize).Find(&data)
|
|
if err.Error != nil {
|
|
if err.Error != nil {
|
|
log.Println("查询收藏记录失败:", err)
|
|
log.Println("查询收藏记录失败:", err)
|
|
msg = "查询收藏记录失败"
|
|
msg = "查询收藏记录失败"
|