This commit is contained in:
邹宗楠
2023-11-23 10:26:00 +08:00
parent 8f063f88b6
commit e1a80a862a
7 changed files with 35 additions and 22 deletions

View File

@@ -24,6 +24,15 @@ const (
ShopBusStatusBookingNextDay = 5 // 表示必须跨天预订
)
const (
ShopCheckStatusNew = 1 // 门店审核状态 : 新增
ShopCheckStatusWaitCheck = 2 // 门店审核状态 : 待审核
ShopCheckStatusGoLiveFail = 3 // 门店审核状态 : 上线驳回
ShopCheckStatusCheckSuccess = 4 // 门店审核状态 : 审核通过
ShopCheckStatusUpdateWaitCheck = 5 // 门店审核状态 : 修改待审核
ShopCheckStatusCheckFail = 6 // 门店审核状态 : 审核驳回
)
const (
PlatformFlagElm = "1"
PlatformFlagBaidu = "2"
@@ -268,12 +277,13 @@ func (a *API) ShopOffline(shopID string, baiduShopID int64) (err error) {
}
func (a *API) ShopClose(shopID string, baiduShopID int64) (err error) {
params := a.genShopIDParams(shopID, baiduShopID, 0)
_, err = a.AccessAPI("shop.close", params)
if err == nil {
return nil
status, _ := a.ShopBusStatusGet(shopID, baiduShopID, PlatformFlagElm)
if status != ShopBusStatusOpening {
params := a.genShopIDParams(shopID, baiduShopID, 0)
_, err = a.AccessAPI("shop.close", params)
return err
}
return err
return nil
}
func (a *API) SupplierList() (supplierInfo map[string]interface{}, err error) {