Esempio n. 1
0
        public QueryResultList <ConsultationShowData> My([FromBody] string queryString)
        {
            var result = new QueryResultList <ConsultationShowData>();


            var request = JsonHelper.Build <QueryRequest <int> >(queryString);

            if (request.Body <= 0)
            {
                result.Message = "请求参数为NULL";
                return(result);
            }

            if (request.PageInfo == null)
            {
                result.Message = "分页参数为NULL";
                return(result);
            }


            var verify = ValidaQueryString.Valida(request.Header);

            if (verify.ErrCode != 0)
            {
                result.ErrCode = verify.ErrCode;
                result.Message = verify.Message;
                return(result);
            }
            result = new ConsultationBP().GetUserCon(request);
            return(result);
        }
Esempio n. 2
0
        public OperationResult SetConsultationStatus([FromBody] string queryString)
        {
            var result = new OperationResult();

            var request = JsonHelper.Build <RequestOperation <ConsultationData> >(queryString);

            if (request == null)
            {
                result.Message = "请求参数为NULL";
                return(result);
            }

            var verify = ValidaQueryString.Valida(request.Header);

            if (verify.ErrCode != 0)
            {
                result.ErrCode = verify.ErrCode;
                result.Message = verify.Message;
                return(result);
            }
            result = new ConsultationBP().SetConsultationStatus(request);
            return(result);
        }
Esempio n. 3
0
        public OperationResult <ConsultationShowData> GetReplyById([FromBody] string queryString)
        {
            var result = new OperationResult <ConsultationShowData>();

            var request = JsonHelper.Build <QueryRequest <int> >(queryString);

            if (request == null)
            {
                result.Message = "请求参数为NULL";
                return(result);
            }

            var verify = ValidaQueryString.Valida(request.Header);

            if (verify.ErrCode != 0)
            {
                result.ErrCode = verify.ErrCode;
                result.Message = verify.Message;
                return(result);
            }
            result = new ConsultationBP().GetReplyById(request);
            return(result);
        }