Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
L
library
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
stbz
library
Commits
302cdf66
提交
302cdf66
authored
5月 21, 2025
作者:
屈传平
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wangdaintong
上级
cb5d7f7b
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
1178 行增加
和
0 行删除
+1178
-0
wdt.go
upstream/wangdiantong/wdt.go
+136
-0
wdt_goods.go
upstream/wangdiantong/wdt_goods.go
+112
-0
wdt_order.go
upstream/wangdiantong/wdt_order.go
+582
-0
wdt_refund.go
upstream/wangdiantong/wdt_refund.go
+300
-0
wdt_shop.go
upstream/wangdiantong/wdt_shop.go
+48
-0
没有找到文件。
upstream/wangdiantong/wdt.go
0 → 100644
浏览文件 @
302cdf66
package
wangdiantong
import
(
"context"
"crypto/md5"
"encoding/hex"
"fmt"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/os/gtime"
"github.com/gogf/gf/util/gconv"
"net/url"
"sort"
"strings"
"time"
"unicode/utf8"
)
type
wangDianTong
struct
{
Config
*
Config
}
// 旺店通多例版本
const
pkgName
=
"wandiantong"
type
Config
struct
{
Sid
string
Appkey
string
AppSecret
string
ApiUrl
string
}
func
New
(
req
*
Config
)
*
wangDianTong
{
WangdianTong
:=
new
(
wangDianTong
)
WangdianTong
.
Config
=
req
return
WangdianTong
}
func
packData
(
req
map
[
string
]
interface
{})
string
{
// 1. 提取并排序键名
keys
:=
make
([]
string
,
0
,
len
(
req
))
for
k
:=
range
req
{
if
k
==
"sign"
{
continue
}
keys
=
append
(
keys
,
k
)
}
sort
.
Strings
(
keys
)
// 2. 使用 strings.Builder 高效拼接字符串
var
builder
strings
.
Builder
// 3. 遍历排序后的键
for
i
,
key
:=
range
keys
{
val
:=
req
[
key
]
// 非首个元素时添加分隔符
if
i
>
0
{
builder
.
WriteString
(
";"
)
}
// 4. 处理键部分
keyLen
:=
utf8
.
RuneCountInString
(
key
)
builder
.
WriteString
(
fmt
.
Sprintf
(
"%02d-"
,
keyLen
))
builder
.
WriteString
(
key
)
builder
.
WriteString
(
":"
)
// 5. 处理值部分
valLen
:=
utf8
.
RuneCountInString
(
gconv
.
String
(
val
))
builder
.
WriteString
(
fmt
.
Sprintf
(
"%04d-"
,
valLen
))
builder
.
WriteString
(
gconv
.
String
(
val
))
}
return
builder
.
String
()
}
// 带错误处理的增强版本
func
makeSignSecure
(
req
map
[
string
]
interface
{},
appSecret
string
)
map
[
string
]
interface
{}
{
data
:=
packData
(
req
)
if
data
==
""
{
return
req
}
combined
:=
data
+
appSecret
hash
:=
md5
.
Sum
([]
byte
(
combined
))
req
[
"sign"
]
=
hex
.
EncodeToString
(
hash
[
:
])
return
req
}
// 除空数组
func
deleteZeroValues
(
req
map
[
string
]
interface
{})
map
[
string
]
interface
{}
{
param
:=
g
.
Map
{}
for
k
,
v
:=
range
req
{
if
gconv
.
String
(
v
)
!=
""
{
param
[
k
]
=
v
}
}
return
param
}
func
(
s
*
wangDianTong
)
post
(
ctx
context
.
Context
,
method
string
,
req
interface
{})
(
res
string
,
err
error
)
{
Start
:=
gtime
.
TimestampMilli
()
reqMap
:=
gconv
.
Map
(
req
)
reqMap
[
"sid"
]
=
s
.
Config
.
Sid
reqMap
[
"appkey"
]
=
s
.
Config
.
Appkey
reqMap
[
"timestamp"
]
=
time
.
Now
()
.
Unix
()
reqMap
=
deleteZeroValues
(
reqMap
)
reqMap
=
makeSignSecure
(
reqMap
,
s
.
Config
.
AppSecret
)
param
:=
gjson
.
New
(
reqMap
)
Url
:=
s
.
Config
.
ApiUrl
+
method
Request
:=
g
.
Client
()
Request
.
SetHeader
(
"Content-Type"
,
"application/x-www-form-urlencoded"
)
Request
.
SetHeader
(
"Content-length"
,
fmt
.
Sprintf
(
"%d"
,
len
(
param
.
MustToJsonString
())))
postData
:=
url
.
Values
{}
for
k
,
v
:=
range
param
.
Map
()
{
postData
.
Add
(
k
,
gconv
.
String
(
v
))
}
encoded
:=
postData
.
Encode
()
resp
,
err
:=
Request
.
Timeout
(
time
.
Second
*
10
)
.
Post
(
Url
,
encoded
)
defer
func
()
{
_
=
resp
.
Close
()
ctx
=
context
.
WithValue
(
ctx
,
"Method"
,
"POST"
)
ctx
=
context
.
WithValue
(
ctx
,
"URI"
,
Url
)
if
err
!=
nil
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Cat
(
"error"
)
.
Infof
(
"参数【%v】错误【%v】响应时间【%v ms】"
,
param
.
MustToJsonString
(),
err
.
Error
(),
gtime
.
TimestampMilli
()
-
Start
)
}
else
{
g
.
Log
()
.
Ctx
(
ctx
)
.
Cat
(
pkgName
)
.
Infof
(
"参数【%v】响应【%v】响应时间【%v ms】"
,
param
.
MustToJsonString
(),
res
,
gtime
.
TimestampMilli
()
-
Start
)
}
}()
res
=
resp
.
ReadAllString
()
return
}
upstream/wangdiantong/wdt_goods.go
0 → 100644
浏览文件 @
302cdf66
package
wangdiantong
import
(
"context"
"github.com/gogf/gf/encoding/gjson"
)
type
GoodsListReq
struct
{
SpecNo
string
`json:"spec_no"`
GoodsNo
string
`json:"goods_no"`
BrandNo
string
`json:"brand_no"`
ClassName
string
`json:"class_name"`
Barcode
string
`json:"barcode"`
StartTime
string
`json:"start_time"`
EndTime
string
`json:"end_time"`
PageSize
string
`json:"page_size"`
PageNo
string
`json:"page_no"`
}
type
GoodsListRes
struct
{
Code
int
`json:"code"`
Message
string
`json:"message"`
TotalCount
string
`json:"total_count"`
GoodsList
[]
struct
{
GoodsId
string
`json:"goods_id"`
GoodsNo
string
`json:"goods_no"`
GoodsName
string
`json:"goods_name"`
ShortName
string
`json:"short_name"`
Alias
string
`json:"alias"`
GoodsType
string
`json:"goods_type"`
SpecCount
string
`json:"spec_count"`
Pinyin
string
`json:"pinyin"`
BrandNo
string
`json:"brand_no"`
BrandName
string
`json:"brand_name"`
Remark
string
`json:"remark"`
Prop1
string
`json:"prop1"`
Prop2
string
`json:"prop2"`
Prop3
string
`json:"prop3"`
Prop4
string
`json:"prop4"`
Prop5
string
`json:"prop5"`
Prop6
string
`json:"prop6"`
Origin
string
`json:"origin"`
ClassName
string
`json:"class_name"`
ClassId
string
`json:"class_id"`
UnitName
interface
{}
`json:"unit_name"`
AuxUnitName
interface
{}
`json:"aux_unit_name"`
FlagName
interface
{}
`json:"flag_name"`
GoodsCreated
string
`json:"goods_created"`
GoodsModified
string
`json:"goods_modified"`
SpecList
[]
struct
{
SpecId
string
`json:"spec_id"`
GoodsId
string
`json:"goods_id"`
SpecNo
string
`json:"spec_no"`
SpecCode
string
`json:"spec_code"`
Barcode
string
`json:"barcode"`
SpecName
string
`json:"spec_name"`
LowestPrice
string
`json:"lowest_price"`
RetailPrice
string
`json:"retail_price"`
WholesalePrice
string
`json:"wholesale_price"`
MemberPrice
string
`json:"member_price"`
MarketPrice
string
`json:"market_price"`
CustomPrice1
string
`json:"custom_price1"`
CustomPrice2
string
`json:"custom_price2"`
SaleScore
string
`json:"sale_score"`
PackScore
string
`json:"pack_score"`
PickScore
string
`json:"pick_score"`
ValidityDays
string
`json:"validity_days"`
SalesDays
string
`json:"sales_days"`
ReceiveDays
string
`json:"receive_days"`
Weight
string
`json:"weight"`
Length
string
`json:"length"`
Width
string
`json:"width"`
Height
string
`json:"height"`
IsSnEnable
string
`json:"is_sn_enable"`
IsAllowNegStock
string
`json:"is_allow_neg_stock"`
IsNotNeedExamine
string
`json:"is_not_need_examine"`
IsZeroCost
string
`json:"is_zero_cost"`
IsLowerCost
string
`json:"is_lower_cost"`
IsNotUseAir
string
`json:"is_not_use_air"`
TaxRate
string
`json:"tax_rate"`
LargeType
string
`json:"large_type"`
Remark
string
`json:"remark"`
SpecCreated
string
`json:"spec_created"`
SpecModified
string
`json:"spec_modified"`
Prop1
string
`json:"prop1"`
Prop2
string
`json:"prop2"`
Prop3
string
`json:"prop3"`
Prop4
string
`json:"prop4"`
Prop5
string
`json:"prop5"`
Prop6
string
`json:"prop6"`
ImgUrl
string
`json:"img_url"`
SpecAuxUnitName
interface
{}
`json:"spec_aux_unit_name"`
SpecUnitName
interface
{}
`json:"spec_unit_name"`
PlatSpecCount
int
`json:"plat_spec_count"`
}
`json:"spec_list"`
}
`json:"goods_list"`
}
/*
*
商品列表
*/
func
(
s
*
wangDianTong
)
GoodsList
(
ctx
context
.
Context
,
req
*
GoodsListReq
)
(
res
*
GoodsListRes
,
err
error
)
{
result
,
err
:=
s
.
post
(
ctx
,
"/openapi2/goods_query.php"
,
req
)
if
nil
!=
err
{
return
}
err
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
}
upstream/wangdiantong/wdt_order.go
0 → 100644
浏览文件 @
302cdf66
package
wangdiantong
import
(
"context"
"github.com/gogf/gf/encoding/gjson"
)
type
OrderList
struct
{
Oid
string
`json:"oid"`
Status
int
`json:"status"`
RefundStatus
int
`json:"refund_status"`
GoodsId
string
`json:"goods_id"`
SpecId
string
`json:"spec_id"`
GoodsNo
string
`json:"goods_no"`
SpecNo
string
`json:"spec_no"`
GoodsName
string
`json:"goods_name"`
SpecName
string
`json:"spec_name"`
Num
int
`json:"num"`
Price
float64
`json:"price"`
AdjustAmount
float64
`json:"adjust_amount"`
Discount
float64
`json:"discount"`
ShareDiscount
float64
`json:"share_discount"`
Cid
string
`json:"cid"`
}
type
TradeListReq
struct
{
Tid
string
`json:"tid"`
TradeStatus
int
`json:"trade_status"`
DeliveryTerm
int
`json:"delivery_term"`
PayStatus
int
`json:"pay_status"`
TradeTime
string
`json:"trade_time"`
PayTime
string
`json:"pay_time"`
BuyerNick
string
`json:"buyer_nick"`
BuyerEmail
string
`json:"buyer_email"`
ReceiverMobile
string
`json:"receiver_mobile"`
ReceiverTelno
string
`json:"receiver_telno"`
ReceiverZip
string
`json:"receiver_zip"`
ReceiverProvince
string
`json:"receiver_province"`
ReceiverName
string
`json:"receiver_name"`
ReceiverCity
string
`json:"receiver_city"`
ReceiverDistrict
string
`json:"receiver_district"`
ReceiverAddress
string
`json:"receiver_address"`
LogisticsType
int
`json:"logistics_type"`
InvoiceType
int
`json:"invoice_type"`
InvoiceTitle
string
`json:"invoice_title"`
InvoiceContent
string
`json:"invoice_content"`
BuyerMessage
string
`json:"buyer_message"`
CustData
string
`json:"cust_data"`
Remark
string
`json:"remark"`
RemarkFlag
int
`json:"remark_flag"`
PostAmount
float64
`json:"post_amount"`
OtherAmount
float64
`json:"other_amount"`
Paid
float64
`json:"paid"`
CodAmount
int
`json:"cod_amount"`
ExtCodFee
int
`json:"ext_cod_fee"`
OrderList
[]
*
OrderList
`json:"order_list"`
}
type
TradePushReq
struct
{
ShopNo
string
`json:"shop_no"`
Switch
int
`json:"switch"`
TradeList
string
`json:"trade_list"`
}
type
TradePushRes
struct
{
Code
int
`json:"code"`
Message
string
`json:"message"`
NewCount
int
`json:"new_count"`
ChgCount
int
`json:"chg_count"`
}
/*
*
创建原始订单
*/
func
(
s
*
wangDianTong
)
TradePush
(
ctx
context
.
Context
,
req
*
TradePushReq
)
(
res
*
TradePushRes
,
err
error
)
{
result
,
err
:=
s
.
post
(
ctx
,
"/openapi2/trade_push.php"
,
req
)
if
nil
!=
err
{
return
}
err
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
}
type
TradeQueryReq
struct
{
StartTime
string
`json:"start_time"`
EndTime
string
`json:"end_time"`
PageSize
string
`json:"page_size"`
PageNo
string
`json:"page_no"`
Status
string
`json:"status"`
}
type
TradeQueryRes
struct
{
Code
int
`json:"code"`
Message
string
`json:"message"`
TotalCount
int
`json:"total_count"`
StockoutList
[]
struct
{
StockoutId
string
`json:"stockout_id"`
OrderNo
string
`json:"order_no"`
SrcOrderNo
string
`json:"src_order_no"`
WarehouseNo
string
`json:"warehouse_no"`
ConsignTime
string
`json:"consign_time"`
Status
string
`json:"status"`
OrderType
string
`json:"order_type"`
GoodsCount
string
`json:"goods_count"`
GoodsTotalAmount
string
`json:"goods_total_amount"`
GoodsTotalCost
string
`json:"goods_total_cost"`
PostFee
string
`json:"post_fee"`
LogisticsNo
string
`json:"logistics_no"`
PackageFee
string
`json:"package_fee"`
Receivable
string
`json:"receivable"`
ReceiverName
string
`json:"receiver_name"`
ReceiverCountry
string
`json:"receiver_country"`
ReceiverProvince
string
`json:"receiver_province"`
ReceiverCity
string
`json:"receiver_city"`
ReceiverDistrict
string
`json:"receiver_district"`
ReceiverAddress
string
`json:"receiver_address"`
ReceiverMobile
string
`json:"receiver_mobile"`
ReceiverTelno
string
`json:"receiver_telno"`
ReceiverZip
string
`json:"receiver_zip"`
Remark
string
`json:"remark"`
Weight
string
`json:"weight"`
StockoutReason
string
`json:"stockout_reason"`
Subtype
string
`json:"subtype"`
OuterNo
string
`json:"outer_no"`
OperatorName
string
`json:"operator_name"`
LogisticsType
string
`json:"logistics_type"`
LogisticsCode
string
`json:"logistics_code"`
LogisticsName
string
`json:"logistics_name"`
BadReason
string
`json:"bad_reason"`
ReceiverDtb
string
`json:"receiver_dtb"`
PrintRemark
string
`json:"print_remark"`
Paid
string
`json:"paid"`
RefundStatus
string
`json:"refund_status"`
TradeType
string
`json:"trade_type"`
SalesmanNo
string
`json:"salesman_no"`
Fullname
string
`json:"fullname"`
SalesmanName
string
`json:"salesman_name"`
TradeStatus
string
`json:"trade_status"`
WarehouseName
string
`json:"warehouse_name"`
BlockReason
string
`json:"block_reason"`
PrintBatchNo
string
`json:"print_batch_no"`
TradeNo
string
`json:"trade_no"`
SrcTradeNo
string
`json:"src_trade_no"`
NickName
string
`json:"nick_name"`
CustomerNo
string
`json:"customer_no"`
CustomerName
string
`json:"customer_name"`
TradeTime
string
`json:"trade_time"`
PayTime
string
`json:"pay_time"`
FlagName
string
`json:"flag_name"`
PostAmount
string
`json:"post_amount"`
IdCardType
string
`json:"id_card_type"`
IdCard
string
`json:"id_card"`
ReceiverArea
string
`json:"receiver_area"`
ShopName
string
`json:"shop_name"`
ShopNo
string
`json:"shop_no"`
ShopRemark
string
`json:"shop_remark"`
Modified
string
`json:"modified"`
BuyerMessage
string
`json:"buyer_message"`
CsRemark
string
`json:"cs_remark"`
InvoiceType
string
`json:"invoice_type"`
InvoiceTitle
string
`json:"invoice_title"`
InvoiceContent
string
`json:"invoice_content"`
InvoiceId
string
`json:"invoice_id"`
CodAmount
string
`json:"cod_amount"`
DeliveryTerm
string
`json:"delivery_term"`
FenxiaoType
string
`json:"fenxiao_type"`
FenxiaoNick
string
`json:"fenxiao_nick"`
PlatformId
string
`json:"platform_id"`
TradeId
string
`json:"trade_id"`
EmployeeNo
string
`json:"employee_no"`
CheckerName
string
`json:"checker_name"`
Discount
string
`json:"discount"`
SrcTids
string
`json:"src_tids"`
Tax
string
`json:"tax"`
TaxRate
string
`json:"tax_rate"`
Currency
string
`json:"currency"`
Created
string
`json:"created"`
StockCheckTime
string
`json:"stock_check_time"`
PackagerNo
string
`json:"packager_no"`
PackagerName
string
`json:"packager_name"`
PickerNo
string
`json:"picker_no"`
PickerName
string
`json:"picker_name"`
PrinterNo
string
`json:"printer_no"`
PrinterName
string
`json:"printer_name"`
ExaminerNo
string
`json:"examiner_no"`
ExaminerName
string
`json:"examiner_name"`
OrderTypeName
string
`json:"order_type_name"`
ReceiverProvinceCode
string
`json:"receiver_province_code"`
ReceiverCityCode
string
`json:"receiver_city_code"`
ReceiverDistrictCode
string
`json:"receiver_district_code"`
DetailsList
[]
struct
{
RecId
string
`json:"rec_id"`
StockoutId
string
`json:"stockout_id"`
SpecNo
string
`json:"spec_no"`
GoodsCount
string
`json:"goods_count"`
TotalAmount
string
`json:"total_amount"`
Paid
string
`json:"paid"`
SellPrice
string
`json:"sell_price"`
Remark
string
`json:"remark"`
GoodsName
string
`json:"goods_name"`
GoodsNo
string
`json:"goods_no"`
BrandNo
string
`json:"brand_no"`
BrandName
string
`json:"brand_name"`
SpecName
string
`json:"spec_name"`
SpecCode
string
`json:"spec_code"`
CostPrice
string
`json:"cost_price"`
Weight
string
`json:"weight"`
GoodsId
string
`json:"goods_id"`
SpecId
string
`json:"spec_id"`
Prop1
string
`json:"prop1"`
Prop2
string
`json:"prop2"`
Prop3
string
`json:"prop3"`
Prop4
string
`json:"prop4"`
Prop5
string
`json:"prop5"`
Prop6
string
`json:"prop6"`
PlatformId
string
`json:"platform_id"`
RefundStatus
string
`json:"refund_status"`
MarketPrice
string
`json:"market_price"`
Discount
string
`json:"discount"`
ShareAmount
string
`json:"share_amount"`
TaxRate
string
`json:"tax_rate"`
Barcode
string
`json:"barcode"`
UnitName
interface
{}
`json:"unit_name"`
SaleOrderId
string
`json:"sale_order_id"`
SharePost
string
`json:"share_post"`
GiftType
string
`json:"gift_type"`
SrcOid
string
`json:"src_oid"`
SrcTid
string
`json:"src_tid"`
FromMask
string
`json:"from_mask"`
GoodsType
string
`json:"goods_type"`
BatchNo
string
`json:"batch_no"`
SuiteNo
string
`json:"suite_no"`
GoodProp1
string
`json:"good_prop1"`
GoodProp2
string
`json:"good_prop2"`
GoodProp3
string
`json:"good_prop3"`
GoodProp4
string
`json:"good_prop4"`
GoodProp5
string
`json:"good_prop5"`
GoodProp6
string
`json:"good_prop6"`
}
`json:"details_list"`
}
`json:"stockout_list"`
}
/*
*
查询销售出库单
*/
func
(
s
*
wangDianTong
)
TradeQuery
(
ctx
context
.
Context
,
req
*
TradeQueryReq
)
(
res
*
TradeQueryRes
,
err
error
)
{
result
,
err
:=
s
.
post
(
ctx
,
"/openapi2/purchase_order_query.php"
,
req
)
if
nil
!=
err
{
return
}
err
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
}
type
SalesTradeQueryReq
struct
{
Status
string
`json:"status"`
StartTime
string
`json:"start_time"`
EndTime
string
`json:"end_time"`
PageSize
int
`json:"page_size"`
PageNo
int
`json:"page_no"`
//ShopNo string `json:"shop_no"`
//WarehouseNo string `json:"warehouse_no"`
//Goodstax int `json:"goodstax"`
//HasLogisticsNo int `json:"has_logistics_no"`
//IsFuzzy int `json:"is_fuzzy"`
//Src int `json:"src"`
//ShopNos string `json:"shop_nos"`
SrcTid
string
`json:"src_tid"`
}
type
SalesTradeQueryRes
struct
{
Code
int
`json:"code"`
Message
string
`json:"message"`
TotalCount
int
`json:"total_count"`
Trades
[]
struct
{
TradeId
string
`json:"trade_id"`
TradeNo
string
`json:"trade_no"`
PlatformId
string
`json:"platform_id"`
WarehouseType
string
`json:"warehouse_type"`
SrcTids
string
`json:"src_tids"`
PayAccount
string
`json:"pay_account"`
TradeStatus
string
`json:"trade_status"`
ConsignStatus
string
`json:"consign_status"`
TradeType
string
`json:"trade_type"`
DeliveryTerm
string
`json:"delivery_term"`
FreezeReason
string
`json:"freeze_reason"`
RefundStatus
string
`json:"refund_status"`
FenxiaoType
string
`json:"fenxiao_type"`
FenxiaoNick
string
`json:"fenxiao_nick"`
TradeTime
string
`json:"trade_time"`
PayTime
string
`json:"pay_time"`
BuyerNick
string
`json:"buyer_nick"`
ReceiverName
string
`json:"receiver_name"`
ReceiverProvince
string
`json:"receiver_province"`
ReceiverCity
string
`json:"receiver_city"`
ReceiverDistrict
string
`json:"receiver_district"`
ReceiverAddress
string
`json:"receiver_address"`
ReceiverMobile
string
`json:"receiver_mobile"`
ReceiverTelno
string
`json:"receiver_telno"`
ReceiverZip
string
`json:"receiver_zip"`
ReceiverArea
string
`json:"receiver_area"`
ReceiverRing
string
`json:"receiver_ring"`
ReceiverDtb
string
`json:"receiver_dtb"`
ToDeliverTime
string
`json:"to_deliver_time"`
BadReason
string
`json:"bad_reason"`
LogisticsNo
string
`json:"logistics_no"`
BuyerMessage
string
`json:"buyer_message"`
CsRemark
string
`json:"cs_remark"`
RemarkFlag
string
`json:"remark_flag"`
PrintRemark
string
`json:"print_remark"`
GoodsTypeCount
string
`json:"goods_type_count"`
GoodsCount
string
`json:"goods_count"`
GoodsAmount
string
`json:"goods_amount"`
PostAmount
string
`json:"post_amount"`
OtherAmount
string
`json:"other_amount"`
Discount
string
`json:"discount"`
Receivable
string
`json:"receivable"`
DapAmount
string
`json:"dap_amount"`
CodAmount
string
`json:"cod_amount"`
ExtCodFee
string
`json:"ext_cod_fee"`
GoodsCost
string
`json:"goods_cost"`
PostCost
string
`json:"post_cost"`
Paid
string
`json:"paid"`
Weight
string
`json:"weight"`
Profit
string
`json:"profit"`
Tax
string
`json:"tax"`
TaxRate
string
`json:"tax_rate"`
Commission
string
`json:"commission"`
InvoiceType
string
`json:"invoice_type"`
InvoiceTitle
string
`json:"invoice_title"`
InvoiceContent
string
`json:"invoice_content"`
SalesmanId
string
`json:"salesman_id"`
CheckerId
string
`json:"checker_id"`
FcheckerId
string
`json:"fchecker_id"`
CheckouterId
string
`json:"checkouter_id"`
StockoutNo
string
`json:"stockout_no"`
FlagName
string
`json:"flag_name"`
TradeFrom
string
`json:"trade_from"`
SingleSpecNo
string
`json:"single_spec_no"`
RawGoodsCount
string
`json:"raw_goods_count"`
RawGoodsTypeCount
string
`json:"raw_goods_type_count"`
Currency
string
`json:"currency"`
SplitPackageNum
string
`json:"split_package_num"`
InvoiceId
string
`json:"invoice_id"`
VersionId
string
`json:"version_id"`
Modified
string
`json:"modified"`
Created
string
`json:"created"`
IdCardType
string
`json:"id_card_type"`
IdCard
string
`json:"id_card"`
ShopNo
string
`json:"shop_no"`
ShopName
string
`json:"shop_name"`
ShopRemark
string
`json:"shop_remark"`
WarehouseNo
string
`json:"warehouse_no"`
CustomerName
string
`json:"customer_name"`
CustomerNo
string
`json:"customer_no"`
LogisticsId
string
`json:"logistics_id"`
LogisticsName
string
`json:"logistics_name"`
LogisticsCode
string
`json:"logistics_code"`
LogisticsType
string
`json:"logistics_type"`
Fullname
string
`json:"fullname"`
CheckerName
string
`json:"checker_name"`
GoodsList
[]
struct
{
RecId
string
`json:"rec_id"`
TradeId
string
`json:"trade_id"`
SpecId
string
`json:"spec_id"`
PlatformId
string
`json:"platform_id"`
SrcOid
string
`json:"src_oid"`
SuiteId
string
`json:"suite_id"`
SrcTid
string
`json:"src_tid"`
GiftType
string
`json:"gift_type"`
RefundStatus
string
`json:"refund_status"`
GuaranteeMode
string
`json:"guarantee_mode"`
DeliveryTerm
string
`json:"delivery_term"`
BindOid
string
`json:"bind_oid"`
Num
string
`json:"num"`
Price
string
`json:"price"`
ActualNum
string
`json:"actual_num"`
RefundNum
string
`json:"refund_num"`
OrderPrice
string
`json:"order_price"`
SharePrice
string
`json:"share_price"`
Adjust
string
`json:"adjust"`
Discount
string
`json:"discount"`
ShareAmount
string
`json:"share_amount"`
SharePost
string
`json:"share_post"`
Paid
string
`json:"paid"`
GoodsName
string
`json:"goods_name"`
GoodsId
string
`json:"goods_id"`
GoodsNo
string
`json:"goods_no"`
SpecName
string
`json:"spec_name"`
SpecNo
string
`json:"spec_no"`
SpecCode
string
`json:"spec_code"`
SuiteNo
string
`json:"suite_no"`
Flag
string
`json:"flag"`
SuiteName
string
`json:"suite_name"`
SuiteNum
string
`json:"suite_num"`
SuiteAmount
string
`json:"suite_amount"`
SuiteDiscount
string
`json:"suite_discount"`
ApiGoodsName
string
`json:"api_goods_name"`
ApiSpecName
string
`json:"api_spec_name"`
Weight
string
`json:"weight"`
Commission
string
`json:"commission"`
GoodsType
string
`json:"goods_type"`
LargeType
string
`json:"large_type"`
InvoiceType
string
`json:"invoice_type"`
InvoiceContent
string
`json:"invoice_content"`
FromMask
string
`json:"from_mask"`
Cid
string
`json:"cid"`
Remark
string
`json:"remark"`
Modified
string
`json:"modified"`
Created
string
`json:"created"`
PlatformGoodsId
string
`json:"platform_goods_id"`
PlatformSpecId
string
`json:"platform_spec_id"`
Prop2
string
`json:"prop2"`
TaxRate
string
`json:"tax_rate"`
}
`json:"goods_list"`
}
`json:"trades"`
}
/*
*
查询订单管理
*/
func
(
s
*
wangDianTong
)
SalesTradeQuery
(
ctx
context
.
Context
,
req
*
SalesTradeQueryReq
)
(
res
*
SalesTradeQueryRes
,
err
error
)
{
result
,
err
:=
s
.
post
(
ctx
,
"/openapi2/sales_trade_query.php"
,
req
)
if
nil
!=
err
{
return
}
err
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
}
type
SalesApiTradeQueryReq
struct
{
Tid
string
`json:"tid"`
PlatformId
int
`json:"platform_id"`
ShopNo
string
`json:"shop_no"`
StartTime
string
`json:"start_time"`
EndTime
string
`json:"end_time"`
PageNo
int
`json:"page_no"`
PageSize
int
`json:"page_size"`
}
type
SalesApiTradeQueryRes
struct
{
Code
int
`json:"code"`
Message
string
`json:"message"`
TotalCount
string
`json:"total_count"`
TradeList
[]
struct
{
PlatformId
string
`json:"platform_id"`
ShopNo
string
`json:"shop_no"`
Tid
string
`json:"tid"`
ProcessStatus
string
`json:"process_status"`
TradeStatus
string
`json:"trade_status"`
GuaranteeMode
string
`json:"guarantee_mode"`
PayStatus
string
`json:"pay_status"`
DeliveryTerm
string
`json:"delivery_term"`
PayMethod
string
`json:"pay_method"`
RefundStatus
string
`json:"refund_status"`
TradeTime
string
`json:"trade_time"`
PayTime
string
`json:"pay_time"`
BuyerMessage
string
`json:"buyer_message"`
Remark
string
`json:"remark"`
ToDeliverTime
string
`json:"to_deliver_time"`
Receivable
string
`json:"receivable"`
GoodsAmount
string
`json:"goods_amount"`
PostAmount
string
`json:"post_amount"`
OtherAmount
string
`json:"other_amount"`
Discount
string
`json:"discount"`
Paid
string
`json:"paid"`
PlatformCost
string
`json:"platform_cost"`
Received
string
`json:"received"`
DapAmount
string
`json:"dap_amount"`
CodAmount
string
`json:"cod_amount"`
PiAmount
string
`json:"pi_amount"`
RefundAmount
string
`json:"refund_amount"`
LogisticsType
string
`json:"logistics_type"`
InvoiceType
string
`json:"invoice_type"`
InvoiceTitle
string
`json:"invoice_title"`
InvoiceContent
string
`json:"invoice_content"`
TradeFrom
string
`json:"trade_from"`
FenxiaoType
string
`json:"fenxiao_type"`
EndTime
string
`json:"end_time"`
Modified
string
`json:"modified"`
Created
string
`json:"created"`
Currency
string
`json:"currency"`
Score
string
`json:"score"`
GoodsList
[]
struct
{
PlatformId
string
`json:"platform_id"`
Tid
string
`json:"tid"`
Oid
string
`json:"oid"`
Status
string
`json:"status"`
ProcessStatus
string
`json:"process_status"`
RefundStatus
string
`json:"refund_status"`
OrderType
string
`json:"order_type"`
InvoiceType
string
`json:"invoice_type"`
InvoiceContent
string
`json:"invoice_content"`
BindOid
string
`json:"bind_oid"`
GoodsId
string
`json:"goods_id"`
SpecId
string
`json:"spec_id"`
GoodsNo
string
`json:"goods_no"`
SpecNo
string
`json:"spec_no"`
GoodsName
string
`json:"goods_name"`
SpecName
string
`json:"spec_name"`
RefundId
string
`json:"refund_id"`
Num
string
`json:"num"`
Price
string
`json:"price"`
AdjustAmount
string
`json:"adjust_amount"`
Discount
string
`json:"discount"`
ShareDiscount
string
`json:"share_discount"`
TotalAmount
string
`json:"total_amount"`
ShareAmount
string
`json:"share_amount"`
SharePost
string
`json:"share_post"`
Paid
string
`json:"paid"`
RefundAmount
string
`json:"refund_amount"`
Modified
string
`json:"modified"`
Created
string
`json:"created"`
EndTime
string
`json:"end_time"`
Remark
string
`json:"remark"`
}
`json:"goods_list"`
DiscountList
[]
interface
{}
`json:"discount_list"`
}
`json:"trade_list"`
}
/*
*
查询原始订单
*/
func
(
s
*
wangDianTong
)
SalesApiTradeQuery
(
ctx
context
.
Context
,
req
*
SalesApiTradeQueryReq
)
(
res
*
SalesApiTradeQueryRes
,
err
error
)
{
result
,
err
:=
s
.
post
(
ctx
,
"/openapi2/sales_api_trade_query.php"
,
req
)
if
nil
!=
err
{
return
}
err
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
}
type
LogisticsMultiQueryReq
struct
{
StartModified
string
`json:"start_modified"`
EndModified
string
`json:"end_modified"`
PageSize
int
`json:"page_size"`
PageNo
int
`json:"page_no"`
LogisticsNo
string
`json:"logistics_no"`
TradeNo
string
`json:"trade_no"`
}
type
LogisticsMultiQueryRes
struct
{
Code
int
`json:"code"`
Message
string
`json:"message"`
LogisticsMultiList
[]
struct
{
RecId
string
`json:"rec_id"`
OperatorId
string
`json:"operator_id"`
TradeId
string
`json:"trade_id"`
LogisticsNo
string
`json:"logistics_no"`
LogisticsId
string
`json:"logistics_id"`
PostCost
string
`json:"post_cost"`
PrintStatus
string
`json:"print_status"`
Weight
string
`json:"weight"`
Modified
string
`json:"modified"`
Created
string
`json:"created"`
GoodsInfo
[]
struct
{
SpecNo
string
`json:"spec_no"`
Num
string
`json:"num"`
}
`json:"goods_info"`
}
`json:"logistics_multi_list"`
}
/*
*
查询多物流单号
*/
func
(
s
*
wangDianTong
)
LogisticsMultiQuery
(
ctx
context
.
Context
,
req
*
LogisticsMultiQueryReq
)
(
res
*
LogisticsMultiQueryRes
,
err
error
)
{
result
,
err
:=
s
.
post
(
ctx
,
"/openapi2/logistics_multi_query.php"
,
req
)
if
nil
!=
err
{
return
}
err
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
}
upstream/wangdiantong/wdt_refund.go
0 → 100644
浏览文件 @
302cdf66
package
wangdiantong
import
(
"context"
"github.com/gogf/gf/encoding/gjson"
jsoniter
"github.com/json-iterator/go"
)
type
SalesRefundPushReq
struct
{
Tid
string
`json:"tid"`
ShopNo
string
`json:"shop_no"`
PlatformId
int
`json:"platform_id"`
RefundNo
string
`json:"refund_no"`
Type
int
`json:"type"`
Status
string
`json:"status"`
RefundFee
float64
`json:"refund_fee"`
BuyerNick
string
`json:"buyer_nick"`
RefundTime
string
`json:"refund_time"`
Reason
string
`json:"reason"`
Desc
string
`json:"desc"`
RefundVersion
string
`json:"refund_version"`
OrderList
[]
*
RefundOrderList
`json:"order_list"`
}
type
RefundOrderList
struct
{
Oid
string
`json:"oid"`
Num
int
`json:"num"`
}
type
SalesRefundPushRes
struct
{
Code
int
`json:"code"`
Message
string
`json:"message"`
ChgCount
int
`json:"chg_count"`
NewCount
int
`json:"new_count"`
}
/*
*
创建原始退款单
*/
func
(
s
*
wangDianTong
)
SalesRefundPush
(
ctx
context
.
Context
,
req
*
SalesRefundPushReq
)
(
res
*
SalesRefundPushRes
,
err
error
)
{
salesRefundPushReqs
:=
[]
*
SalesRefundPushReq
{}
salesRefundPushReqs
=
append
(
salesRefundPushReqs
,
req
)
params
:=
make
(
map
[
string
]
interface
{})
json
,
_
:=
jsoniter
.
MarshalToString
(
salesRefundPushReqs
)
params
[
"api_refund_list"
]
=
json
result
,
err
:=
s
.
post
(
ctx
,
"/openapi2/sales_refund_push.php"
,
params
)
if
nil
!=
err
{
return
}
err
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
}
type
RefundQueryReq
struct
{
StartTime
string
`json:"start_time"`
EndTime
string
`json:"end_time"`
PageSize
string
`json:"page_size"`
PageNo
string
`json:"page_no"`
Tid
string
`json:"tid"`
LogisticsNo
string
`json:"logistics_no"`
SrcRefundNo
string
`json:"src_refund_no"`
RefundNo
string
`json:"refund_no"`
}
type
RefundQueryRes
struct
{
Code
int
`json:"code"`
TotalCount
int
`json:"total_count"`
Message
string
`json:"message"`
Refunds
[]
struct
{
ActualRefundAmount
string
`json:"actual_refund_amount"`
AdvanceStatus
string
`json:"advance_status"`
ApiOuterNo
string
`json:"api_outer_no"`
BadReason
string
`json:"bad_reason"`
BuyerNick
string
`json:"buyer_nick"`
ConsignMode
string
`json:"consign_mode"`
Created
string
`json:"created"`
CreatorName
string
`json:"creator_name"`
CsStatus
string
`json:"cs_status"`
CustomerId
string
`json:"customer_id"`
CustomerName
string
`json:"customer_name"`
CustomerNo
string
`json:"customer_no"`
DirectRefundAmount
string
`json:"direct_refund_amount"`
ErrorMsg
string
`json:"error_msg"`
ExchangeAmount
string
`json:"exchange_amount"`
FenxiaoNickName
string
`json:"fenxiao_nick_name"`
FenxiaoRefundNo
string
`json:"fenxiao_refund_no"`
FenxiaoTid
string
`json:"fenxiao_tid"`
FinishTime
string
`json:"finish_time"`
FlagName
string
`json:"flag_name"`
FromType
string
`json:"from_type"`
GoodsAmount
string
`json:"goods_amount"`
GuaranteRefundAmount
string
`json:"guarante_refund_amount"`
GuaranteeMode
string
`json:"guarantee_mode"`
IsGoodsReceived
string
`json:"is_goods_received"`
IsTradeCharged
string
`json:"is_trade_charged"`
LogisticsName
string
`json:"logistics_name"`
LogisticsNo
string
`json:"logistics_no"`
LogisticsStyle
string
`json:"logistics_style"`
Modified
string
`json:"modified"`
OpConstraint
string
`json:"op_constraint"`
OtherAmount
string
`json:"other_amount"`
OuterNo
string
`json:"outer_no"`
Paid
string
`json:"paid"`
PayAccount
string
`json:"pay_account"`
PayNo
string
`json:"pay_no"`
PlatformId
string
`json:"platform_id"`
PostAmount
string
`json:"post_amount"`
ProcessStatus
string
`json:"process_status"`
PushNo
string
`json:"push_no"`
ReasonId
string
`json:"reason_id"`
ReceiverAddress
string
`json:"receiver_address"`
ReceiverName
string
`json:"receiver_name"`
ReceiverTelno
string
`json:"receiver_telno"`
RefundAmount
string
`json:"refund_amount"`
RefundId
string
`json:"refund_id"`
RefundNo
string
`json:"refund_no"`
RefundOrderList
[]
struct
{
Barcode
string
`json:"barcode"`
BrandName
string
`json:"brand_name"`
CostPrice
string
`json:"cost_price"`
Created
string
`json:"created"`
Discount
string
`json:"discount"`
EditMask
string
`json:"edit_mask"`
FromMaskExt
string
`json:"from_mask_ext"`
GoodsId
string
`json:"goods_id"`
GoodsName
string
`json:"goods_name"`
GoodsNo
string
`json:"goods_no"`
IsSnEnable
string
`json:"is_sn_enable"`
MarketPrice
string
`json:"market_price"`
Modified
string
`json:"modified"`
Oid
string
`json:"oid"`
OrderId
string
`json:"order_id"`
OrderNum
string
`json:"order_num"`
OriginalPrice
string
`json:"original_price"`
Paid
string
`json:"paid"`
PlatformId
string
`json:"platform_id"`
PositionId
string
`json:"position_id"`
PositionNo
string
`json:"position_no"`
Price
string
`json:"price"`
ProcessStatus
string
`json:"process_status"`
RefundId
string
`json:"refund_id"`
RefundNum
string
`json:"refund_num"`
RefundOrderAmount
string
`json:"refund_order_amount"`
Remark
string
`json:"remark"`
SalesOrderId
string
`json:"sales_order_id"`
SalesTid
string
`json:"sales_tid"`
SalesTradeId
string
`json:"sales_trade_id"`
SpecCode
string
`json:"spec_code"`
SpecId
string
`json:"spec_id"`
SpecName
string
`json:"spec_name"`
SpecNo
string
`json:"spec_no"`
SrcNo
string
`json:"src_no"`
StockinAmount
string
`json:"stockin_amount"`
StockinNum
string
`json:"stockin_num"`
SuiteId
string
`json:"suite_id"`
SuiteName
string
`json:"suite_name"`
SuiteNo
string
`json:"suite_no"`
SuiteNum
string
`json:"suite_num"`
Tag
string
`json:"tag"`
Tid
string
`json:"tid"`
TotalAmount
string
`json:"total_amount"`
}
`json:"refund_order_list"`
RefundOutGoodsList
[]
interface
{}
`json:"refund_out_goods_list"`
RefundReason
string
`json:"refund_reason"`
RefundTime
string
`json:"refund_time"`
RefundVersion
string
`json:"refund_version"`
Remark
string
`json:"remark"`
ReturnAddress
string
`json:"return_address"`
ReturnGoodsCount
string
`json:"return_goods_count"`
ReturnLogisticsName
string
`json:"return_logistics_name"`
ReturnLogisticsNo
string
`json:"return_logistics_no"`
ReturnMask
string
`json:"return_mask"`
ReturnMobile
string
`json:"return_mobile"`
ReturnName
string
`json:"return_name"`
ReturnTelno
string
`json:"return_telno"`
RevertReason
string
`json:"revert_reason"`
RevertReasonInfo
string
`json:"revert_reason_info"`
SalesTid
string
`json:"sales_tid"`
SalesTradeId
string
`json:"sales_trade_id"`
ShopId
string
`json:"shop_id"`
ShopName
string
`json:"shop_name"`
ShopNo
string
`json:"shop_no"`
SrcNo
string
`json:"src_no"`
Status
string
`json:"status"`
StockinPreNo
string
`json:"stockin_pre_no"`
SwapAddress
string
`json:"swap_address"`
SwapArea
string
`json:"swap_area"`
SwapCity
string
`json:"swap_city"`
SwapDistrict
string
`json:"swap_district"`
SwapLogisticsId
string
`json:"swap_logistics_id"`
SwapLogisticsName
string
`json:"swap_logistics_name"`
SwapLogisticsType
string
`json:"swap_logistics_type"`
SwapMobile
string
`json:"swap_mobile"`
SwapProvince
string
`json:"swap_province"`
SwapReceiver
string
`json:"swap_receiver"`
SwapTelno
string
`json:"swap_telno"`
SwapTradeId
string
`json:"swap_trade_id"`
SwapTradeNo
string
`json:"swap_trade_no"`
SwapWarehouseId
string
`json:"swap_warehouse_id"`
SwapWarehouseNo
string
`json:"swap_warehouse_no"`
SwapZip
string
`json:"swap_zip"`
Tid
string
`json:"tid"`
Type
string
`json:"type"`
WarehouseId
string
`json:"warehouse_id"`
WarehouseNo
string
`json:"warehouse_no"`
WarehouseType
string
`json:"warehouse_type"`
WmsOuterNo
string
`json:"wms_outer_no"`
WmsResult
string
`json:"wms_result"`
WmsStatus
string
`json:"wms_status"`
}
`json:"refunds"`
}
/*
*
查询退换管理
*/
func
(
s
*
wangDianTong
)
RefundQuery
(
ctx
context
.
Context
,
req
*
RefundQueryReq
)
(
res
*
RefundQueryRes
,
err
error
)
{
result
,
err
:=
s
.
post
(
ctx
,
"/openapi2/refund_query.php"
,
req
)
if
nil
!=
err
{
return
}
err
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
}
type
StockRefundLogisticsQueryReq
struct
{
StartTime
string
`json:"start_time"`
EndTime
string
`json:"end_time"`
PageSize
string
`json:"page_size"`
PageNo
string
`json:"page_no"`
LogisticsNo
string
`json:"logistics_no"`
}
type
StockRefundLogisticsQueryRes
struct
{
Code
int
`json:"code"`
Message
string
`json:"message"`
Trades
[]
struct
{
RecId
string
`json:"rec_id"`
ShopNo
string
`json:"shop_no"`
Tid
string
`json:"tid"`
LogisticsType
string
`json:"logistics_type"`
LogisticsNo
string
`json:"logistics_no"`
DeliveryTerm
string
`json:"delivery_term"`
ConsignTime
string
`json:"consign_time"`
Oids
string
`json:"oids"`
IsPartSync
string
`json:"is_part_sync"`
PlatformId
string
`json:"platform_id"`
TradeId
string
`json:"trade_id"`
LogisticsNameErp
string
`json:"logistics_name_erp"`
LogisticsCodeErp
string
`json:"logistics_code_erp"`
LogisticsName
string
`json:"logistics_name"`
}
`json:"trades"`
}
/*
*
查询退货物流单号
*/
func
(
s
*
wangDianTong
)
StockRefundLogisticsQuery
(
ctx
context
.
Context
,
req
*
StockRefundLogisticsQueryReq
)
(
res
*
StockRefundLogisticsQueryRes
,
err
error
)
{
result
,
err
:=
s
.
post
(
ctx
,
"/openapi2/stock_refund_logistics_query.php"
,
req
)
if
nil
!=
err
{
return
}
err
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
}
type
StockinRefundPushReq
struct
{
RefundNo
string
`json:"refund_no"`
OuterNo
string
`json:"outer_no"`
WarehouseNo
string
`json:"warehouse_no"`
LogisticsCode
string
`json:"logistics_code"`
DetailList
[]
struct
{
SpecNo
string
`json:"spec_no"`
StockinNum
int
`json:"stockin_num"`
BatchNo
string
`json:"batch_no"`
StockinPrice
float64
`json:"stockin_price"`
}
`json:"detail_list"`
}
type
StockinRefundPushRes
struct
{
Code
int
`json:"code"`
Message
string
`json:"message"`
}
/*
*
创建退货入库单
*/
func
(
s
*
wangDianTong
)
StockinRefundPush
(
ctx
context
.
Context
,
req
*
StockinRefundPushReq
)
(
res
*
StockinRefundPushRes
,
err
error
)
{
result
,
err
:=
s
.
post
(
ctx
,
"/openapi2/stockin_refund_push.php"
,
req
)
if
nil
!=
err
{
return
}
err
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
}
upstream/wangdiantong/wdt_shop.go
0 → 100644
浏览文件 @
302cdf66
package
wangdiantong
import
(
"context"
"github.com/gogf/gf/encoding/gjson"
)
type
ShopListReq
struct
{
IsDisabled
string
`json:"is_disabled"`
PlatformIds
string
`json:"platform_ids"`
ShopNo
string
`json:"shop_no"`
PlatformId
string
`json:"platform_id"`
PageSize
int
`json:"page_size"`
PageNo
int
`json:"page_no"`
}
type
ShopListRes
struct
{
Code
string
`json:"code"`
TotalCount
string
`json:"total_count"`
Shoplist
[]
struct
{
PlatformId
string
`json:"platform_id"`
SubPlatformId
string
`json:"sub_platform_id"`
ShopId
string
`json:"shop_id"`
ShopNo
string
`json:"shop_no"`
ShopName
string
`json:"shop_name"`
AccountId
string
`json:"account_id"`
AccountNick
string
`json:"account_nick"`
Province
string
`json:"province"`
City
string
`json:"city"`
District
string
`json:"district"`
Address
string
`json:"address"`
Contact
string
`json:"contact"`
Zip
string
`json:"zip"`
Mobile
string
`json:"mobile"`
Telno
string
`json:"telno"`
Remark
string
`json:"remark"`
}
`json:"shoplist"`
}
func
(
s
*
wangDianTong
)
ShopList
(
ctx
context
.
Context
,
req
*
ShopListReq
)
(
res
*
ShopListRes
,
err
error
)
{
result
,
err
:=
s
.
post
(
ctx
,
"/openapi2/shop.php"
,
req
)
if
nil
!=
err
{
return
}
err
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论