1
This commit is contained in:
@@ -103,7 +103,8 @@ func (a *API) AccessAPI(apiName string, apiParams map[string]interface{}) (retVa
|
||||
type AddPrinterParam struct {
|
||||
PrintNo string `json:"print_no"` //打印机编号
|
||||
Name string `json:"name"` //打印机备注名
|
||||
SIM string `json:"sim"` //sim卡号
|
||||
SIM string `json:"sim"` //sim卡号-电话号码,接受验证的电话
|
||||
StoreId int64 `json:"store_id"` // 门店id
|
||||
}
|
||||
|
||||
func (a *API) AddPrinter(addPrinterParams []*AddPrinterParam) (err error) {
|
||||
|
||||
@@ -18,7 +18,7 @@ func TestShopQuery(t *testing.T) {
|
||||
// if err == nil {
|
||||
// t.Fatal("应该报错找不到门店")
|
||||
// }
|
||||
shopInfo, err := api.ShopQuery("668089")
|
||||
shopInfo, err := api.ShopQuery("800268")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -27,18 +27,18 @@ func TestShopQuery(t *testing.T) {
|
||||
|
||||
func TestShopCreate(t *testing.T) {
|
||||
shopInfo := &ShopInfo{
|
||||
ShopID: "11726346",
|
||||
ShopName: "测试门店",
|
||||
ShopID: "800268",
|
||||
ShopName: "手可摘鲜果店",
|
||||
Category: ShopCategoryFruit,
|
||||
SecondCategory: ShopCategoryFruitFruit,
|
||||
ContactName: "徐",
|
||||
ContactPhone: "18180948107",
|
||||
ShopAddress: "北京市通州区五所南路与玉桥西路南延交叉口北100米梨园农副产品交易中心 水果区",
|
||||
ShopLng: 116672496,
|
||||
ShopLat: 39879491,
|
||||
ContactName: "李廷杰",
|
||||
ContactPhone: "15828509674",
|
||||
ShopAddress: "四川省成都市双流县华阳街道南湖大道279号",
|
||||
ShopLng: 104051308,
|
||||
ShopLat: 30490037,
|
||||
CoordinateType: CoordinateTypeMars,
|
||||
DeliveryServiceCodes: utils.Int2Str(DeliveryServiceCodeRapid),
|
||||
BusinessHours: "[{\"beginTime\":\"09:00\",\"endTime\":\"18:00\"}]",
|
||||
BusinessHours: "[{\"beginTime\":\"09:00\",\"endTime\":\"22:00\"}]",
|
||||
}
|
||||
_, err := api.ShopCreate(shopInfo)
|
||||
if err != nil {
|
||||
|
||||
@@ -36,7 +36,7 @@ func TestCreateUnitorderOrder(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCreateH5UnitorderOrder(t *testing.T) {
|
||||
api.CreateH5UnitorderOrder(&CreateH5UnitorderOrderParam{
|
||||
err := api.CreateH5UnitorderOrder(&CreateH5UnitorderOrderParam{
|
||||
Reqsn: "88320943177180_4",
|
||||
Trxamt: 1,
|
||||
NotifyUrl: "https://print.jxc4.com/callback/msg",
|
||||
@@ -44,6 +44,9 @@ func TestCreateH5UnitorderOrder(t *testing.T) {
|
||||
Charset: "UTF-8",
|
||||
Body: "test",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPayRefund(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user