public async Task <BaseApiResponse> Create(CreateOfflineStoreRequest request)
        {
            request.CheckNotNull(nameof(request));

            var user = _userQueryService.FindUser(request.Mobile);

            if (user == null)
            {
                return(new BaseApiResponse {
                    Code = 400, Message = "没有找到用户"
                });
            }
            var newofflinestoreid = GuidUtil.NewSequentialId();
            var command           = new CreateOfflineStoreCommand(
                newofflinestoreid,
                user.Id,
                request.Name,
                request.Thumb,
                request.Phone,
                request.Description,
                request.Labels,
                request.Region,
                request.Address,
                request.Persent,
                request.Longitude,
                request.Latitude,
                request.IsLocked);

            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(), "添加线下店铺", newofflinestoreid, request.Name);
            return(new BaseApiResponse());
        }
        public async Task <BaseApiResponse> Create([FromBody] CreateOfflineStoreRequest request)
        {
            request.CheckNotNull(nameof(request));

            var user = _userQueryService.FindUser(request.Mobile);

            if (user == null)
            {
                return(new BaseApiResponse {
                    Code = 400, Message = "没有找到用户"
                });
            }

            var command = new CreateOfflineStoreCommand(
                GuidUtil.NewSequentialId(),
                user.Id,
                request.Name,
                request.Thumb,
                request.Phone,
                request.Description,
                request.Labels,
                request.Region,
                request.Address,
                request.Persent,
                request.Longitude,
                request.Latitude,
                request.IsLocked);

            var result = await ExecuteCommandAsync(command);

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