Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
Y
yc-sdk-golang
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
赵雪如
yc-sdk-golang
Commits
49fe35f8
提交
49fe35f8
authored
3月 18, 2022
作者:
赵雪如
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sdk-seller
上级
f7462db5
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
266 行增加
和
0 行删除
+266
-0
bond.go
sdk/bond.go
+16
-0
bond_model.go
sdk/bond_model.go
+8
-0
seller.go
sdk/seller.go
+132
-0
seller_model.go
sdk/seller_model.go
+110
-0
没有找到文件。
sdk/bond.go
浏览文件 @
49fe35f8
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
}
sdk/bond_model.go
0 → 100644
浏览文件 @
49fe35f8
package
sdk
type
GetSellerCatBondRes
struct
{
commonRes
Data
struct
{
Bond
int
`json:"bond"`
}
`json:"data"`
}
\ No newline at end of file
sdk/seller.go
浏览文件 @
49fe35f8
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
}
sdk/seller_model.go
0 → 100644
浏览文件 @
49fe35f8
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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论