日志添加

This commit is contained in:
邹宗楠
2022-04-18 19:21:32 +08:00
parent 3528ff9d43
commit 169b17951f
4 changed files with 13 additions and 0 deletions

View File

@@ -284,14 +284,19 @@ 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")
}
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")
}
}
}
}
}

View File

@@ -2,6 +2,7 @@ package jd
import (
"fmt"
"git.rosy.net.cn/jx-callback/business/jxstore/event"
"strings"
"time"
@@ -208,6 +209,8 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
// globals.SugarLogger.Debug(utils.Format4Output(storeParams, false))
errList := errlist.New()
if globals.EnableJdStoreWrite {
store1:= fmt.Sprintf("门店id:%d,门店名称:%s,第三方门店状态:%d,本地修改前门店状态%d,本地门店修改后状态:%d,第三方平台Id(ebai):%d", storeID,store.Name, 100, store.Status, 100,store.VendorOrgCode)
event.AddOperateEvent(jxcontext.AdminCtx,jxcontext.AdminCtx.GetTrackInfo(), store1, "", "", 10, "UpdateStore")
errList.AddErr(a.UpdateStoreInfo4Open2(storeParams, modifyCloseStatus))
}
if store.FreightDeductionPack != "" {

View File

@@ -4,6 +4,7 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"git.rosy.net.cn/jx-callback/business/jxstore/event"
"git.rosy.net.cn/jx-callback/globals"
"strings"
"time"
@@ -185,6 +186,8 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
},
}
}
store1:= fmt.Sprintf("门店id:%d,门店名称:%s,第三方门店状态:%d,本地修改前门店状态%d,本地门店修改后状态:%d,第三方平台Id(ebai):%d", storeID,store.Name, 100, store.Status, jxutils.MergeStoreStatus(store.Status, store.VendorStatus),store.VendorOrgCode)
event.AddOperateEvent(jxcontext.AdminCtx,jxcontext.AdminCtx.GetTrackInfo(), store1, "", "", 10, "UpdateStore")
err = getAPI("2").UpdateBasic(param)
}
if store.SyncStatus&model.SyncFlagStoreStatus != 0 {

View File

@@ -252,6 +252,8 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
// name = jxutils.ComposeStoreName(storeDetail.Store.Name, model.VendorIDMTWM)
// }
}
store := fmt.Sprintf("门店id:%d,门店名称:%s,第三方门店状态:%d,本地修改前门店状态%d,本地门店修改后状态:%d,第三方平台Id(美团):%d", storeID,remoteStoreInfo.Name, remoteStoreInfo.IsOnline, storeDetail.Status, mergedStoreStatus,storeDetail.VendorOrgCode)
event.AddOperateEvent(jxcontext.AdminCtx,jxcontext.AdminCtx.GetTrackInfo(), store, "", "", 10, "UpdateStore")
// openLevel, isOnline := bizStatusJX2Mtwm(mergedStoreStatus)
//TODO 美团暂时不用那个电话
phone := storeDetail.Tel1