Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Collection = mongodb.DB().Connection().Collection("memberProductCollection")
Functions ¶
func DeleteAllByMemberID ¶
DeleteAllByMemberID 根据会员ID删除记录
Types ¶
type MemberProductCollection ¶
type MemberProductCollection 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"` }
MemberProductCollection 会员商品收藏
func FindByMemberIDAndProductID ¶
func FindByMemberIDAndProductID(ctx context.Context, memberID, productID int64) ( *MemberProductCollection, error)
FindByMemberIDAndProductID 根据会员ID和商品ID查找记录
func FindByMemberIDWithPagination ¶
func FindByMemberIDWithPagination(ctx context.Context, memberID int64, page, size int64) ( []*MemberProductCollection, int64, error)
FindByMemberIDWithPagination 根据会员ID分页查询记录
func NewModel ¶
func NewModel() *MemberProductCollection
func (*MemberProductCollection) Insert ¶
func (m *MemberProductCollection) Insert(ctx context.Context) (*mongo.InsertOneResult, error)
Click to show internal directories.
Click to hide internal directories.