Merge remote-tracking branch 'origin/mark' into yonghui
This commit is contained in:
@@ -188,7 +188,8 @@ func (v *VendorSync) SyncReorderCategories(ctx *jxcontext.Context, db *dao.DaoDB
|
||||
func (v *VendorSync) SyncStore2(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs, storeIDs []int, mustDirty, isAsync bool) (hint string, err error) {
|
||||
globals.SugarLogger.Debugf("SyncStore2, storeIDs:%d", storeIDs)
|
||||
userName := ctx.GetUserName()
|
||||
_, hint, err = v.LoopStoresMap2(ctx, db, fmt.Sprintf("同步门店信息:%v", storeIDs), isAsync, false, vendorIDs, storeIDs, mustDirty, func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (resultList interface{}, err error) {
|
||||
isManageIt := len(storeIDs) == 0 || len(storeIDs) > 5
|
||||
_, hint, err = v.LoopStoresMap2(ctx, db, fmt.Sprintf("同步门店信息:%v", storeIDs), isAsync, isManageIt, vendorIDs, storeIDs, mustDirty, func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (resultList interface{}, err error) {
|
||||
loopMapInfo := batchItemList[0].(*LoopStoreMapInfo)
|
||||
handler := v.GetStoreHandler(loopMapInfo.VendorID)
|
||||
if handler != nil {
|
||||
|
||||
@@ -183,8 +183,8 @@ func syncStoreSku() {
|
||||
})
|
||||
errList.AddErr(err)
|
||||
|
||||
// cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, db, partner.GetMultiStoreVendorIDs(), nil, false, nil, []int{27379}, syncFlag, true, true)
|
||||
_, err = cms.CurVendorSync.FullSyncStoresSkus(jxcontext.AdminCtx, db, partner.GetMultiStoreVendorIDs(), nil, false, []int{27379}, true, true)
|
||||
_, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, db, partner.GetMultiStoreVendorIDs(), nil, false, nil, []int{27379}, syncFlag, true, true)
|
||||
// _, err = cms.CurVendorSync.FullSyncStoresSkus(jxcontext.AdminCtx, db, partner.GetMultiStoreVendorIDs(), nil, false, []int{27379}, true, true)
|
||||
errList.AddErr(err)
|
||||
case 1:
|
||||
errList.AddErr(cms.SetSingleStoreSkuSyncModifyStatus(db, partner.GetSingleStoreVendorIDs()))
|
||||
|
||||
@@ -244,7 +244,6 @@ func GetStoresMapList2(db *DaoDB, vendorIDs, storeIDs []int, status, isSync int,
|
||||
}
|
||||
if mustDirty {
|
||||
sql += " AND t1.sync_status <> 0"
|
||||
sqlParams = append(sqlParams, pricePack)
|
||||
}
|
||||
sql += " ORDER BY t1.store_id DESC, t1.vendor_id"
|
||||
if err = GetRows(db, &storeMapList, sql, sqlParams...); err == nil {
|
||||
|
||||
@@ -400,8 +400,8 @@ func genStoreMapFromStore(store *tEbaiStoreInfo) map[string]interface{} {
|
||||
params["name"] = jxutils.ComposeStoreName(store.Name, model.VendorIDEBAI)
|
||||
}
|
||||
}
|
||||
// boxFee, _ := dao.GetSysConfigAsInt64(dao.GetDB(), model.ConfigSysEbaiBoxFee)
|
||||
// params["package_box_price"] = boxFee
|
||||
boxFee, _ := dao.GetSysConfigAsInt64(dao.GetDB(), model.ConfigSysEbaiBoxFee)
|
||||
params["package_box_price"] = boxFee
|
||||
|
||||
params["address"] = store.Address
|
||||
// todo 饿百 开店审核通过后不允许修改商户信息
|
||||
|
||||
@@ -293,9 +293,9 @@ func (c *PurchaseHandler) UpdateStoreCustomID(ctx *jxcontext.Context, vendorOrgC
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) UpdateStoreBoxFee(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string) (err error) {
|
||||
// boxFee, err := dao.GetSysConfigAsInt64(dao.GetDB(), model.ConfigSysMtwmBoxFee)
|
||||
// if err == nil {
|
||||
// err = api.MtwmAPI.PackagePriceUpdate(vendorStoreID, 1, int(boxFee))
|
||||
// }
|
||||
boxFee, err := dao.GetSysConfigAsInt64(dao.GetDB(), model.ConfigSysMtwmBoxFee)
|
||||
if err == nil {
|
||||
err = api.MtwmAPI.PackagePriceUpdate(vendorStoreID, 1, int(boxFee))
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user