points

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchInsertOrUpdateRule

func BatchInsertOrUpdateRule(ctx context.Context, req *BatchInsertOrUpdateRuleRequest) (bool, error)

TODO 设置积分规则 按商家后台规则进行设置

func JosSendPoints

func JosSendPoints(ctx context.Context, req *JosSendPointsRequest) (bool, error)

TODO 积分变更开放接口 开放请求的渠道为:26-消费积分 27-发放积分

Types

type BatchInsertOrUpdateRuleData

type BatchInsertOrUpdateRuleData struct {
	JsfResult *BatchInsertOrUpdateRuleJsfResult `json:"jsfResult,omitempty" codec:"jsfResult,omitempty"`
}

func (BatchInsertOrUpdateRuleData) Error added in v1.1.1

func (BatchInsertOrUpdateRuleData) IsError added in v1.1.1

func (r BatchInsertOrUpdateRuleData) IsError() bool

type BatchInsertOrUpdateRuleJsfResult

type BatchInsertOrUpdateRuleJsfResult struct {
	Code   string `json:"code,omitempty" codec:"code,omitempty"`     // 返回码
	Desc   string `json:"desc,omitempty" codec:"desc,omitempty"`     // 返回描述
	Result bool   `json:"result,omitempty" codec:"result,omitempty"` // 是否成功
}

func (BatchInsertOrUpdateRuleJsfResult) Error added in v1.1.1

func (BatchInsertOrUpdateRuleJsfResult) IsError added in v1.1.1

type BatchInsertOrUpdateRuleRequest

type BatchInsertOrUpdateRuleRequest struct {
	api.BaseRequest
	Multiple   float64 `json:"multiple"`   // 兑换倍数
	CreateTime string  `json:"createTime"` // 创建记录时间  2006-01-02 15:04:05
	ModifyTime string  `json:"modifyTime"` // 记录修改时间  2006-01-02 15:04:05
}

type BatchInsertOrUpdateRuleResponse

type BatchInsertOrUpdateRuleResponse struct {
	ErrorResp *api.ErrorResponnse          `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *BatchInsertOrUpdateRuleData `` /* 140-byte string literal not displayed */
}

func (BatchInsertOrUpdateRuleResponse) Error added in v1.1.1

func (BatchInsertOrUpdateRuleResponse) IsError added in v1.1.1

type GetCouponInfoData

type GetCouponInfoData struct {
	JsfResult *GetCouponInfoJsfResult `json:"jsfResult,omitempty" codec:"jsfResult,omitempty"`
}

func (GetCouponInfoData) Error added in v1.1.1

func (r GetCouponInfoData) Error() string

func (GetCouponInfoData) IsError added in v1.1.1

func (r GetCouponInfoData) IsError() bool

type GetCouponInfoJsfResult

type GetCouponInfoJsfResult struct {
	Code   string             `json:"code,omitempty" codec:"code,omitempty"`     // 返回码
	Desc   string             `json:"desc,omitempty" codec:"desc,omitempty"`     // 返回描述
	Result []PointsCouponInfo `json:"result,omitempty" codec:"result,omitempty"` // 优惠券信息
}

func (GetCouponInfoJsfResult) Error added in v1.1.1

func (r GetCouponInfoJsfResult) Error() string

func (GetCouponInfoJsfResult) IsError added in v1.1.1

func (r GetCouponInfoJsfResult) IsError() bool

type GetCouponInfoRequest

type GetCouponInfoRequest struct {
	api.BaseRequest
}

type GetCouponInfoResponse

type GetCouponInfoResponse struct {
	ErrorResp *api.ErrorResponnse `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *GetCouponInfoData  `json:"jingdong_points_jos_getCouponInfo_responce,omitempty" codec:"jingdong_points_jos_getCouponInfo_responce,omitempty"`
}

func (GetCouponInfoResponse) Error added in v1.1.1

func (r GetCouponInfoResponse) Error() string

func (GetCouponInfoResponse) IsError added in v1.1.1

func (r GetCouponInfoResponse) IsError() bool

type GetPointsExchangeGiftListData

type GetPointsExchangeGiftListData struct {
	JsfResult *GetPointsExchangeGiftListJsfResult `json:"jsfResult,omitempty" codec:"jsfResult,omitempty"`
}

func (GetPointsExchangeGiftListData) Error added in v1.1.1

func (GetPointsExchangeGiftListData) IsError added in v1.1.1

func (r GetPointsExchangeGiftListData) IsError() bool

type GetPointsExchangeGiftListJsfResult

type GetPointsExchangeGiftListJsfResult struct {
	Code   string                  `json:"code,omitempty" codec:"code,omitempty"`     // 返回码
	Desc   string                  `json:"desc,omitempty" codec:"desc,omitempty"`     // 返回描述
	Result []PointsExchangeGiftDTO `json:"result,omitempty" codec:"result,omitempty"` // 活动列表
}

func (GetPointsExchangeGiftListJsfResult) Error added in v1.1.1

func (GetPointsExchangeGiftListJsfResult) IsError added in v1.1.1

type GetPointsExchangeGiftListRequest

type GetPointsExchangeGiftListRequest struct {
	api.BaseRequest
}

type GetPointsExchangeGiftListResponse

type GetPointsExchangeGiftListResponse struct {
	ErrorResp *api.ErrorResponnse            `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *GetPointsExchangeGiftListData `` /* 144-byte string literal not displayed */
}

func (GetPointsExchangeGiftListResponse) Error added in v1.1.1

func (GetPointsExchangeGiftListResponse) IsError added in v1.1.1

type GetPointsRuleData

type GetPointsRuleData struct {
	Code      string     `json:"code,omitempty" codec:"code,omitempty"`
	JsfResult *JsfResult `json:"jsfResult,omitempty" codec:"jsfResult,omitempty"`
}

func (GetPointsRuleData) Error added in v1.1.1

func (r GetPointsRuleData) Error() string

func (GetPointsRuleData) IsError added in v1.1.1

func (r GetPointsRuleData) IsError() bool

type GetPointsRuleRequest

type GetPointsRuleRequest struct {
	api.BaseRequest
}

type GetPointsRuleResponse

type GetPointsRuleResponse struct {
	ErrorResp *api.ErrorResponnse `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *GetPointsRuleData  `json:"jingdong_points_jos_getPointsRule_responce,omitempty" codec:"jingdong_points_jos_getPointsRule_responce,omitempty"`
}

func (GetPointsRuleResponse) Error added in v1.1.1

func (r GetPointsRuleResponse) Error() string

func (GetPointsRuleResponse) IsError added in v1.1.1

func (r GetPointsRuleResponse) IsError() bool

type JosSendPointsData

type JosSendPointsData struct {
	JsfResult *JosSendPointsJsfResult `json:"jsfResult,omitempty" codec:"jsfResult,omitempty"`
}

func (JosSendPointsData) Error added in v1.1.1

func (r JosSendPointsData) Error() string

func (JosSendPointsData) IsError added in v1.1.1

func (r JosSendPointsData) IsError() bool

type JosSendPointsJsfResult

type JosSendPointsJsfResult struct {
	Code string `json:"code,omitempty" codec:"code,omitempty"` // 返回码
	Desc string `json:"desc,omitempty" codec:"desc,omitempty"` // 返回描述
}

func (JosSendPointsJsfResult) Error added in v1.1.1

func (r JosSendPointsJsfResult) Error() string

func (JosSendPointsJsfResult) IsError added in v1.1.1

func (r JosSendPointsJsfResult) IsError() bool

type JosSendPointsRequest

type JosSendPointsRequest struct {
	api.BaseRequest
	Pin        string `json:"pin,omitempty" codec:"pin,omitempty"`               // 用户Pin
	BusinessId string `json:"businessId,omitempty" codec:"businessId,omitempty"` // 防重ID
	SourceType uint8  `json:"sourceType,omitempty" codec:"sourceType,omitempty"` // 渠道类型:26-消费积分 27-发放积分
	Points     int64  `json:"points,omitempty" codec:"points,omitempty"`         // 积分变更值
}

type JosSendPointsResponse

type JosSendPointsResponse struct {
	ErrorResp *api.ErrorResponnse `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *JosSendPointsData  `json:"jingdong_points_jos_sendPoints_responce,omitempty" codec:"jingdong_points_jos_sendPoints_responce,omitempty"`
}

func (JosSendPointsResponse) Error added in v1.1.1

func (r JosSendPointsResponse) Error() string

func (JosSendPointsResponse) IsError added in v1.1.1

func (r JosSendPointsResponse) IsError() bool

type JsfResult

type JsfResult struct {
	Result []PointsRule `json:"jsfResult,omitempty" codec:"jsfResult,omitempty"`
	Code   string       `json:"code,omitempty" codec:"code,omitempty"`
	Desc   string       `json:"desc,omitempty" codec:"desc,omitempty"`
}

func (JsfResult) Error added in v1.1.1

func (r JsfResult) Error() string

func (JsfResult) IsError added in v1.1.1

func (r JsfResult) IsError() bool

type PointsCouponInfo

type PointsCouponInfo struct {
	BatchId           uint64   `json:"batch_id,omitempty" codec:"batch_id,omitempty"`                   // 批次id
	BatchKey          string   `json:"batchKey,omitempty" codec:"batchKey,omitempty"`                   // 批次Key
	VenderId          uint64   `json:"venderId,omitempty" codec:"venderId,omitempty"`                   // 	商家ID
	Create            string   `json:"create,omitempty" codec:"create,omitempty"`                       // 优惠券创建时间
	Discount          uint64   `json:"discount,omitempty" codec:"discount,omitempty"`                   // 积分券面额
	Condition         uint64   `json:"condition,omitempty" codec:"condition,omitempty"`                 // 	满减金额
	CouponType        uint8    `json:"couponType,omitempty" codec:"couponType,omitempty"`               // 优惠券类型 0:京券 1:东券
	Points            uint64   `json:"points,omitempty" codec:"points,omitempty"`                       // 所需积分值
	UsePlatList       []uint8  `json:"usePlatList,omitempty" codec:"usePlatList,omitempty"`             // 使用平台
	PlatFormDesc      []string `json:"platFormDesc,omitempty" codec:"platFormDesc,omitempty"`           // 使用平台描述
	Period            uint64   `json:"period,omitempty" codec:"period,omitempty"`                       // 优惠券有效期
	SendCount         uint64   `json:"sendCount,omitempty" codec:"sendCount,omitempty"`                 // 发行量
	TradeCount        uint64   `json:"tradeCount,omitempty" codec:"tradeCount,omitempty"`               // 已经领取量
	RemainingCount    uint64   `json:"remainingCount,omitempty" codec:"remainingCount,omitempty"`       //	剩余量
	FullPlat          uint8    `json:"fullPlat,omitempty" codec:"fullPlat,omitempty"`                   // 是否全平台使用 1:全平台 3:限平台
	ActivityStartTime string   `json:"activityStartTime,omitempty" codec:"activityStartTime,omitempty"` // 活动开始时间
	ActivityEndTime   string   `json:"activityEndTime,omitempty" codec:"activityEndTime,omitempty"`     // 活动结束时间
	RealCouponId      uint64   `json:"realCouponId,omitempty" codec:"realCouponId,omitempty"`           // 卡券组ID
}

func GetCouponInfo

func GetCouponInfo(ctx context.Context, req *GetCouponInfoRequest) ([]PointsCouponInfo, error)

TODO 通过venderId查询商家设置的积分可兑换优惠券信息

type PointsExchangeGiftDTO

type PointsExchangeGiftDTO struct {
	Id                   uint64 `json:"id,omitempty" codec:"id,omitempty"`                                     // 活动id
	VenderId             uint64 `json:"venderId,omitempty" codec:"venderId,omitempty"`                         // 商家ID
	ActivityName         string `json:"activityName,omitempty" codec:"activityName,omitempty"`                 // 活动名称
	ActivityStartTime    int64  `json:"activityStartTime,omitempty" codec:"activityStartTime,omitempty"`       // 活动开始时间
	ActivityEndTime      int64  `json:"activityEndTime,omitempty" codec:"activityEndTime,omitempty"`           // 活动结束时间
	ActivityStatus       uint16 `json:"activityStatus,omitempty" codec:"activityStatus,omitempty"`             // 活动状态
	CreateTime           int64  `json:"createTime,omitempty" codec:"createTime,omitempty"`                     // 创建时间
	UpdateTime           int64  `json:"updateTime,omitempty" codec:"updateTime,omitempty"`                     // 更新时间
	ActivityStatusString string `json:"activityStatusString,omitempty" codec:"activityStatusString,omitempty"` // 活动页面显示状态
}

func GetPointsExchangeGiftList

func GetPointsExchangeGiftList(ctx context.Context, req *GetPointsExchangeGiftListRequest) ([]PointsExchangeGiftDTO, error)

TODO 查询正在进行中的积分兑换商品活动列表

type PointsExchangeGiftSkuDTO

type PointsExchangeGiftSkuDTO struct {
	Id                   uint64  `json:"id,omitempty" codec:"id,omitempty"`                                     // 主键
	ActivityStartTime    int64   `json:"activityStartTime,omitempty" codec:"activityStartTime,omitempty"`       // 活动开始时间
	ActivityEndTime      int64   `json:"activityEndTime,omitempty" codec:"activityEndTime,omitempty"`           // 活动结束时间
	ActivityPrice        float64 `json:"activityPrice,omitempty" codec:"activityPrice,omitempty"`               // 活动价
	ActivityStatus       uint8   `json:"activityStatus,omitempty" codec:"activityStatus,omitempty"`             // 活动状态:1-创建中、2-创建成功、3-失效中、 4-失效
	CreateTime           int64   `json:"createTime,omitempty" codec:"createTime,omitempty"`                     // 创建时间
	HasExchange          bool    `json:"hasExchange,omitempty" codec:"hasExchange,omitempty"`                   // 是否已兑换
	HasConsume           bool    `json:"hasConsume,omitempty" codec:"hasConsume,omitempty"`                     // 是否已消费
	Points               uint64  `json:"points,omitempty" codec:"points,omitempty"`                             // 兑换商品所需积分
	PointsExchangeGiftId uint64  `json:"pointsExchangeGiftId,omitempty" codec:"pointsExchangeGiftId,omitempty"` // 积分兑换商品活动表主键
	PromoId              uint64  `json:"promoId,omitempty" codec:"promoId,omitempty"`                           // pop促销ID
	PromoStatus          uint8   `json:"promoStatus,omitempty" codec:"promoStatus,omitempty"`                   // 促销状态:1-创建中 2-待审核 3-通过 4-驳回 6-已删除 110-售完
	SkuId                uint64  `json:"skuId,omitempty" codec:"skuId,omitempty"`                               // SKU编码
	UpdateTime           int64   `json:"updateTime,omitempty" codec:"updateTime,omitempty"`                     // 更新时间
	VenderId             uint64  `json:"venderId,omitempty" codec:"venderId,omitempty"`                         // 商家id
	WareId               uint64  `json:"wareId,omitempty" codec:"wareId,omitempty"`                             // 	商品编号
}

func QueryGiftSkuByExchangeGiftId

func QueryGiftSkuByExchangeGiftId(ctx context.Context, req *QueryGiftSkuByExchangeGiftIdRequest) ([]PointsExchangeGiftSkuDTO, error)

TODO 根据积分兑换商品活动id 获取商品信息

type PointsRule

type PointsRule struct {
	RuleId   string  `json:"ruleId"`
	VenderId int64   `json:"venderId"`
	Points   int64   `json:"points"`
	Type     int8    `json:"type"`
	Multiple float64 `json:"multiple"`
}

func GetPointsRule

func GetPointsRule(ctx context.Context, req *GetPointsRuleRequest) ([]PointsRule, error)

type QueryGiftSkuByExchangeGiftIdData

type QueryGiftSkuByExchangeGiftIdData struct {
	JsfResult *QueryGiftSkuByExchangeGiftIdJsfResult `json:"jsfResult,omitempty" codec:"jsfResult,omitempty"`
}

func (QueryGiftSkuByExchangeGiftIdData) Error added in v1.1.1

func (QueryGiftSkuByExchangeGiftIdData) IsError added in v1.1.1

type QueryGiftSkuByExchangeGiftIdJsfResult

type QueryGiftSkuByExchangeGiftIdJsfResult struct {
	Code   string                     `json:"code,omitempty" codec:"code,omitempty"` // 返回码
	Desc   string                     `json:"desc,omitempty" codec:"desc,omitempty"` // 返回描述
	Result []PointsExchangeGiftSkuDTO `json:"result,omitempty" codec:"result,omitempty"`
}

func (QueryGiftSkuByExchangeGiftIdJsfResult) Error added in v1.1.1

func (QueryGiftSkuByExchangeGiftIdJsfResult) IsError added in v1.1.1

type QueryGiftSkuByExchangeGiftIdRequest

type QueryGiftSkuByExchangeGiftIdRequest struct {
	api.BaseRequest
	GiftId uint64 `json:"gift_id,omitempty" codec:"gift_id,omitempty"` // 活动id
}

type QueryGiftSkuByExchangeGiftIdResponse

type QueryGiftSkuByExchangeGiftIdResponse struct {
	ErrorResp *api.ErrorResponnse               `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *QueryGiftSkuByExchangeGiftIdData `` /* 150-byte string literal not displayed */
}

func (QueryGiftSkuByExchangeGiftIdResponse) Error added in v1.1.1

func (QueryGiftSkuByExchangeGiftIdResponse) IsError added in v1.1.1

Jump to

Keyboard shortcuts

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