Initial commit

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 13:57:10 +08:00
co-authored by Claude Opus 5
commit 8679200f41
1897 changed files with 257900 additions and 0 deletions
@@ -0,0 +1,34 @@
package userwatchrecordserver
import (
"91porn-server/app/service/vidhelpser"
"91porn-server/common/stderr"
"91porn-server/models/v/userwatchrecordmod"
"91porn-server/models/v/vidmod"
"go.mongodb.org/mongo-driver/bson/primitive"
)
func List(uid uint64, req *userwatchrecordmod.ListRequest) (interface{}, stderr.Code) {
list, err := userwatchrecordmod.List(req.Filter(uid), req.Options())
if err != nil {
return nil, stderr.ErrDbQueryError
}
listLen := len(list)
var out userwatchrecordmod.ListResponse
if listLen > int(req.PageSize) {
out.HasNext = true
list = list[:len(list)-1]
listLen--
}
if listLen == 0 {
out.WorkList = []*vidmod.VideoInfoResp{}
return out, stderr.Success
}
videoIds := make([]primitive.ObjectID, listLen)
for i, record := range list {
videoIds[i] = record.VideoID
}
out.WorkList = vidhelpser.GetVideoListByIDsNoStatus(uid, videoIds)
return out, stderr.Success
}