예제 #1
0
        public ActionResult Detail(GetPointInfoRequest request, int? authuid, UserModel authUser)
        {
            request.AuthUid = authuid.Value;
            request.AuthUser = authUser;

            return new RestfulResult { Data = this._pointDataService.Get(request) };
        }
예제 #2
0
        public ExecuteResult<PointInfoResponse> Get(GetPointInfoRequest request)
        {
            var pointEntity = this._pointRepository.GetItem(request.PointId);

            if (pointEntity == null)
            {
                return new ExecuteResult<PointInfoResponse>(null);
            }

            if (pointEntity.User_Id != request.AuthUid)
            {
                return new ExecuteResult<PointInfoResponse>(null) { StatusCode = StatusCode.ClientError, Message = "您不能使用其他用户的积点" };
            }

            return new ExecuteResult<PointInfoResponse>(MappingManager.PointInfoResponseMapping(pointEntity));
        }