public SubmitCmuNoteCommentResponse SubmitCmuNoteComment(SubmitCmuNoteCommentRequest request) { var result = new SubmitCmuNoteCommentResponse() { ResultMessage = "肌友圈帖子评论成功", Result = ResultCode.Success }; try { using (var con = new DbConnectionProvider(dbName).GetOpenConnection()) { var parms = new DynamicParameters(); parms.Add("P_NoteID", request.NoteID, DbType.Int32); parms.Add("P_UserID", request.UserID, DbType.Int32); parms.Add("P_Content", request.Content, DbType.String); parms.Add("P_IsAgreed", request.IsAgreed, DbType.Boolean); result.NoteCommentID = con.ExecuteScalar <int>("sp_SubmitCmuNoteComment" , parms , CommandType.StoredProcedure); } } catch (Exception ex) { result.ResultMessage = "肌友圈帖子评论异常"; result.Result = ResultCode.Error; result.Errors = new List <string>(); result.Errors.Add(ex.Message); LogHelper.WriteErrorLog(ex); } return(result); }
public SubmitCmuNoteCommentResponse SubmitCmuNoteComment(SubmitCmuNoteCommentRequest request) { return(CommunityManager.GetInstance().SubmitCmuNoteComment(request)); }