pdd物料
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
HandlerMap map[int]UnionInterface
|
||||
UnionHandlerMap map[int]UnionInterface
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -21,6 +21,11 @@ const (
|
||||
ShareTypeOwn = 2 //自己领
|
||||
|
||||
MtUnionJxSID = "000000001"
|
||||
|
||||
//排序参数,正数升序,负数倒序
|
||||
JxSortTypeYJ = 1 //佣金比
|
||||
JxSortTypeXL = 2 //销量
|
||||
JxSortTypeJG = 3 //价格
|
||||
)
|
||||
|
||||
type UnionOrderInfo struct {
|
||||
@@ -40,17 +45,35 @@ type ActivityList struct {
|
||||
Img string `json:"img"` //活动图
|
||||
}
|
||||
|
||||
type GoodsList struct {
|
||||
GoodsID string `json:"goodsID"`
|
||||
GoodsName string `json:"goodsName"`
|
||||
Img string `json:"img"`
|
||||
CouponDiscount int `json:"couponDiscount"` //优惠券
|
||||
CouponRemainQuantity int `json:"couponRemainQuantity"` //优惠券剩余数量
|
||||
MinNormalPrice int `json:"minNormalPrice"` //最小购买价格
|
||||
SalesCount string `json:"salesCount"` //销量
|
||||
PromotionRate int `json:"promotionRate"` //佣金比例,千分比
|
||||
}
|
||||
|
||||
type MatterList struct {
|
||||
GoodsList []*GoodsList
|
||||
VendorID int `json:"vendorID"`
|
||||
ListID string `json:"listID"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
HandlerMap = make(map[int]UnionInterface)
|
||||
UnionHandlerMap = make(map[int]UnionInterface)
|
||||
}
|
||||
|
||||
type UnionInterface interface {
|
||||
ShareUnionLink(ctx *jxcontext.Context, linkType, unionActID int, sID, userID string, resourceType int) (link string, err error)
|
||||
GetUnionActList(ctx *jxcontext.Context, actType int) (result []*ActivityList, err error)
|
||||
CreateUnionPosition(ctx *jxcontext.Context, userID string) (sID string, err error)
|
||||
//GetUnionCouponList(ctx *jxcontext.Context)
|
||||
GetUnionMatterList(ctx *jxcontext.Context, vendorCatID, keyword string, page, pageSize, sortType int, listID string) (result *MatterList, err error)
|
||||
}
|
||||
|
||||
func GetHandler(vendorID int) UnionInterface {
|
||||
return HandlerMap[vendorID]
|
||||
return UnionHandlerMap[vendorID]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user