member_read_history

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Collection = mongodb.DB().Connection().Collection("memberReadHistory")

Functions

func BatchDelete

func BatchDelete(ctx context.Context, ids []string) (int64, error)

BatchDelete 批量删除

func DeleteAllByMemberID

func DeleteAllByMemberID(ctx context.Context, memberID int64) (int64, error)

DeleteAllByMemberID 根据会员ID删除记录

Types

type MemberReadHistory

type MemberReadHistory struct {
	Id              primitive.ObjectID `bson:"_id,omitempty"`
	MemberId        int64              `bson:"memberId"`
	MemberNickname  string             `bson:"memberNickname"`
	MemberIcon      string             `bson:"memberIcon"`
	ProductId       int64              `bson:"productId"`
	ProductName     string             `bson:"productName"`
	ProductPic      string             `bson:"productPic"`
	ProductSubTitle string             `bson:"productSubTitle"`
	ProductPrice    float64            `bson:"productPrice"`
	CreateTime      time.Time          `bson:"createTime"`
}

MemberReadHistory 会员商品浏览历史记录

func FindByMemberIDOrderByCreateTimeDesc

func FindByMemberIDOrderByCreateTimeDesc(ctx context.Context, memberID int64, page, size int64) (
	[]*MemberReadHistory, int64, error)

FindByMemberIDOrderByCreateTimeDesc 根据会员ID分页查找记录并按创建时间降序排序

func NewModel

func NewModel() *MemberReadHistory

func (*MemberReadHistory) InsertOrUpdate

func (m *MemberReadHistory) InsertOrUpdate(ctx context.Context) (*mongo.UpdateResult, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL