vender

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAuthForVenderId

func CheckAuthForVenderId(req *CheckAuthForVenderIdRequest) (bool, error)

func CommonQuery

func CommonQuery(req *CommonQueryRequest) (string, error)

通过组件化的方式,提供相关统一的查询方式

func GetVenderStatus

func GetVenderStatus(req *GetVenderStatusRequest) (uint, error)

TODO 查询会员体系状态

func SyncBind

func SyncBind(req *SyncBindRequest) (bool, error)

Types

type AuthResult

type AuthResult struct {
	Success bool `json:"success,omitempty" codec:"success,omitempty"`
	Auth    bool `json:"auth,omitempty" codec:"auth,omitempty"`
}

type BasicVenderInfo

type BasicVenderInfo struct {
	Id         uint64 `json:"id,omitempty" codec:"id,omitempty"`
	Status     int    `json:"status,omitempty" codec:"status,omitempty"`
	ShopName   string `json:"shopName,omitempty" codec:"shopName,omitempty"`
	ShopId     uint64 `json:"shopId,omitempty" codec:"shopId,omitempty"`
	VenderCode string `json:"venderCode,omitempty" codec:"venderCode,omitempty"`
	VenderType uint8  `json:"venderType,omitempty" codec:"venderType,omitempty"` // 1为自营,0为pop
}

func GetBasicVenderInfo

func GetBasicVenderInfo(req *GetBasicVenderInfoRequest) (*BasicVenderInfo, error)

店铺信息查询

type BasicVenderInfoResult

type BasicVenderInfoResult struct {
	Success       bool             `json:"success,omitempty" codec:"success,omitempty"`
	ErrorCode     string           `json:"errorCode,omitempty" codec:"errorCode,omitempty"`
	ErrorMsg      string           `json:"errorMsg,omitempty" codec:"errorMsg,omitempty"`
	TotalNum      int              `json:"totalNum,omitempty" codec:"totalNum,omitempty"`
	VenderBasicVO *BasicVenderInfo `json:"venderBasicVO,omitempty" codec:"venderBasicVO,omitempty"`
}

type CardMemberInfo

type CardMemberInfo struct {
	Birthday      string `json:"birthday,omitempty" codec:"birthday,omitempty"`           // 出生日期(yyyy-MM-dd)
	CustomerType  uint8  `json:"customerType,omitempty" codec:"customerType,omitempty"`   // 1	会员类型(1-注册已完成;2-绑定;3-注册未完成;4-待激活;5-审核中;6-待购卡)
	Status        uint8  `json:"status,omitempty" codec:"status,omitempty"`               // 1	状态(0-无效;1-有效;2-解绑中;3-已解绑)
	Extend        string `json:"extend,omitempty" codec:"extend,omitempty"`               // 1	状态(0-无效;1-有效;2-解绑中;3-已解绑)
	CustomerLevel uint8  `json:"customerLevel,omitempty" codec:"customerLevel,omitempty"` // 1	会员等级(1-一等级;2-二等级;3-三等级;4-四等级;5-五等级)
	VenderId      uint64 `json:"venderId,omitempty" codec:"venderId,omitempty"`           // 商家ID
	City          string `json:"city,omitempty" codec:"city,omitempty"`                   // 城市
	CardNo        string `json:"cardNo,omitempty" codec:"cardNo,omitempty"`               // 会员卡号
	PhoneNo       string `json:"phoneNo,omitempty" codec:"phoneNo,omitempty"`             // 手机号
	Province      string `json:"province,omitempty" codec:"province,omitempty"`           // 省份
	Street        string `json:"street,omitempty" codec:"street,omitempty"`               // 街道
	CustomerPin   string `json:"customerPin,omitempty" codec:"customerPin,omitempty"`     // 京东用户PIN
	Gender        string `json:"gender,omitempty" codec:"gender,omitempty"`               // 性别(0-女; 1-男; 3-未知)
	Channel       uint   `json:"channel,omitempty" codec:"channel,omitempty"`             // 601	渠道码(101-卡包;102-店铺首页;103-app支付完成页;。。。601-ISV服务;999-默认渠道;888-CRM-SHOP)
}

func GetCustomerBasicInfo

func GetCustomerBasicInfo(req *GetCustomerBasicInfoRequest) (*CardMemberInfo, error)

type CheckAuthForVenderIdRequest

type CheckAuthForVenderIdRequest struct {
	api.BaseRequest
	PermCode string `json:"permCode"`
}

type CheckAuthForVenderIdResponse

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

type CheckAuthForVenderIdSubResponse

type CheckAuthForVenderIdSubResponse struct {
	Code      string      `json:"code,omitempty" codec:"code,omitempty"`
	ErrorDesc string      `json:"error_description,omitempty" codec:"error_description,omitempty"`
	Result    *AuthResult `json:"AuthResult,omitempty" codec:"AuthResult,omitempty"`
}

type CommonQueryRequest

type CommonQueryRequest struct {
	api.BaseRequest
	Method    string `json:"method,omitempty" codec:"method,omitempty"`
	InputPara string `json:"input_para,omitempty" codec:"input_para,omitempty"`
}

type CommonQueryResponse

type CommonQueryResponse struct {
	ErrorResp *api.ErrorResponnse     `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *CommonQuerySubResponse `json:"jingdong_data_vender_common_query_responce,omitempty" codec:"jingdong_data_vender_common_query_responce,omitempty"`
}

type CommonQueryResult

type CommonQueryResult struct {
	Wjunionid        string `json:"wjunionid,omitempty" codec:"wjunionid,omitempty"`
	SaleOrdId        string `json:"sale_ord_id,omitempty" codec:"sale_ord_id,omitempty"`
	ItemId           string `json:"item_id,omitempty" codec:"item_id,omitempty"`
	SkuType          string `json:"sku_type,omitempty" codec:"sku_type,omitempty"`
	OpTime           string `json:"op_time,omitempty" codec:"op_time,omitempty"`
	NewbuyPinFlag    string `json:"newbuy_pin_flag,omitempty" codec:"newbuy_pin_flag,omitempty"`
	VenderId         string `json:"vender_id,omitempty" codec:"vender_id,omitempty"`
	ShopId           string `json:"shop_id,omitempty" codec:"shop_id,omitempty"`
	ServiceType      string `json:"service_type,omitempty" codec:"service_type,omitempty"`
	OpTimeStamp      uint64 `json:"op_time_stamp,omitempty" codec:"op_time_stamp,omitempty"`
	AfterPrefrAmount string `json:"after_prefr_amount,omitempty" codec:"after_prefr_amount,omitempty"`
	ItemSkuId        string `json:"item_sku_id,omitempty" codec:"item_sku_id,omitempty"`
	BucketNum500     string `json:"bucket_num_500,omitempty" codec:"bucket_num_500,omitempty"`
	Appkey           string `json:"appkey,omitempty" codec:"appkey,omitempty"`
	SaleOrdTm        string `json:"sale_ord_tm,omitempty" codec:"sale_ord_tm,omitempty"`
	OrderState       string `json:"order_state,omitempty" codec:"order_state,omitempty"`
	ParentSaleOrdId  string `json:"parent_sale_ord_id,omitempty" codec:"parent_sale_ord_id,omitempty"`
}

type CommonQuerySecResponse

type CommonQuerySecResponse struct {
	Code   int    `json:"code,omitempty" codec:"code,omitempty"`
	Msg    string `json:"msg,omitempty" codec:"msg,omitempty"`
	Result string `json:"result,omitempty" codec:"result,omitempty"`
}

type CommonQuerySubResponse

type CommonQuerySubResponse struct {
	Code      string                  `json:"code,omitempty" codec:"code,omitempty"`
	ErrorDesc string                  `json:"error_description,omitempty" codec:"error_description,omitempty"`
	Response  *CommonQuerySecResponse `json:"response,omitempty" codec:"response,omitempty"`
}

type GetBasicVenderInfoRequest

type GetBasicVenderInfoRequest struct {
	api.BaseRequest
	ColNames []string `json:"colNames,omitempty" codec:"colNames,omitempty"`
	Source   int      `json:"source" codec:"source"`
}

type GetBasicVenderInfoResponse

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

type GetBasicVenderInfoResult

type GetBasicVenderInfoResult struct {
	Code      string                 `json:"code,omitempty" codec:"code,omitempty"`
	ErrorDesc string                 `json:"error_description,omitempty" codec:"error_description,omitempty"`
	Result    *BasicVenderInfoResult `json:"getbasicvenderinfobyvenderid_result,omitempty" codec:"getbasicvenderinfobyvenderid_result,omitempty"`
}

type GetCustomerBasicInfoData

type GetCustomerBasicInfoData struct {
	Result *GetCustomerResult `json:"returnResult,omitempty" codec:"returnResult,omitempty"`
}

type GetCustomerBasicInfoRequest

type GetCustomerBasicInfoRequest struct {
	api.BaseRequest
	Pin string `json:"pin"`
}

type GetCustomerBasicInfoResponse

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

type GetCustomerResult

type GetCustomerResult struct {
	Desc string          `json:"desc,omitempty" codec:"desc,omitempty"`
	Code string          `json:"code,omitempty" codec:"code,omitempty"`
	Info *CardMemberInfo `json:"data,omitempty" codec:"data,omitempty"`
}

type GetMemberLevelData

type GetMemberLevelData struct {
	ReturnType *MemberLevelReturnType `json:"returnType,omitempty" codec:"returnType,omitempty"`
}

type GetMemberLevelRequest

type GetMemberLevelRequest struct {
	api.BaseRequest
	CustomerPin string
}

type GetMemberLevelResponse

type GetMemberLevelResponse struct {
	ErrorResp *api.ErrorResponnse `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *GetMemberLevelData `json:"jingdong_pop_vender_getMemberLevel_responce,omitempty" codec:"jingdong_pop_vender_getMemberLevel_responce,omitempty"`
}

type GetVenderLevelRuleData

type GetVenderLevelRuleData struct {
	ReturnType *GetVenderLevelRuleReturnType `json:"returnType,omitempty" codec:"returnType,omitempty"`
}

type GetVenderLevelRuleRequest

type GetVenderLevelRuleRequest struct {
	api.BaseRequest
}

type GetVenderLevelRuleResponse

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

type GetVenderLevelRuleReturnType

type GetVenderLevelRuleReturnType struct {
	Desc string              `json:"desc,omitempty" codec:"desc,omitempty"`
	Code string              `json:"code,omitempty" codec:"code,omitempty"`
	List []*ShopLevelRuleDTO `json:"shopLevelRuleDTOList,omitempty" codec:"shopLevelRuleDTOList,omitempty"`
}

type GetVenderStatusData

type GetVenderStatusData struct {
	ReturnType *VenderStatusReturnType `json:"returnType,omitempty" codec:"returnType,omitempty"`
}

type GetVenderStatusRequest

type GetVenderStatusRequest struct {
	api.BaseRequest
}

type GetVenderStatusResponse

type GetVenderStatusResponse struct {
	ErrorResp *api.ErrorResponnse  `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *GetVenderStatusData `json:"jingdong_pop_vender_getVenderStatus_responce,omitempty" codec:"jingdong_pop_vender_getVenderStatus_responce,omitempty"`
}

type MemberLevelInfo

type MemberLevelInfo struct {
	LevelAtShop        uint8   `json:"levelAtShop,omitempty" codec:"levelAtShop,omitempty"`               //等级
	AvgOrderPrice      float64 `json:"avgOrderPrice,omitempty" codec:"avgOrderPrice,omitempty"`           //平均客单价
	RefundOrderCount   uint64  `json:"refundOrderCount,omitempty" codec:"refundOrderCount,omitempty"`     //退单次数
	TotalGoodsCount    uint64  `json:"totalGoodsCount,omitempty" codec:"totalGoodsCount,omitempty"`       //商品数量
	ChangedOrderCount  uint64  `json:"changedOrderCount,omitempty" codec:"changedOrderCount,omitempty"`   //换货次数
	CustomerPin        string  `json:"customerPin,omitempty" codec:"customerPin,omitempty"`               //客户pin
	CanceledOrderCount uint64  `json:"canceledOrderCount,omitempty" codec:"canceledOrderCount,omitempty"` //取消订单数
	RefundOrderPrice   float64 `json:"refundOrderPrice,omitempty" codec:"refundOrderPrice,omitempty"`     //退换货金额
	VenderId           uint64  `json:"venderId,omitempty" codec:"venderId,omitempty"`                     //商家Id
	LevelAtShopName    string  `json:"levelAtShopName,omitempty" codec:"levelAtShopName,omitempty"`       //等级名称
	TotalOrderPrice    float64 `json:"totalOrderPrice,omitempty" codec:"totalOrderPrice,omitempty"`       //订单总价格
	TotalOrderCount    uint64  `json:"totalOrderCount,omitempty" codec:"totalOrderCount,omitempty"`       //订单总数量
	NickName           string  `json:"nickName,omitempty" codec:"nickName,omitempty"`                     //用户昵称
	BindingTime        string  `json:"bindingTime,omitempty" codec:"bindingTime,omitempty"`               //绑定时间
	BindingType        uint8   `json:"bindingType,omitempty" codec:"bindingType,omitempty"`               //绑定类型
}

func GetMemberLevel

func GetMemberLevel(req *GetMemberLevelRequest) (*MemberLevelInfo, error)

TODO 查询会员等级及会员信息 交易数据 T+1 更新

type MemberLevelReturnType

type MemberLevelReturnType struct {
	Desc string           `json:"desc,omitempty" codec:"desc,omitempty"`
	Code string           `json:"code,omitempty" codec:"code,omitempty"`
	Info *MemberLevelInfo `json:"memberLevelInfo,omitempty" codec:"memberLevelInfo,omitempty"`
}

type ShopInfo

type ShopInfo struct {
	VenderId         uint64 `json:"vender_id,omitempty" codec:"vender_id,omitempty"`
	ShopId           uint64 `json:"shop_id,omitempty" codec:"shop_id,omitempty"`
	ShopName         string `json:"shop_name,omitempty" codec:"shop_name,omitempty"`
	OpenTime         int64  `json:"open_time,omitempty" codec:"open_time,omitempty"`
	LogoUrl          string `json:"logo_url,omitempty" codec:"logo_url,omitempty"`
	Brief            string `json:"brief,omitempty" codec:"brief,omitempty"`
	CategoryMain     int    `json:"category_main,omitempty" codec:"category_main,omitempty"`
	CategoryMainName string `json:"category_main_name,omitempty" codec:"category_main_name,omitempty"`
	ColType          uint8  `json:"col_type" codec:"col_type"` // 商家类型: 0:SOP 1:FBP 2:LBP 5:SOPL
	OpenTimeStr      string `json:"open_time_str,omitempty" codec:"open_time_str,omitempty"`
}

func ShopQuery

func ShopQuery(req *ShopQueryRequest) (*ShopInfo, error)

店铺信息查询

type ShopLevelRuleDTO

type ShopLevelRuleDTO struct {
	VenderId          int64  `json:"venderId,omitempty" codec:"venderId,omitempty"`                   //商家id
	CustomerLevel     int64  `json:"customerLevel,omitempty" codec:"customerLevel,omitempty"`         //店铺会员等级
	CustomerLevelName string `json:"customerLevelName,omitempty" codec:"customerLevelName,omitempty"` //店铺会员名称
	MinOrderPrice     int64  `json:"minOrderPrice,omitempty" codec:"minOrderPrice,omitempty"`         //满足该级别的最低订单额
	MaxOrderPrice     int64  `json:"maxOrderPrice,omitempty" codec:"maxOrderPrice,omitempty"`         //满足该级别的最高订单额
	MinOrderCount     int64  `json:"minOrderCount,omitempty" codec:"minOrderCount,omitempty"`         //满足该级别的最低订单量
	MaxOrderCount     int64  `json:"maxOrderCount,omitempty" codec:"maxOrderCount,omitempty"`         //满足该级别的最高订单量
}

func GetVenderLevelRule

func GetVenderLevelRule(req *GetVenderLevelRuleRequest) ([]*ShopLevelRuleDTO, error)

TODO 获取店铺等级体系规则

type ShopQueryRequest

type ShopQueryRequest struct {
	api.BaseRequest
}

type ShopQueryResponse

type ShopQueryResponse struct {
	ErrorResp *api.ErrorResponnse   `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *ShopQuerySubResponse `json:"jingdong_vender_shop_query_responce,omitempty" codec:"jingdong_vender_shop_query_responce,omitempty"`
}

type ShopQuerySubResponse

type ShopQuerySubResponse struct {
	Code          string    `json:"code,omitempty" codec:"code,omitempty"`
	ErrorDesc     string    `json:"error_description,omitempty" codec:"error_description,omitempty"`
	ShopJosResult *ShopInfo `json:"shop_jos_result,omitempty" codec:"shop_jos_result,omitempty"`
}

type SyncBindData

type SyncBindData struct {
	Code      string      `json:"code,omitempty" codec:"code,omitempty"`
	ErrorDesc string      `json:"error_description,omitempty" codec:"error_description,omitempty"`
	Result    *SyncResult `json:"returnResult,omitempty" codec:"returnResult,omitempty"`
}

type SyncBindRequest

type SyncBindRequest struct {
	api.BaseRequest
	Birthday      string `json:"birthday,omitempty" codec:"birthday,omitempty"`           // 出生日期(yyyy-MM-dd)
	Gender        string `json:"gender,omitempty" codec:"gender,omitempty"`               // 性别(0-女; 1-男; 3-未知)
	City          string `json:"city,omitempty" codec:"city,omitempty"`                   // 城市
	Channel       uint16 `json:"channel,omitempty" codec:"channel,omitempty"`             // 渠道码(101-卡包;102-店铺首页;103-app支付完成页;601-ISV服务;999-默认渠道;888-CRM-SHOP)
	CardNo        string `json:"cardNo,omitempty" codec:"cardNo,omitempty"`               // 会员卡号
	PhoneNo       string `json:"phoneNo,omitempty" codec:"phoneNo,omitempty"`             // 手机号
	CustomerLevel uint8  `json:"customerLevel,omitempty" codec:"customerLevel,omitempty"` // 会员等级(1-一等级;2-二等级;3-三等级;4-四等级;5-五等级)
	Extend        string `json:"extend,omitempty" codec:"extend,omitempty"`               // 扩展字段,Json数据;存储姓名、称谓、邮箱、密码等非必须字段
	CustomerType  uint8  `json:"customerType,omitempty" codec:"customerType,omitempty"`   // 会员类型(1-注册已完成;2-绑定;3-注册未完成;4-待激活;5-审核中;6-待购卡)
	Province      string `json:"province,omitempty" codec:"province,omitempty"`           // 省份
	Street        string `json:"street,omitempty" codec:"street,omitempty"`               // 街道
	CustomerPin   string `json:"customerPin,omitempty" codec:"customerPin,omitempty"`     // 京东用户PIN
	Status        uint8  `json:"status,omitempty" codec:"status,omitempty"`               // 状态(0-无效;1-有效;2-解绑中;3-已解绑)
}

type SyncBindResponse

type SyncBindResponse struct {
	ErrorResp *api.ErrorResponnse `json:"error_response,omitempty" codec:"error_response,omitempty"`
	Data      *SyncBindData       `json:"jingdong_pop_vender_syncBind_responce,omitempty" codec:"jingdong_pop_vender_syncBind_responce,omitempty"`
}

type SyncResult

type SyncResult struct {
	Desc string `json:"desc,omitempty" codec:"desc,omitempty"`
	Data bool   `json:"data,omitempty" codec:"data,omitempty"`
	Code string `json:"code,omitempty" codec:"code,omitempty"`
}

type VenderStatusReturnType

type VenderStatusReturnType struct {
	Status uint   `json:"status"` //会员体系状态:0:未开启状态;1:ISV计算;2:官方计算
	Code   string `json:"code"`   //200:成功,201:信息不存在,400:参数错误,500:系统错误
	Desc   string `json:"desc"`   //成功,信息不存在,参数错误,服务端异常
}

Jump to

Keyboard shortcuts

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