- remove some comment

This commit is contained in:
gazebo
2018-12-04 20:23:22 +08:00
parent 0d9bb63161
commit 160ac2dd83
3 changed files with 6 additions and 2 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)