Merge remote-tracking branch 'origin/mark' into jdshop
This commit is contained in:
@@ -398,6 +398,10 @@ func getStoresSql(ctx *jxcontext.Context, keyword string, params map[string]inte
|
||||
sqlWhere += " AND t1.address LIKE ?"
|
||||
sqlWhereParams = append(sqlWhereParams, "%"+params["address"].(string)+"%")
|
||||
}
|
||||
if params["marketManPhone"] != nil {
|
||||
sqlWhere += " AND t1.market_man_phone = ?"
|
||||
sqlWhereParams = append(sqlWhereParams, params["marketManPhone"].(string))
|
||||
}
|
||||
if params["tel"] != nil {
|
||||
sqlWhere += " AND (t1.tel1 LIKE ? OR t1.tel2 LIKE ?)"
|
||||
sqlWhereParams = append(sqlWhereParams, "%"+params["tel"].(string)+"%")
|
||||
|
||||
@@ -911,12 +911,15 @@ func (d *SyncErrResultLock) AppendData(syncErrResult SyncErrResult) {
|
||||
func (v *VendorSync) SyncStoreSkusFromYb(ctx *jxcontext.Context, storeIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
var (
|
||||
vendorID = model.VendorIDYB
|
||||
db = dao.GetDB()
|
||||
)
|
||||
storeMapList, err := dao.GetStoresMapList2(db, []int{vendorID}, storeIDs, nil, model.StoreStatusAll, model.StoreIsSyncYes, "", false)
|
||||
for _, v := range storeMapList {
|
||||
hint, err = syncStoreSkusFromYb(ctx, v.StoreID, vendorID, v.VendorStoreID, isAsync, isContinueWhenError)
|
||||
}
|
||||
hint, err = v.LoopStoresMap(ctx, dao.GetDB(), fmt.Sprintf("同步银豹到京西:%v", storeIDs), isAsync, true, []int{vendorID}, storeIDs,
|
||||
func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) {
|
||||
loopMapInfo := batchItemList[0].(*LoopStoreMapInfo)
|
||||
for _, v := range loopMapInfo.StoreMapList {
|
||||
hint, err = syncStoreSkusFromYb(ctx, v.StoreID, vendorID, v.VendorStoreID, isAsync, isContinueWhenError)
|
||||
}
|
||||
return nil, partner.AddVendorInfo2Err(err, loopMapInfo.VendorID)
|
||||
}, isContinueWhenError)
|
||||
return hint, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user