Пример #1
0
        public RestfulResult Create(FeedbackCreateRequest request, int? authuid, UserModel authUser)
        {
            request.AuthUid = authuid.Value;
            request.AuthUser = authUser;
            request.Contact = UrlDecode(request.Contact);
            request.Content = UrlDecode(request.Content);

            return new RestfulResult { Data = this._feedbackDataService.Create(request) };
        }
Пример #2
0
        public ExecuteResult Create(FeedbackCreateRequest request)
        {
            if (request == null)
            {
                return new ExecuteResult { StatusCode = StatusCode.ClientError, Message = "参数错误" };
            }

            var entity = this._feedbackRepository.Insert(new FeedbackEntity
                 {
                     Contact = String.IsNullOrEmpty(request.Contact) ? String.Empty : request.Contact,
                     Content = String.IsNullOrEmpty(request.Content) ? String.Empty : request.Content,
                     CreatedDate = DateTime.Now,
                     CreatedUser = request.AuthUid,
                     UpdatedDate = DateTime.Now,
                     UpdatedUser = request.AuthUid,
                     Status = (int)DataStatus.Normal,
                     User_Id = request.AuthUid
                 });

            return new ExecuteResult() { StatusCode = StatusCode.Success, Message = "感谢您的意见反馈,谢谢" };
        }