1
This commit is contained in:
@@ -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) {
|
||||
if lineStatus == model.StoreStatusOpened {
|
||||
err = getAPI(vendorOrgCode, storeID, vendorStoreID).PoiOnline(vendorStoreID)
|
||||
} else {
|
||||
err = getAPI(vendorOrgCode, storeID, vendorStoreID).PoiOffline(vendorStoreID)
|
||||
mtwmApi := getAPI(vendorOrgCode, storeID, vendorStoreID)
|
||||
switch lineStatus {
|
||||
case model.StoreStatusOpened:
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user