- 添加调试输出

This commit is contained in:
gazebo
2019-04-10 16:39:27 +08:00
parent 6ae25dc574
commit 62fdb4fa3f
2 changed files with 12 additions and 8 deletions

View File

@@ -17,6 +17,7 @@ import (
// hint如果是异步返回的是任务ID如果是同步返回是本次需要同步的目录数
func (p *PurchaseHandler) SyncStoreCategory(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, isAsync bool) (hint string, err error) {
globals.SugarLogger.Debugf("mtwm SyncStoreCategory storeID:%d, userName:%s", storeID, ctx.GetUserName())
num := 0
db := dao.GetDB()
storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDMTWM)
@@ -97,6 +98,7 @@ func (p *PurchaseHandler) SyncStoreCategory(ctx *jxcontext.Context, parentTask t
// 远程无,本地有,映射有, --> 同步标记改为新增
// hint如果是异步返回的是任务ID如果是同步返回是本次需要同步的目录数
func (p *PurchaseHandler) SyncLocalStoreCategory(ctx *jxcontext.Context, db *dao.DaoDB, storeID int, isCheckRemote bool) (hint string, err error) {
globals.SugarLogger.Debugf("mtwm SyncLocalStoreCategory storeID:%d, userName:%s", storeID, ctx.GetUserName())
if db == nil {
db = dao.GetDB()
}
@@ -211,6 +213,7 @@ func TranverseRemoteCatList(parentCatName string, remoteCats []*mtwmapi.RetailCa
// hint如果是异步返回的是任务ID如果是同步返回是本次需要同步的目录数
func (p *PurchaseHandler) SyncStoreSkus(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, skuIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
globals.SugarLogger.Debugf("mtwm SyncStoreSkus storeID:%d, skuIDs:%v, isContinueWhenError:%t, userName:%s", storeID, skuIDs, isContinueWhenError, ctx.GetUserName())
db := dao.GetDB()
for i := 0; i < 3; i++ { // 最多重试三次
if hint, err = p.SyncLocalStoreCategory(ctx, db, storeID, false); err != nil {