This commit is contained in:
邹宗楠
2024-02-18 15:02:02 +08:00
parent 05c5d680ed
commit 1047926773
2 changed files with 6 additions and 6 deletions

View File

@@ -8,6 +8,7 @@ import (
"git.rosy.net.cn/jx-callback/business/jxutils/netprinter"
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/jx-callback/globals"
"git.rosy.net.cn/jx-callback/globals/api"
)
@@ -26,6 +27,7 @@ func OnCallbackMsg(msg *ebaiapi.CallbackMsg) (response *ebaiapi.CallbackResponse
if /*msg.Cmd == ebaiapi.CmdOrderPartRefund || msg.Cmd == ebaiapi.CmdOrderUserCancel || */ msg.Cmd == ebaiapi.CmdOrderDeliveryStatus {
response = CurPurchaseHandler.OnFinancialMsg(msg)
} else if msg.Cmd == ebaiapi.CmdShopMsgPush {
globals.SugarLogger.Debugf("=============baidushopmsg := %s", utils.Format4Output(msg, false))
response = CurPurchaseHandler.onShopMsgPush(msg)
} else if msg.Cmd == ebaiapi.CmdShopUnbindMsg {
// 门店授权发生变化 17,失去授权

View File

@@ -242,7 +242,6 @@ func (p *PurchaseHandler) ReadStore(ctx *jxcontext.Context, vendorOrgCode, vendo
}
func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName string) (err error) {
return nil
var stores []*tEbaiStoreInfo
sql := `
SELECT
@@ -281,16 +280,16 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
if err = p.UpdateStoreStatus(jxcontext.AdminCtx, store.VendorOrgCode, storeID, store.VendorStoreID, mergeStatus); err != nil {
return err
}
store := fmt.Sprintf("门店id:%d,门店名称:%s,第三方门店状态:%d,本地修改前门店状态%d,本地门店修改后状态:%d,第三方平台Id(ebai):%d", storeID, store.Name, store2.Status, store.Status, mergeStatus, store.VendorOrgCode)
event.AddOperateEvent(jxcontext.AdminCtx, jxcontext.AdminCtx.GetTrackInfo(), store, "", "", 10, "UpdateStore")
updateStoreInfo := fmt.Sprintf("门店id:%d,门店名称:%s,第三方门店状态:%d,本地修改前门店状态%d,本地门店修改后状态:%d,第三方平台Id(ebai):%d", storeID, store.Name, store2.Status, store.Status, mergeStatus, store.VendorOrgCode)
event.AddOperateEvent(jxcontext.AdminCtx, jxcontext.AdminCtx.GetTrackInfo(), updateStoreInfo, "", "", 10, "UpdateStore")
}
params := genStoreMapFromStore(store)
if err = api.EbaiAPI.ShopUpdate(params); err == nil {
if store.PromoteInfo != "" {
err = api.EbaiAPI.ShopAnnouncementSet("", utils.Str2Int64(store.VendorStoreID), store.PromoteInfo)
}
store := fmt.Sprintf("门店id:%d,门店名称:%s,第三方门店状态:%d,本地修改前门店状态%d,本地门店修改后状态:%d,第三方平台Id(ebai):%d", storeID, store.Name, store2.Status, store.Status, 100, store.VendorOrgCode)
event.AddOperateEvent(jxcontext.AdminCtx, jxcontext.AdminCtx.GetTrackInfo(), store, "", "", 10, "UpdateStore")
updateStoreInfo := fmt.Sprintf("门店id:%d,门店名称:%s,第三方门店状态:%d,本地修改前门店状态%d,本地门店修改后状态:%d,第三方平台Id(ebai):%d", storeID, store.Name, store2.Status, store.Status, 100, store.VendorOrgCode)
event.AddOperateEvent(jxcontext.AdminCtx, jxcontext.AdminCtx.GetTrackInfo(), updateStoreInfo, "", "", 10, "UpdateStore")
}
}
@@ -629,7 +628,6 @@ func (c *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, vendorOrgCod
err = api.EbaiAPI.ShopClose("", utils.Str2Int64(vendorStoreID))
} else if status == model.StoreStatusDisabled {
err = api.EbaiAPI.ShopClose("", utils.Str2Int64(vendorStoreID))
// err = api.EbaiAPI.ShopOffline("", utils.Str2Int64(vendorStoreID))
}
if err != nil {
if remoteStatus, err2 := c.GetStoreStatus(ctx, vendorOrgCode, storeID, vendorStoreID); err2 == nil && remoteStatus == status {