门店返回参数
This commit is contained in:
@@ -82,30 +82,30 @@ type GetOneStore struct {
|
|||||||
|
|
||||||
// 获取单个门店(返回)
|
// 获取单个门店(返回)
|
||||||
type GetOneStoreRespData struct {
|
type GetOneStoreRespData struct {
|
||||||
Address string `json:"address"` // 门店地址
|
Address string `json:"address"` // 门店地址
|
||||||
BranchName string `json:"branch_name"` // 门店分店名
|
BranchName string `json:"branch_name"` // 门店分店名
|
||||||
CategoryID int `json:"category_id"` // 门店类目
|
CategoryID int `json:"category_id"` // 门店类目
|
||||||
ChainStoreID int `json:"chain_store_id"` // 蜂鸟门店id,创建接口返回的id
|
ChainStoreID string `json:"chain_store_id"` // 蜂鸟门店id,创建接口返回的id
|
||||||
ChainstoreType int `json:"chainstore_type"` // 门店类型 1-正式门店;2-测试门店
|
ChainstoreType int `json:"chainstore_type"` // 门店类型 1-正式门店;2-测试门店
|
||||||
ChainstoreTypeDesc string `json:"chainstore_type_desc"` // 门店类型描述
|
ChainstoreTypeDesc string `json:"chainstore_type_desc"` // 门店类型描述
|
||||||
ContactPhone string `json:"contact_phone"` // 门店联系方式
|
ContactPhone string `json:"contact_phone"` // 门店联系方式
|
||||||
CreditCode string `json:"credit_code"` // 统一社会信用代码
|
CreditCode string `json:"credit_code"` // 统一社会信用代码
|
||||||
Latitude float64 `json:"latitude"` // 门店纬度[0,90]
|
Latitude string `json:"latitude"` // 门店纬度[0,90]
|
||||||
Longitude float64 `json:"longitude"` // 门店经度[0,180]
|
Longitude string `json:"longitude"` // 门店经度[0,180]
|
||||||
MerchantID int `json:"merchant_id"` // 所属商户id
|
MerchantID int `json:"merchant_id"` // 所属商户id
|
||||||
ModifyStatus int `json:"modify_status"` // 0-无修改,10-资料修改审核中,20-审核通过,30-a审核驳回
|
ModifyStatus int `json:"modify_status"` // 0-无修改,10-资料修改审核中,20-审核通过,30-a审核驳回
|
||||||
ModifyStatusDesc string `json:"modify_status_desc"` // 门店修改状态描述
|
ModifyStatusDesc string `json:"modify_status_desc"` // 门店修改状态描述
|
||||||
Name string `json:"name"` // 门店主店名
|
Name string `json:"name"` // 门店主店名
|
||||||
OutShopCode string `json:"out_shop_code"` // 外部门店编码
|
OutShopCode string `json:"out_shop_code"` // 外部门店编码
|
||||||
OwnerIDNum string `json:"owner_id_num"` // 门店拥有人身份证号
|
OwnerIDNum string `json:"owner_id_num"` // 门店拥有人身份证号
|
||||||
OwnerName string `json:"owner_name"` // 门店拥有人姓名
|
OwnerName string `json:"owner_name"` // 门店拥有人姓名
|
||||||
PositionSource int `json:"position_source"` // 经纬度来源 坐标属性(1:腾讯地图, 2:百度地图, 3:高德地图),蜂鸟建议使用高德地图
|
PositionSource int `json:"position_source"` // 经纬度来源 坐标属性(1:腾讯地图, 2:百度地图, 3:高德地图),蜂鸟建议使用高德地图
|
||||||
PositionSourceDesc string `json:"position_source_desc"` // 经纬度来源说明
|
PositionSourceDesc string `json:"position_source_desc"` // 经纬度来源说明
|
||||||
SettlementAccountID int `json:"settlement_account_id"` // 门店结算账号id
|
SettlementAccountID int `json:"settlement_account_id"` // 门店结算账号id
|
||||||
SettlementMode int `json:"settlement_mode"` // 门店结算方式 1:实时结算; 2:账期结算;
|
SettlementMode int `json:"settlement_mode"` // 门店结算方式 1:实时结算; 2:账期结算;
|
||||||
SettlementModeDesc string `json:"settlement_mode_desc"` // 结算说明?
|
SettlementModeDesc string `json:"settlement_mode_desc"` // 结算说明?
|
||||||
Status int `json:"status"` // 0-上架审核中,20-正常(已上架),30-上架审核失败,40-已冻结,50-已下架
|
Status int `json:"status"` // 0-上架审核中,20-正常(已上架),30-上架审核失败,40-已冻结,50-已下架
|
||||||
StatusDesc string `json:"status_desc"` // 门店认证状态描述
|
StatusDesc string `json:"status_desc"` // 门店认证状态描述
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新蜂鸟门店信息
|
// 更新蜂鸟门店信息
|
||||||
@@ -451,16 +451,3 @@ type OrderClaimSkuDto struct {
|
|||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
type GetStoreResult struct {
|
|
||||||
ChainStoreCode string `json:"chain_store_code"`
|
|
||||||
ChainStoreName string `json:"chain_store_name"`
|
|
||||||
Address string `json:"address"`
|
|
||||||
Latitude string `json:"latitude"`
|
|
||||||
Longitude string `json:"longitude"`
|
|
||||||
PositionSource int `json:"position_source"`
|
|
||||||
City string `json:"city"`
|
|
||||||
ContactPhone string `json:"contact_phone"`
|
|
||||||
ServiceCode string `json:"service_code"`
|
|
||||||
Status int `json:"status"` //1关店,2开店
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ func (a *API) PreCreateByShopFn(basicParams *PreCreateOrder) (deliveryFee, baseD
|
|||||||
|
|
||||||
// 异常检测
|
// 异常检测
|
||||||
if deliveryFeeFn == 0 && baseDeliveryFeeFn == 0 {
|
if deliveryFeeFn == 0 && baseDeliveryFeeFn == 0 {
|
||||||
err = errors.New("门店数据异常")
|
return 0, 0, errors.New("门店数据异常")
|
||||||
}
|
}
|
||||||
fmt.Println("preCreateOrder 预下单获取运费==================:=", deliveryFeeFn, baseDeliveryFeeFn)
|
fmt.Println("preCreateOrder 预下单获取运费==================:=", deliveryFeeFn, baseDeliveryFeeFn)
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ func (a *API) UpdateStore(updateStore *UpdateStoreParam) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *API) GetStore(storeID string) (getStoreResult *GetStoreResult, err error) {
|
func (a *API) GetStore(storeID string) (getStoreResult *GetOneStoreRespData, err error) {
|
||||||
params := GetOneStoreParam{
|
params := GetOneStoreParam{
|
||||||
BaseInfo: BaseInfo{
|
BaseInfo: BaseInfo{
|
||||||
AccessToken: a.accessToken,
|
AccessToken: a.accessToken,
|
||||||
@@ -84,12 +84,12 @@ func (a *API) GetStore(storeID string) (getStoreResult *GetStoreResult, err erro
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
fmt.Println("chainstoreQuery 获取单个门店result==================:=", result)
|
||||||
if result["code"] != "200" {
|
if result["code"] != "200" {
|
||||||
return nil, fmt.Errorf("%s", result["msg"])
|
return nil, fmt.Errorf("%s", result["msg"])
|
||||||
}
|
}
|
||||||
|
|
||||||
fnResult := &GetStoreResult{}
|
fnResult := &GetOneStoreRespData{}
|
||||||
if storeData, ok := result["business_data"]; ok {
|
if storeData, ok := result["business_data"]; ok {
|
||||||
if err := json.Unmarshal([]byte(utils.Interface2String(storeData)), fnResult); err != nil {
|
if err := json.Unmarshal([]byte(utils.Interface2String(storeData)), fnResult); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Reference in New Issue
Block a user