public List <ProductInfo> SearchProductInfoByParam(string pidOrDisplayName, int pageIndex, int pageSize, int type) { List <ProductInfo> result = new List <ProductInfo>(); try { dbManagerReadOnly.Execute(conn => { if (type == 1 || type == 2) { result = DalProductVehicleInfo.SelectProductInfo(conn, pidOrDisplayName, pageIndex, pageSize, type); } else { result = DalProductVehicleInfo.SearchProductInfoByParam(conn, pidOrDisplayName, pageIndex, pageSize, type); } if (result != null && result.Any() && type != 2) { var data = DalProductVehicleInfo.SelectProductConfigInfoByPIDs(conn, result.Select(x => x.PID).ToList()); if (data != null && data.Any()) { result.ForEach(x => { x.UpdateTime = data.Where(y => y.PID == x.PID).Select(_ => _.UpdateTime).FirstOrDefault() ?? string.Empty; }); } } }); } catch (Exception e) { Monitor.ExceptionMonitor.AddNewMonitor("列表页查询产品信息异常", e, "目标检索", MonitorLevel.Critial, MonitorModule.Other); return(new List <ProductInfo>()); } return(result); }