private IPredicate GetBusinessHourWeekCondition(int?id, List <string> uUID, List <string> resUUID, List <string> typeUUID, List <int> states) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 predicates.Add(PredicateFactory.Equal <BusinessHourWeekPO>(t => t.Deleted, false)); if (id.HasValue) { predicates.Add(PredicateFactory.Equal <BusinessHourWeekPO>(t => t.Id, id)); } if (uUID != null && uUID.Count > 0) { predicates.Add(PredicateFactory.In <BusinessHourWeekPO>(t => t.UUID, uUID.ToArray())); } if (resUUID != null && resUUID.Count > 0) { predicates.Add(PredicateFactory.In <BusinessHourWeekPO>(t => t.ResUUID, resUUID.ToArray())); } if (typeUUID != null && typeUUID.Count > 0) { predicates.Add(PredicateFactory.In <BusinessHourWeekPO>(t => t.TypeUUID, typeUUID.ToArray())); } if (states != null && states.Count > 0) { predicates.Add(PredicateFactory.In <BusinessHourWeekPO>(t => t.State, states.ToArray())); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetMemberWeiXinsCondition(int?id, string memberUUID, string weiXinOpenId, string phoneNumber, string name) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 predicates.Add(PredicateFactory.Equal <CMemberWeiXinPO>(t => t.IsDelete, false)); if (id.HasValue) { predicates.Add(PredicateFactory.Equal <CMemberWeiXinPO>(t => t.Id, id.Value)); } if (!string.IsNullOrWhiteSpace(memberUUID)) { predicates.Add(PredicateFactory.Equal <CMemberWeiXinPO>(t => t.MemberUUID, memberUUID)); } if (!string.IsNullOrWhiteSpace(weiXinOpenId)) { predicates.Add(PredicateFactory.Equal <CMemberWeiXinPO>(t => t.WeiXinOpenId, weiXinOpenId)); } if (!string.IsNullOrWhiteSpace(phoneNumber)) { predicates.Add(PredicateFactory.Like <CMemberWeiXinPO>(t => t.PhoneNumber, "%" + phoneNumber.ToSafeSQLLike() + "%")); } if (!string.IsNullOrWhiteSpace(name)) { predicates.Add(PredicateFactory.Like <CMemberWeiXinPO>(t => t.Name, "%" + name.ToSafeSQLLike() + "%")); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetCDistributionManagerCondition(int?id, string name, string passWord, int?userLevel, List <string> mobile) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 if (id.HasValue) { predicates.Add(PredicateFactory.Equal <CDistributionManagerPO>(t => t.Id, id)); } if (!string.IsNullOrWhiteSpace(name)) { predicates.Add(PredicateFactory.Equal <CDistributionManagerPO>(t => t.Name, name)); } if (!string.IsNullOrWhiteSpace(passWord)) { predicates.Add(PredicateFactory.Equal <CDistributionManagerPO>(t => t.PassWord, passWord)); } if (userLevel.HasValue) { predicates.Add(PredicateFactory.Equal <CDistributionManagerPO>(t => t.UserLevel, userLevel)); } if (mobile != null && mobile.Count > 0) { predicates.Add(PredicateFactory.In <CDistributionManagerPO>(t => t.Mobile, mobile.ToArray())); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetManagersCondition(int?id, string name, string passWord, int?userLevel) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 predicates.Add(PredicateFactory.Equal <CManagerPO>(t => t.IsDelete, false)); if (id.HasValue) { predicates.Add(PredicateFactory.Equal <CManagerPO>(t => t.Id, id.Value)); } if (!string.IsNullOrWhiteSpace(name)) { predicates.Add(PredicateFactory.Equal <CManagerPO>(t => t.Name, name)); } if (!string.IsNullOrWhiteSpace(passWord)) { predicates.Add(PredicateFactory.Equal <CManagerPO>(t => t.PassWord, passWord)); } if (userLevel.HasValue) { predicates.Add(PredicateFactory.Equal <CManagerPO>(t => t.UserLevel, userLevel.Value)); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetCResCoordinateCondition(int?id, string resUUID, List <decimal> longitude, List <decimal> latitude, List <string> markUUID) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 predicates.Add(PredicateFactory.Equal <CResCoordinatePO>(t => t.IsDelete, false)); if (id.HasValue) { predicates.Add(PredicateFactory.Equal <CResCoordinatePO>(t => t.Id, id)); } if (!string.IsNullOrWhiteSpace(resUUID)) { predicates.Add(PredicateFactory.Equal <CResCoordinatePO>(t => t.ResUUID, resUUID)); } if (longitude != null && longitude.Count > 0) { predicates.Add(PredicateFactory.In <CResCoordinatePO>(t => t.Longitude, longitude.ToArray())); } if (latitude != null && latitude.Count > 0) { predicates.Add(PredicateFactory.In <CResCoordinatePO>(t => t.Latitude, latitude.ToArray())); } if (markUUID != null && markUUID.Count > 0) { predicates.Add(PredicateFactory.In <CResCoordinatePO>(t => t.MarkUUID, markUUID.ToArray())); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetCCommoditysCondition(int?id, string resUUID, string commodityUUID, List <string> commodityCategoryUUIDs, List <int> states, string name) { List <IPredicate> predicates = new List <IPredicate>(); predicates.Add(PredicateFactory.Equal <CCommodityPropertyPO>(t => t.IsDelete, false)); if (id.HasValue) { predicates.Add(PredicateFactory.Equal <CCommodityPO>(t => t.Id, id.Value)); } if (!string.IsNullOrWhiteSpace(resUUID)) { predicates.Add(PredicateFactory.Equal <CCommodityPO>(t => t.ResUUID, resUUID)); } if (!string.IsNullOrWhiteSpace(commodityUUID)) { predicates.Add(PredicateFactory.Equal <CCommodityPO>(t => t.CommodityUUID, commodityUUID)); } if ((commodityCategoryUUIDs != null) && (commodityCategoryUUIDs.Count > 0)) { predicates.Add(PredicateFactory.In <CCommodityPO>(t => t.CommodityCategoryUUID, commodityCategoryUUIDs.ToArray())); } if ((states != null) && (states.Count > 0)) { predicates.Add(PredicateFactory.In <CCommodityPO>(t => t.State, states.ToArray())); } if (!string.IsNullOrWhiteSpace(name)) { IPredicate[] predicateArray1 = new IPredicate[2]; predicateArray1[0] = PredicateFactory.Like <CCommodityPO>(t => t.ChineseName, "%" + name.ToSafeSQLLike() + "%"); predicateArray1[1] = PredicateFactory.Like <CCommodityPO>(t => t.EnglishName, "%" + name.ToSafeSQLLike() + "%"); predicates.Add(PredicateFactory.Or(predicateArray1)); } return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetOrderCommodityRelationsCondition(int?id, List <string> orderUUID, List <string> commodityWithPropertyUUID, List <string> commodityUUID) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 predicates.Add(PredicateFactory.Equal <COrderCommodityRelationPO>(t => t.IsDelete, false)); if (id.HasValue) { predicates.Add(PredicateFactory.Equal <COrderCommodityRelationPO>(t => t.Id, id.Value)); } if (orderUUID != null && orderUUID.Count > 0) { predicates.Add(PredicateFactory.In <COrderCommodityRelationPO>(t => t.OrderUUID, orderUUID.ToArray())); } if (commodityWithPropertyUUID != null && commodityWithPropertyUUID.Count > 0) { predicates.Add(PredicateFactory.In <COrderCommodityRelationPO>(t => t.CommodityWithPropertyUUID, commodityWithPropertyUUID.ToArray())); } if (commodityUUID != null && commodityUUID.Count > 0) { predicates.Add(PredicateFactory.In <COrderCommodityRelationPO>(t => t.CommodityUUID, commodityUUID.ToArray())); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetCommodityPropertysCondition(List <int> id, string resUUID, string commodityPropertyUUID, List <string> commodityUUIDs, List <string> propertyCategoryUUIDs) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 predicates.Add(PredicateFactory.Equal <CCommodityPropertyPO>(t => t.IsDelete, false)); if (id != null && id.Count > 0) { predicates.Add(PredicateFactory.In <CCommodityPropertyPO>(t => t.Id, id.ToArray())); } if (!string.IsNullOrWhiteSpace(resUUID)) { predicates.Add(PredicateFactory.Equal <CCommodityPropertyPO>(t => t.ResUUID, resUUID)); } if (!string.IsNullOrWhiteSpace(commodityPropertyUUID)) { predicates.Add(PredicateFactory.Equal <CCommodityPropertyPO>(t => t.CommodityPropertyUUID, commodityPropertyUUID)); } if (commodityUUIDs != null && commodityUUIDs.Count > 0) { predicates.Add(PredicateFactory.In <CCommodityPropertyPO>(t => t.CommodityUUID, commodityUUIDs.ToArray())); } if (propertyCategoryUUIDs != null && propertyCategoryUUIDs.Count > 0) { predicates.Add(PredicateFactory.In <CCommodityPropertyPO>(t => t.PropertyCategoryUUID, propertyCategoryUUIDs.ToArray())); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetCCashCouponDetailCondition(int?id, List <int> assetProperty, List <int> memberWeiXinId, List <int> useState, List <int> assetStatus, string assetName, DateTime?validStartTime, DateTime?validEndTime, decimal?saleAmount, DateTime?saleStartTime, DateTime?saleEndTime) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 if (id.HasValue) { predicates.Add(PredicateFactory.Equal <CCashCouponDetailPO>(t => t.Id, id)); } if (assetProperty != null && assetProperty.Count > 0) { predicates.Add(PredicateFactory.In <CCashCouponDetailPO>(t => t.AssetProperty, assetProperty.ToArray())); } if (memberWeiXinId != null && memberWeiXinId.Count > 0) { predicates.Add(PredicateFactory.In <CCashCouponDetailPO>(t => t.MemberWeiXinId, memberWeiXinId.ToArray())); } if (useState != null && useState.Count > 0) { predicates.Add(PredicateFactory.In <CCashCouponDetailPO>(t => t.UseState, useState.ToArray())); } if (assetStatus != null && assetStatus.Count > 0) { predicates.Add(PredicateFactory.In <CCashCouponDetailPO>(t => t.AssetStatus, assetStatus.ToArray())); } if (!string.IsNullOrWhiteSpace(assetName)) { predicates.Add(PredicateFactory.Equal <CCashCouponDetailPO>(t => t.AssetName, assetName)); } if (validStartTime.HasValue) { predicates.Add(PredicateFactory.Equal <CCashCouponDetailPO>(t => t.ValidStartTime, validStartTime)); } if (validEndTime.HasValue) { predicates.Add(PredicateFactory.Equal <CCashCouponDetailPO>(t => t.ValidEndTime, validEndTime)); } if (saleAmount.HasValue) { predicates.Add(PredicateFactory.Equal <CCashCouponDetailPO>(t => t.SaleAmount, saleAmount)); } if (saleStartTime.HasValue) { predicates.Add(PredicateFactory.Equal <CCashCouponDetailPO>(t => t.SaleStartTime, saleStartTime)); } if (saleEndTime.HasValue) { predicates.Add(PredicateFactory.Equal <CCashCouponDetailPO>(t => t.SaleEndTime, saleEndTime)); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }
public CDistributionManagerPO[] GetAll() { using (IEntityContext entityContext = CDistributionManagerPOManager.Instance.CreateEntityContext()) { List <IPredicate> predicates = new List <Core.Data.IPredicate>(); predicates.Add(PredicateFactory.Equal <CDistributionManagerPO>(o => o.IsDelete, false)); IPredicate predicate = PredicateFactory.And(predicates.ToArray()); return(entityContext.Find <CDistributionManagerPO>(predicate)); } }
private IPredicate GetCommodityCategorysCondition(string resUUID, List <string> commodityCategoryUUIDs) { List <IPredicate> predicates = new List <IPredicate>(); predicates.Add(PredicateFactory.Equal <CCommodityPropertyPO>(t => t.IsDelete, false)); if (!string.IsNullOrWhiteSpace(resUUID)) { predicates.Add(PredicateFactory.Equal <CCommodityCategoryPO>(t => t.ResUUID, resUUID)); } if ((commodityCategoryUUIDs != null) && (commodityCategoryUUIDs.Count > 0)) { predicates.Add(PredicateFactory.In <CCommodityCategoryPO>(t => t.CommodityCategoryUUID, commodityCategoryUUIDs.ToArray())); } return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetCCashCouponCondition(int?id, List <int> assetProperty, string assetName, DateTime?validStartTime, DateTime?validEndTime, List <int> assetStatus, decimal?saleAmount, DateTime?saleStartTime, DateTime?saleEndTime) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 if (id.HasValue) { predicates.Add(PredicateFactory.Equal <CCashCouponPO>(t => t.Id, id)); } if (assetProperty != null && assetProperty.Count > 0) { predicates.Add(PredicateFactory.In <CCashCouponPO>(t => t.AssetProperty, assetProperty.ToArray())); } if (!string.IsNullOrWhiteSpace(assetName)) { predicates.Add(PredicateFactory.Like <CCashCouponPO>(t => t.AssetName, assetName.ToSafeSQLLike())); } if (validStartTime.HasValue) { predicates.Add(PredicateFactory.LessEqual <CCashCouponPO>(t => t.ValidStartTime, validStartTime)); } if (validEndTime.HasValue) { predicates.Add(PredicateFactory.GreaterEqual <CCashCouponPO>(t => t.ValidEndTime, validEndTime)); } if (assetStatus != null && assetStatus.Count > 0) { predicates.Add(PredicateFactory.In <CCashCouponPO>(t => t.AssetStatus, assetStatus.ToArray())); } if (saleAmount.HasValue) { predicates.Add(PredicateFactory.LessEqual <CCashCouponPO>(t => t.SaleAmount, saleAmount)); } if (saleStartTime.HasValue) { predicates.Add(PredicateFactory.LessEqual <CCashCouponPO>(t => t.SaleStartTime, saleStartTime)); } if (saleEndTime.HasValue) { predicates.Add(PredicateFactory.GreaterEqual <CCashCouponPO>(t => t.SaleEndTime, saleEndTime)); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetMemberAddressCondition(int?id, string memberAddressUUID, string memberUUID, string name, string telephone, string cityId, string address, string houseNumber) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 predicates.Add(PredicateFactory.Equal <CManagerPO>(t => t.IsDelete, false)); if (id.HasValue) { predicates.Add(PredicateFactory.Equal <CMemberAddressPO>(t => t.Id, id.Value)); } if (!string.IsNullOrWhiteSpace(memberAddressUUID)) { predicates.Add(PredicateFactory.Equal <CMemberAddressPO>(t => t.MemberAddressUUID, memberAddressUUID)); } if (!string.IsNullOrWhiteSpace(memberUUID)) { predicates.Add(PredicateFactory.Equal <CMemberAddressPO>(t => t.MemberUUID, memberUUID)); } if (!string.IsNullOrWhiteSpace(name)) { predicates.Add(PredicateFactory.Like <CMemberAddressPO>(t => t.Name, "%" + name.ToSafeSQLLike() + "%")); } if (!string.IsNullOrWhiteSpace(telephone)) { predicates.Add(PredicateFactory.Like <CMemberAddressPO>(t => t.Telephone, "%" + telephone.ToSafeSQLLike() + "%")); } if (!string.IsNullOrWhiteSpace(cityId)) { predicates.Add(PredicateFactory.Like <CMemberAddressPO>(t => t.CityId, "%" + cityId.ToSafeSQLLike() + "%")); } if (!string.IsNullOrWhiteSpace(address)) { predicates.Add(PredicateFactory.Like <CMemberAddressPO>(t => t.Address, "%" + address.ToSafeSQLLike() + "%")); } if (!string.IsNullOrWhiteSpace(houseNumber)) { predicates.Add(PredicateFactory.Like <CMemberAddressPO>(t => t.HouseNumber, "%" + houseNumber.ToSafeSQLLike() + "%")); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetRestaurantsCondition(List <string> resUUID, string name, string address, string cityId, string alphabet, List <int> state, string loginName, string password) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 predicates.Add(PredicateFactory.Equal <CRestaurantPO>(t => t.IsDelete, false)); if (resUUID != null && resUUID.Count > 0) { predicates.Add(PredicateFactory.In <CRestaurantPO>(t => t.ResUUID, resUUID.ToArray())); } if (!string.IsNullOrWhiteSpace(name)) { predicates.Add(PredicateFactory.Like <CRestaurantPO>(t => t.Name, "%" + name.ToSafeSQLLike() + "%")); } if (!string.IsNullOrWhiteSpace(address)) { predicates.Add(PredicateFactory.Like <CRestaurantPO>(t => t.Address, "%" + address.ToSafeSQLLike() + "%")); } if (!string.IsNullOrWhiteSpace(cityId)) { predicates.Add(PredicateFactory.Equal <CRestaurantPO>(t => t.CityId, cityId)); } if (!string.IsNullOrWhiteSpace(alphabet)) { predicates.Add(PredicateFactory.Like <CRestaurantPO>(t => t.Alphabet, "%" + alphabet.ToSafeSQLLike() + "%")); } if (state != null && state.Count > 0) { predicates.Add(PredicateFactory.In <CRestaurantPO>(t => t.State, state.ToArray())); } if (!string.IsNullOrWhiteSpace(loginName)) { predicates.Add(PredicateFactory.Equal <CRestaurantPO>(t => t.LoginName, loginName)); } if (!string.IsNullOrWhiteSpace(password)) { predicates.Add(PredicateFactory.Equal <CRestaurantPO>(t => t.Password, password)); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetCouponsCondition(int?id, string couponUUID, List <int> couponType, List <int> preferentialType, List <int> state, string resUUID, DateTime?ordrTime) { List <IPredicate> predicates = new List <IPredicate>(); predicates.Add(PredicateFactory.Equal <CCommodityPropertyPO>(t => t.IsDelete, false)); if (id.HasValue) { predicates.Add(PredicateFactory.Equal <CCouponPO>(t => t.Id, id)); } if (!string.IsNullOrWhiteSpace(couponUUID)) { predicates.Add(PredicateFactory.Equal <CCouponPO>(t => t.CouponUUID, couponUUID)); } if ((couponType != null) && (couponType.Count > 0)) { predicates.Add(PredicateFactory.In <CCouponPO>(t => t.CouponType, couponType.ToArray())); } if ((preferentialType != null) && (preferentialType.Count > 0)) { predicates.Add(PredicateFactory.In <CCouponPO>(t => t.PreferentialType, preferentialType.ToArray())); } if ((state != null) && (state.Count > 0)) { predicates.Add(PredicateFactory.In <CCouponPO>(t => t.State, state.ToArray())); } if (!string.IsNullOrWhiteSpace(resUUID)) { predicates.Add(PredicateFactory.Equal <CCouponPO>(t => t.ResUUID, resUUID)); } if (ordrTime.HasValue) { IPredicate[] predicates1 = new IPredicate[2]; predicates1[0] = PredicateFactory.LessEqual <CCouponPO>(t => t.EffectiveStartTime, ordrTime); predicates1[1] = PredicateFactory.Equal <CCouponPO>(t => t.EffectiveStartTime, null); predicates.Add(PredicateFactory.Or(predicates1)); IPredicate[] predicates2 = new IPredicate[2]; predicates2[0] = PredicateFactory.GreaterEqual <CCouponPO>(t => t.EffectiveEndTime, ordrTime); predicates2[1] = PredicateFactory.Equal <CCouponPO>(t => t.EffectiveEndTime, null); predicates.Add(PredicateFactory.Or(predicates2)); } return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetCBannerCondition(int?id, string name) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 if (id.HasValue) { predicates.Add(PredicateFactory.Equal <CBannerPO>(t => t.Id, id)); } if (!string.IsNullOrWhiteSpace(name)) { predicates.Add(PredicateFactory.Like <CBannerPO>(t => t.Name, name.ToSafeSQLLike())); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetPropertyCategorysCondition(string resUUID, List <string> propertyCategoryUUIDs) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 predicates.Add(PredicateFactory.Equal <CManagerPO>(t => t.IsDelete, false)); if (!string.IsNullOrWhiteSpace(resUUID)) { predicates.Add(PredicateFactory.Equal <CPropertyCategoryPO>(t => t.ResUUID, resUUID)); } if ((propertyCategoryUUIDs != null) && (propertyCategoryUUIDs.Count > 0)) { predicates.Add(PredicateFactory.In <CPropertyCategoryPO>(t => t.PropertyCategoryUUID, propertyCategoryUUIDs.ToArray())); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetVerificationCodesCondition(string memberUUID, string weiXinOpenId, string phoneNumber, string code, List <int> verificationState, DateTime?minEffectiveEndTime, DateTime?maxEffectiveEndTime) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 //predicates.Add(PredicateFactory.Equal<CVerificationCodePO>(t => t.d, false)); if (!string.IsNullOrWhiteSpace(memberUUID)) { predicates.Add(PredicateFactory.Equal <CVerificationCodePO>(t => t.MemberUUID, memberUUID)); } if (!string.IsNullOrWhiteSpace(weiXinOpenId)) { predicates.Add(PredicateFactory.Equal <CVerificationCodePO>(t => t.WeiXinOpenId, weiXinOpenId)); } if (!string.IsNullOrWhiteSpace(phoneNumber)) { predicates.Add(PredicateFactory.Equal <CVerificationCodePO>(t => t.PhoneNumber, phoneNumber)); } if (!string.IsNullOrWhiteSpace(code)) { predicates.Add(PredicateFactory.Equal <CVerificationCodePO>(t => t.Code, code)); } if ((verificationState != null) && (verificationState.Count > 0)) { predicates.Add(PredicateFactory.In <CVerificationCodePO>(t => t.VerificationState, verificationState.ToArray())); } if (minEffectiveEndTime.HasValue) { predicates.Add(PredicateFactory.GreaterEqual <CVerificationCodePO>(t => t.EffectiveEndTime, minEffectiveEndTime)); } if (maxEffectiveEndTime.HasValue) { predicates.Add(PredicateFactory.LessEqual <CVerificationCodePO>(t => t.EffectiveEndTime, maxEffectiveEndTime)); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetCIntegralRecordCondition(int?id, List <string> orderId, List <int> type) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 if (id.HasValue) { predicates.Add(PredicateFactory.Equal <CIntegralRecordPO>(t => t.Id, id)); } if (orderId != null && orderId.Count > 0) { predicates.Add(PredicateFactory.In <CIntegralRecordPO>(t => t.OrderId, orderId.ToArray())); } if (type != null && type.Count > 0) { predicates.Add(PredicateFactory.In <CIntegralRecordPO>(t => t.Type, type.ToArray())); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }
private IPredicate GetCDistributionCoordinateCondition(int?id, List <int> distributionId, List <int> state) { List <IPredicate> predicates = new List <IPredicate>(); #region 基本条件 if (id.HasValue) { predicates.Add(PredicateFactory.Equal <CDistributionCoordinatePO>(t => t.Id, id)); } if (distributionId != null && distributionId.Count > 0) { predicates.Add(PredicateFactory.In <CDistributionCoordinatePO>(t => t.DistributionId, distributionId.ToArray())); } if (state != null && state.Count > 0) { predicates.Add(PredicateFactory.In <CDistributionCoordinatePO>(t => t.State, state.ToArray())); } #endregion #region 数量条件 #endregion return(PredicateFactory.And(predicates.ToArray())); }