Esempio n. 1
0
        /// <summary>
        /// 查询卖家所有已存在尺寸/颜色
        /// </summary>
        /// <param name="sellerID">卖家ID</param>
        /// <param name="attributeid">属性ID</param>
        /// <returns></returns>
        public System.Collections.Generic.IEnumerable <Jinher.AMP.BTP.Deploy.CustomDTO.ColorAndSizeAttributeVM> GetAttributeBySellerID(System.Guid sellerID, Guid attributeid)
        {
            var query = from n in Jinher.AMP.BTP.BE.Attribute.ObjectSet()
                        join m in SecondAttribute.ObjectSet().Where(n => n.IsDel == false).OrderBy(n => n.SubTime) on n.Id equals m.AttributeId
                        where m.AppId == sellerID && n.Id == attributeid
                        select new ColorAndSizeAttributeVM
            {
                AppId               = n.AppId,
                AttributeId         = n.Id,
                SecondAttributeId   = m.Id,
                AttributeName       = n.Name,
                SecondAttributeName = m.Name,
            };

            return(query);
        }
Esempio n. 2
0
 public List <SecondAttribute> GetAttributeValueById(List <Guid> attrid, Guid appId)
 {
     return(SecondAttribute.ObjectSet().Where(n => attrid.Contains(n.AttributeId) && n.AppId == appId).ToList());
 }
Esempio n. 3
0
        /// <summary>
        /// 查询卖家所有已存在的次级属性
        /// </summary>
        /// <param name="sellerID">卖家ID</param>
        /// <returns></returns>
        public List <Jinher.AMP.BTP.Deploy.SecondAttributeDTO> GetSecondAttributeBySellerID(System.Guid sellerID)
        {
            var query = SecondAttribute.ObjectSet().Where(i => i.AppId == sellerID).OrderBy(n => n.SubTime).ToList();

            return(new SecondAttribute().ToEntityDataList(query));
        }