- up
This commit is contained in:
@@ -122,7 +122,7 @@ func openTimeJX2Mtwm(times [][2]int16) string {
|
||||
}
|
||||
|
||||
func bizStatusMtwm2JX(openLevel, online int) int {
|
||||
if online == mtwmapi.PoiStatusOffline {
|
||||
if online != mtwmapi.PoiStatusOnline {
|
||||
return model.StoreStatusDisabled
|
||||
} else {
|
||||
if openLevel == mtwmapi.PoiOpenLevelHaveRest {
|
||||
|
||||
@@ -128,13 +128,13 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
// err = api.MtwmAPI.PoiSave(storeDetail.VendorStoreID, params)
|
||||
// }
|
||||
openLevel, isOnline := bizStatusJX2Mtwm(jxutils.MergeStoreStatus(storeDetail.Status, storeDetail.VendorStatus))
|
||||
if isOnline == mtwmapi.PoiStatusOffline {
|
||||
if isOnline != mtwmapi.PoiStatusOnline {
|
||||
err = api.MtwmAPI.PoiOffline(storeDetail.VendorStoreID)
|
||||
} else {
|
||||
if err = api.MtwmAPI.PoiOnline(storeDetail.VendorStoreID); err == nil {
|
||||
// 这个函数成功返回也并不表示上线成功。。。
|
||||
remoteStoreInfo, err := api.MtwmAPI.PoiGet(storeDetail.VendorStoreID)
|
||||
if err != nil {
|
||||
remoteStoreInfo, err2 := api.MtwmAPI.PoiGet(storeDetail.VendorStoreID)
|
||||
if err = err2; err != nil {
|
||||
return err
|
||||
}
|
||||
if int(utils.MustInterface2Int64(remoteStoreInfo["is_online"])) == mtwmapi.PoiStatusOnline {
|
||||
|
||||
Reference in New Issue
Block a user