fk
This commit is contained in:
@@ -268,10 +268,10 @@ func getGetStoresSkusBaseSQL(db *dao.DaoDB, storeIDs, skuIDs []int, isFocus bool
|
||||
}
|
||||
sql += ")"
|
||||
}
|
||||
if params["jdID"] != nil {
|
||||
sql += " AND t1.jd_id = ?"
|
||||
sqlParams = append(sqlParams, params["jdID"].(int))
|
||||
}
|
||||
// if params["jdID"] != nil {
|
||||
// sql += " AND t1.jd_id = ?"
|
||||
// sqlParams = append(sqlParams, params["jdID"].(int))
|
||||
// }
|
||||
if params["name"] != nil {
|
||||
sql += " AND t1.name LIKE ?"
|
||||
sqlParams = append(sqlParams, "%"+params["name"].(string)+"%")
|
||||
@@ -315,7 +315,6 @@ func getGetStoresSkusBaseSQL(db *dao.DaoDB, storeIDs, skuIDs []int, isFocus bool
|
||||
return "", nil, err
|
||||
}
|
||||
sql += " AND ( 1 = 0"
|
||||
// TODO
|
||||
if params["jdSyncStatus"] != nil && realVendorMap[model.VendorIDJD] == 1 {
|
||||
sql += " OR (t4.jd_sync_status & ? <> 0 AND t2.jd_id <> 0 AND t1.status = ? AND t2.status = ?)"
|
||||
sqlParams = append(sqlParams, params["jdSyncStatus"], model.SkuStatusNormal, model.SkuStatusNormal)
|
||||
|
||||
@@ -188,9 +188,6 @@ func (v *VendorSync) oldSyncReorderCategories(ctx *jxcontext.Context, db *dao.Da
|
||||
|
||||
func (v *VendorSync) SyncStore(ctx *jxcontext.Context, db *dao.DaoDB, vendorID, storeID int, isAsync bool, userName string) (hint string, err error) {
|
||||
globals.SugarLogger.Debugf("SyncStore, storeID:%d", storeID)
|
||||
if vendorID == model.VendorIDJX {
|
||||
return "1", nil
|
||||
}
|
||||
var vendorIDs []int
|
||||
if vendorID != -1 {
|
||||
vendorIDs = []int{
|
||||
@@ -200,6 +197,7 @@ func (v *VendorSync) SyncStore(ctx *jxcontext.Context, db *dao.DaoDB, vendorID,
|
||||
hint, err = v.LoopStoresMap(ctx, db, fmt.Sprintf("同步门店信息:%d", storeID), isAsync, false, vendorIDs, []int{storeID}, func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (resultList interface{}, err error) {
|
||||
loopMapInfo := batchItemList[0].(*LoopStoreMapInfo)
|
||||
handler := v.GetStoreHandler(loopMapInfo.VendorID)
|
||||
if handler != nil {
|
||||
if len(loopMapInfo.StoreMapList) > 1 {
|
||||
loopStoreTask := tasksch.NewParallelTask(fmt.Sprintf("处理平台%s", model.VendorChineseNames[loopMapInfo.VendorID]), nil, ctx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
@@ -228,7 +226,9 @@ func (v *VendorSync) SyncStore(ctx *jxcontext.Context, db *dao.DaoDB, vendorID,
|
||||
resultList = []interface{}{1}
|
||||
}
|
||||
}
|
||||
return resultList, partner.AddVendorInfo2Err(err, loopMapInfo.VendorID)
|
||||
err = partner.AddVendorInfo2Err(err, loopMapInfo.VendorID)
|
||||
}
|
||||
return resultList, err
|
||||
}, true)
|
||||
return hint, makeSyncError(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user