yuxiadna
This commit is contained in:
@@ -46,11 +46,13 @@ func (a *API) PreCreateByShopFn(basicParams *PreCreateOrder) (deliveryFee, baseD
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, 0, err
|
return 0, 0, err
|
||||||
}
|
}
|
||||||
|
fmt.Println("预下单:======", result)
|
||||||
|
|
||||||
preOrderResult := PreCreateOrderResp{}
|
preOrderResult := PreCreateOrderResp{}
|
||||||
if err := json.Unmarshal([]byte(result["business_data"].(string)), &preOrderResult); err != nil {
|
if err := json.Unmarshal([]byte(result["business_data"].(string)), &preOrderResult); err != nil {
|
||||||
return 0, 0, err
|
return 0, 0, err
|
||||||
}
|
}
|
||||||
|
fmt.Println("预下单:Unmarshal======", preOrderResult)
|
||||||
|
|
||||||
// 返回所有可选的商品列表,每项包含当前使用该商品下单时对应的价格等信息,(其中不可用的商品会返回不可用原因) 可挑选其中一个可用的商品进行正式下单。
|
// 返回所有可选的商品列表,每项包含当前使用该商品下单时对应的价格等信息,(其中不可用的商品会返回不可用原因) 可挑选其中一个可用的商品进行正式下单。
|
||||||
var deliveryFeeFn int64
|
var deliveryFeeFn int64
|
||||||
|
|||||||
@@ -84,22 +84,18 @@ func (a *API) GetStore(storeID string) (getStoreResult *GetOneStoreRespData, err
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
fmt.Println("chainstoreQuery 获取单个门店result==================:=", result)
|
|
||||||
if result["code"].(string) != "200" {
|
if result["code"].(string) != "200" {
|
||||||
return nil, fmt.Errorf("%s", result["msg"])
|
return nil, fmt.Errorf("%s", result["msg"])
|
||||||
}
|
}
|
||||||
|
|
||||||
fnResult := &GetOneStoreRespData{}
|
fnResult := &GetOneStoreRespData{}
|
||||||
if storeData, ok := result["business_data"]; ok {
|
if storeData, ok := result["business_data"]; ok {
|
||||||
fmt.Println("chainstoreQuery storeData==================:=", storeData)
|
|
||||||
if err := json.Unmarshal([]byte(utils.Interface2String(storeData)), fnResult); err != nil {
|
if err := json.Unmarshal([]byte(utils.Interface2String(storeData)), fnResult); err != nil {
|
||||||
fmt.Println("chainstoreQuery err==================:=", err)
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return nil, fmt.Errorf("暂无数据")
|
return nil, fmt.Errorf("暂无数据")
|
||||||
}
|
}
|
||||||
fmt.Println("chainstoreQuery 获取单个门店==================:=", fnResult)
|
|
||||||
|
|
||||||
return fnResult, err
|
return fnResult, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user