|
|
|
@ -555,7 +555,7 @@ func (d *DataBases) GetTagSendLogs(userID string, showNumber, pageNumber int32)
|
|
|
|
|
var tagSendLogs []TagSendLog
|
|
|
|
|
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
|
|
|
|
|
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cSendLog)
|
|
|
|
|
findOpts := options.Find().SetSort(-1).SetLimit(int64(showNumber)).SetSkip(int64(showNumber) * (int64(pageNumber) - 1))
|
|
|
|
|
findOpts := options.Find().SetLimit(int64(showNumber)).SetSkip(int64(showNumber) * (int64(pageNumber) - 1))
|
|
|
|
|
cursor, err := c.Find(ctx, bson.M{"sendID": userID}, findOpts)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return tagSendLogs, err
|
|
|
|
|