- remove some comment
This commit is contained in:
@@ -69,6 +69,7 @@ func AddCategory(ctx *jxcontext.Context, cat *model.SkuCategory, userName string
|
||||
dao.WrapAddIDCULDEntity(cat, userName)
|
||||
cat.JdSyncStatus = model.SyncFlagNewMask
|
||||
cat.JdID = jxutils.GenFakeID()
|
||||
cat.Name = strings.Trim(cat.Name, " ")
|
||||
if cat.Seq <= 0 {
|
||||
var maxSeq struct {
|
||||
MaxSeq int
|
||||
@@ -90,6 +91,9 @@ func UpdateCategory(ctx *jxcontext.Context, categoryID int, payload map[string]i
|
||||
cat.ID = categoryID
|
||||
valid := dao.NormalMakeMapByStructObject(payload, cat, userName)
|
||||
if len(valid) > 0 {
|
||||
if valid["name"] != nil {
|
||||
valid["name"] = strings.Trim(valid["name"].(string), " ")
|
||||
}
|
||||
db := dao.GetDB()
|
||||
if num, err = dao.UpdateEntityLogicallyAndUpdateSyncStatus(db, cat, valid, userName, nil, model.FieldJdSyncStatus); err == nil {
|
||||
_, err = CurVendorSync.SyncCategory(ctx, db, categoryID, false, userName)
|
||||
|
||||
@@ -766,7 +766,7 @@ func RefreshJdStoreSkuStock(promotionID int, skuIDs []int) (err error) {
|
||||
StockQty: model.MaxStoreSkuStockQty,
|
||||
})
|
||||
}
|
||||
globals.SugarLogger.Debugf("RefreshJdStoreSkuStock BatchUpdateCurrentQtys stationNo:%s, stockList:%s", stationNo, utils.Format4Output(stockList, false))
|
||||
// globals.SugarLogger.Debugf("RefreshJdStoreSkuStock BatchUpdateCurrentQtys stationNo:%s, stockList:%s", stationNo, utils.Format4Output(stockList, false))
|
||||
_, err = api.JdAPI.BatchUpdateCurrentQtys("", stationNo, stockList, userName)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Warnf("RefreshJdStoreSkuStock BatchUpdateCurrentQtys failed with error:%v", err)
|
||||
|
||||
@@ -307,7 +307,7 @@ func (p *PurchaseHandler) FullSyncStoreSkus(ctx *jxcontext.Context, parentTask t
|
||||
case 3:
|
||||
_, err = p.SyncStoreCategory(ctx, rootTask, storeID, false)
|
||||
case 4:
|
||||
// _, err = p.SyncStoreSkus(ctx, rootTask, storeID, nil, true, isContinueWhenError)
|
||||
_, err = p.SyncStoreSkus(ctx, rootTask, storeID, nil, true, isContinueWhenError)
|
||||
}
|
||||
return nil, err
|
||||
}, 5)
|
||||
|
||||
Reference in New Issue
Block a user