- 添加对于监控平台门店状态初始版本
This commit is contained in:
@@ -518,28 +518,10 @@ func (v *VendorSync) DeleteRemoteStoreSkus(ctx *jxcontext.Context, db *dao.DaoDB
|
||||
}
|
||||
|
||||
func (v *VendorSync) LoopStoresMap2(ctx *jxcontext.Context, db *dao.DaoDB, taskName string, isAsync, isManageIt bool, vendorIDs []int, storeIDs []int, handler tasksch.WorkFunc, isContinueWhenError bool) (task tasksch.ITask, hint string, err error) {
|
||||
sql := `
|
||||
SELECT t1.*
|
||||
FROM store_map t1
|
||||
WHERE t1.is_sync = 1 AND t1.deleted_at = ?
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
utils.DefaultTimeValue,
|
||||
}
|
||||
if len(vendorIDs) > 0 {
|
||||
sql += " AND t1.vendor_id IN (" + dao.GenQuestionMarks(len(vendorIDs)) + ")"
|
||||
sqlParams = append(sqlParams, vendorIDs)
|
||||
}
|
||||
if len(storeIDs) > 0 {
|
||||
sql += " AND t1.store_id IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")"
|
||||
sqlParams = append(sqlParams, storeIDs)
|
||||
}
|
||||
sql += " ORDER BY t1.store_id, t1.vendor_id"
|
||||
var storeMapList []*model.StoreMap
|
||||
if err = dao.GetRows(db, &storeMapList, sql, sqlParams...); err != nil {
|
||||
if storeMapList, err = dao.GetStoresMapList(db, vendorIDs, storeIDs, model.StoreStatusAll, model.StoreIsSyncYes); err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
|
||||
if len(storeMapList) == 0 {
|
||||
return nil, "", nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user