This commit is contained in:
邹宗楠
2023-11-23 13:50:33 +08:00
parent 687eb45bef
commit d4588cda51

View File

@@ -460,10 +460,17 @@ func (c *PurchaseHandler) UpdateStoreBoxFee(ctx *jxcontext.Context, vendorOrgCod
} }
func (c *PurchaseHandler) UpdateStoreLineStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, lineStatus int) (err error) { func (c *PurchaseHandler) UpdateStoreLineStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, lineStatus int) (err error) {
if lineStatus == model.StoreStatusOpened { mtwmApi := getAPI(vendorOrgCode, storeID, vendorStoreID)
err = getAPI(vendorOrgCode, storeID, vendorStoreID).PoiOnline(vendorStoreID) switch lineStatus {
} else { case model.StoreStatusOpened:
err = getAPI(vendorOrgCode, storeID, vendorStoreID).PoiOffline(vendorStoreID) if err = mtwmApi.PoiOnline(vendorStoreID); err != nil {
err = mtwmApi.PoiOpen(vendorStoreID)
} }
default:
if err = mtwmApi.PoiOffline(vendorStoreID); err != nil {
err = mtwmApi.PoiClose(vendorStoreID)
}
}
return err return err
} }