public async Task <IActionResult> UpdateMenuAsync([FromBody] UpdateMenuRequestDto request)
        {
            var menuBiz = new MenuBiz();
            var entity  = await menuBiz.GetAsync(request.MenuGuid);

            if (entity == null)
            {
                return(Failed(ErrorCode.UserData, "找不到数据"));
            }
            entity.LastUpdatedBy   = UserID;
            entity.LastUpdatedDate = DateTime.Now;
            entity.MenuName        = request.MenuName;
            entity.Sort            = request.Sort;
            entity.Enable          = request.Enable;
            entity.MenuClass       = request.MenuClass;
            entity.MenuCode        = request.MenuCode;
            entity.MenuUrl         = request.MenuUrl;
            entity.ParentGuid      = request.ParentGuid;
            var result = await menuBiz.UpdateAsync(entity);

            if (!result)
            {
                return(Failed(ErrorCode.UserData, "修改失败"));
            }
            return(Success());
        }
        public async Task <IActionResult> DisableEnableMenuAsync([FromBody] DisableEnableRequestDto request)
        {
            var menuBiz = new MenuBiz();
            var entity  = await menuBiz.GetAsync(request.Guid);

            if (entity == null)
            {
                return(Failed(ErrorCode.UserData, "找不到数据"));
            }
            entity.LastUpdatedBy   = UserID;
            entity.LastUpdatedDate = DateTime.Now;
            entity.Enable          = request.Enable;
            var result = await menuBiz.UpdateAsync(entity);

            if (!result)
            {
                return(Failed(ErrorCode.UserData, "修改失败"));
            }
            return(Success());
        }