dapper Query和 IList
        public GoodDM GetDMGoods(int GoodsID, int BID)
        {
            GoodDM entity = new GoodDM();
            var entity_Goods = bllGoods.GetGoodsDetail(GoodsID, BID);
            if (entity_Goods != null && entity_Goods.GoodsID != 0)
            {
                entity.Detaile = entity_Goods;
                IList<TM.SOA.Entity.DM.DM> Goods_DMList = new List<TM.SOA.Entity.DM.DM>();
                Goods_DMList = GetDMListByGoods(BID,GoodsID,true);//查询得到的过滤过期的DM
                var MiaoShaList = Goods_DMList.Where(p => p.Type == (int)DMEnum.miao).ToList();
                if (MiaoShaList != null && MiaoShaList.Count > 0)
                {//如果商品存在秒杀,直接返回秒杀
                    entity.IsMiao = true;
                    entity.DMList = MiaoShaList;
                    return entity;
                }
                entity.DMList = Goods_DMList;
            }
            entity.IsMiao = false;
            return entity;
        }

 

posted on 2022-09-20 16:14  Jankie1122  阅读(16)  评论(0编辑  收藏  举报