提交 49fe35f8 authored 作者: 赵雪如's avatar 赵雪如

sdk-seller

上级 f7462db5
package sdk
import "encoding/json"
//保证金
//根据商户选择的类目获取最大保证金
func (c *Client)GetSellerCatBond(req map[string]interface{})(res *GetSellerCatBondRes, err error) {
method := "/local/bond/GetSellerCatBond"
param := req
data, _ := json.Marshal(param)
resData, err := c.Get(method, string(data))
if err != nil {
return
}
err = json.Unmarshal(resData, &res)
return
}
package sdk
type GetSellerCatBondRes struct {
commonRes
Data struct{
Bond int `json:"bond"`
} `json:"data"`
}
\ No newline at end of file
package sdk
import "encoding/json"
//店铺商家
//保存店铺
func (c *Client)SaveShopInfo(req map[string]interface{})(res *commonRes, err error) {
method := "/local/shop/info"
param := req
data, _ := json.Marshal(param)
resData, err := c.Post(method, string(data))
if err != nil {
return
}
err = json.Unmarshal(resData, &res)
return
}
//获取店铺信息
func (c *Client)GetShopInfo(req map[string]interface{})(res *ShopInfoRes, err error) {
method := "/local/shop/info"
param := req
data, _ := json.Marshal(param)
resData, err := c.Get(method, string(data))
if err != nil {
return
}
err = json.Unmarshal(resData, &res)
return
}
//审核店铺
func (c *Client) CheckSeller(req map[string]interface{})(res *commonRes, err error) {
method := "/local/sys/seller/apply"
param := req
data, _ := json.Marshal(param)
resData, err := c.Post(method, string(data))
if err != nil {
return
}
err = json.Unmarshal(resData, &res)
return
}
//sys商家列表
func (c *Client)GetSellerList(req map[string]interface{})(res *GetSellerListRes, err error) {
method := "/local/sys/shop/info"
param := req
data, _ := json.Marshal(param)
resData, err := c.Get(method, string(data))
if err != nil {
return
}
err = json.Unmarshal(resData, &res)
return
}
//获取商家审核列表
func (c *Client)GetSellerApplyList(req map[string]interface{})(res *GetSellerApplyListRes, err error) {
method := "/local/sys/seller/apply"
param := req
data, _ := json.Marshal(param)
resData, err := c.Get(method, string(data))
if err != nil {
return
}
err = json.Unmarshal(resData, &res)
return
}
//商户权限设置
func (c *Client)SetShopAuth(req map[string]interface{})(res *commonRes, err error) {
method := "/local/SetShopAuth"
param := req
data, _ := json.Marshal(param)
resData, err := c.Post(method, string(data))
if err != nil {
return
}
err = json.Unmarshal(resData, &res)
return
}
//入驻类目资质列表
func (c *Client)GetQualificationList(req map[string]interface{})(res *GetQualificationListRes, err error) {
method := "/local/qualification/list"
param := req
data, _ := json.Marshal(param)
resData, err := c.Get(method, string(data))
if err != nil {
return
}
err = json.Unmarshal(resData, &res)
return
}
//商户渠道修改
func (c *Client)UpdateSellerChannel(req map[string]interface{})(res *commonRes, err error) {
method := "/local/seller/updateSellerChannel"
param := req
data, _ := json.Marshal(param)
resData, err := c.Post(method, string(data))
if err != nil {
return
}
err = json.Unmarshal(resData, &res)
return
}
//通过商户id批量获取店铺名称
func (c *Client)GetSellerById(req map[string]interface{})(res *GetSellerByIdRes, err error) {
method := "/local/seller/getSellerById"
param := req
data, _ := json.Marshal(param)
resData, err := c.Post(method, string(data))
if err != nil {
return
}
err = json.Unmarshal(resData, &res)
return
}
package sdk
type ShopInfoRes struct {
commonRes
Data ShopInfo `json:"data"`
}
type ShopInfo struct {
SsoId int `json:"sso_id"`
SellerId int `json:"seller_id"` // 商家id
UserName string `json:"user_name"`
StoreName string `json:"store_name"`
EmergencyName string `json:"emergency_name"`
EmergencyTel string `json:"emergency_tel"`
ShopLogo string `json:"shop_logo"`
IsBusinessExperience int `json:"is_business_experience"`
BusinessAuth string `json:"business_auth"`
State int `json:"state"`
Scope string `json:"scope"`
ScopeName string `json:"scope_name"`
Apply *SellerApply `json:"Apply"`
CollectNum int `json:"collect_num"`
IsAllowWithdraw int `json:"is_allow_withdraw"`
IsBlack int `json:"is_black"`
IsWhite int `json:"is_white"`
ShelfLifeStart int `json:"shelf_life_start"`
ShelfLifeEnd int `json:"shelf_life_end"`
Bond int `json:"bond"`
FrozenBond int `json:"frozen_bond"`
IsTakeBond int `json:"is_take_bond"`
IsServiceFee int `json:"is_service_fee"`
CateBond int `json:"cate_bond"`
Qualification []QualificationAuth `json:"qualification"`
*ShopStatisticRes
}
type SellerApply struct {
Id int `json:"id"` //
SellerId int `json:"seller_id"` // 商家ID
ApplyName string `json:"apply_name"` // 审核人
Status int `json:"status"` // 状态 1成功 3拒审
Content string `json:"content"` // 审核内容
CreatedTime int `json:"created_time"` // 创建时间
}
type QualificationAuth struct {
Id int `json:"id"`
Content string `json:"content"`
Url string `json:"url"`
}
type ShopStatisticRes struct {
DelayDeliveryRate float64 `json:"delay_delivery_rate"`
AfterSaleRate float64 `json:"after_sale_rate"`
OrderNums int `json:"order_nums"`
GoodsNums int `json:"goods_nums"`
}
type GetSellerListRes struct {
commonRes
Data struct{
Count int `json:"count"`
Data []GetSellerList `json:"data"`
} `json:"data"`
}
type GetSellerList struct {
SellerId int `json:"seller_id"` // 商家id
StoreName string `json:"store_name"`
EmergencyName string `json:"emergency_name"`
Mobile string `json:"mobile"`
State int `json:"state"`
Bond int `json:"bond"`
FrozenBond int `json:"frozen_bond"`
AddTime int `json:"add_time"`
ShopLogo string `json:"shop_logo"`
IsSafeMoney int `json:"is_safe_money"`
ActiveTime int `json:"active_time"`
BrandNum int `json:"brand_num"`
GoodsNum int `json:"goods_num"`
ChannelName string `json:"channel_name"`
ChannelId int `json:"channel_id"`
}
type GetSellerApplyListRes struct {
commonRes
Data []SellerApply `json:"data"`
}
type GetQualificationListRes struct {
commonRes
Data []SpecicalQualification `json:"data"`
}
type SpecicalQualification struct {
Id int `json:"id"`
Content string `json:"content"`
Url string `json:"url"`
}
type GetSellerByIdRes struct {
commonRes
Data []GetSellerById `json:"data"`
}
type GetSellerById struct {
SellerId int `json:"seller_id"`
StoreName string `json:"store_name"`
ChannelId int `json:"channel_id"`
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论