public async Task <BaseApiResponse> Edit(EditAnnouncementRequest request)
        {
            request.CheckNotNull(nameof(request));

            var command = new UpdateAnnouncementCommand(
                request.Title,
                request.Body
                )
            {
                AggregateRootId = request.Id
            };
            var result = await ExecuteCommandAsync(command);

            if (!result.IsSuccess())
            {
                return(new BaseApiResponse {
                    Code = 400, Message = "命令没有执行成功:{0}".FormatWith(result.GetErrorMessage())
                });
            }

            //添加操作记录
            var currentAdmin = _contextService.GetCurrentAdmin(HttpContext.Current);

            RecordOperat(currentAdmin.AdminId.ToGuid(), "编辑公告", request.Id, request.Title);

            return(new BaseApiResponse());
        }
        public async Task <BaseApiResponse> Edit(EditAnnouncementRequest request)
        {
            request.CheckNotNull(nameof(request));

            var command = new UpdateAnnouncementCommand(
                request.Title,
                request.Body
                )
            {
                AggregateRootId = request.Id
            };
            var result = await ExecuteCommandAsync(command);

            if (!result.IsSuccess())
            {
                return(new BaseApiResponse {
                    Code = 400, Message = "命令没有执行成功:{0}".FormatWith(result.GetErrorMessage())
                });
            }
            return(new BaseApiResponse());
        }