예제 #1
0
        /// <summary>
        /// 根据单品食品类型获取信息
        /// </summary>
        /// <param name="type">类型</param>
        /// <returns></returns>
        public Result <PageList <Dish> > SearchDishInfoByType(DishType type, PageSearchParam param)
        {
            Result <PageList <Dish> > result = new Result <PageList <Dish> >()
            {
                Data   = null,
                Status = true
            };

            param.SearchCode = type.GetHashCode().ToString();
            param.SearchType = 3;

            result.Data           = new PageList <Dish>();
            result.Data.PageIndex = param.PageIndex;
            result.Data.PageNumer = param.PageNumer;

            try
            {
                //查询符合条件的数据总条数
                result.Data.Count = DBConnectionManager.Instance.Reader.Count(new DishCountForSelectPageSpefication(param).Satifasy());
                //查询数据集合
                IList <DishInfo> dish = DBConnectionManager.Instance.Reader.Select <DishInfo>(new DishSelectPagesPefication(param).Satifasy());
                result.Data.List = dish.CopyList <DishInfo, Dish>();
            }
            catch (Exception ex)
            {
                result.Status     = false;
                result.Message    = "查询单品食物出错:" + ex.Message;
                result.StatusCode = "SD001";
                LoggerUtils.LogIn(LoggerUtils.ColectExceptionMessage(ex, "At service:SearchDishInfoByType() .DishService"), LogType.ErrorLog);
            }

            return(result);
        }
예제 #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (PositionX != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PositionX);
            }
            if (PositionY != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PositionY);
            }
            if (Direction != 0)
            {
                hash ^= Direction.GetHashCode();
            }
            if (ObjType != 0)
            {
                hash ^= ObjType.GetHashCode();
            }
            if (BlockType != 0)
            {
                hash ^= BlockType.GetHashCode();
            }
            if (DishType != 0)
            {
                hash ^= DishType.GetHashCode();
            }
            if (ToolType != 0)
            {
                hash ^= ToolType.GetHashCode();
            }
            if (TriggerType != 0)
            {
                hash ^= TriggerType.GetHashCode();
            }
            if (IsMoving != false)
            {
                hash ^= IsMoving.GetHashCode();
            }
            if (RecieveText.Length != 0)
            {
                hash ^= RecieveText.GetHashCode();
            }
            if (Team != 0)
            {
                hash ^= Team.GetHashCode();
            }
            if (SightRange != 0)
            {
                hash ^= SightRange.GetHashCode();
            }
            if (MoveSpeed != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(MoveSpeed);
            }
            if (MaxThrowDistance != 0)
            {
                hash ^= MaxThrowDistance.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
예제 #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (PositionX != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PositionX);
            }
            if (PositionY != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PositionY);
            }
            if (Width != 0)
            {
                hash ^= Width.GetHashCode();
            }
            if (Height != 0)
            {
                hash ^= Height.GetHashCode();
            }
            if (Direction != 0)
            {
                hash ^= Direction.GetHashCode();
            }
            if (ObjType != 0)
            {
                hash ^= ObjType.GetHashCode();
            }
            if (BlockType != 0)
            {
                hash ^= BlockType.GetHashCode();
            }
            if (DishType != 0)
            {
                hash ^= DishType.GetHashCode();
            }
            if (ToolType != 0)
            {
                hash ^= ToolType.GetHashCode();
            }
            if (TriggerType != 0)
            {
                hash ^= TriggerType.GetHashCode();
            }
            if (IsMoving != false)
            {
                hash ^= IsMoving.GetHashCode();
            }
            hash ^= buff_.GetHashCode();
            if (SpeakText.Length != 0)
            {
                hash ^= SpeakText.GetHashCode();
            }
            if (Team != 0)
            {
                hash ^= Team.GetHashCode();
            }
            if (SightRange != 0)
            {
                hash ^= SightRange.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }