/// <summary> /// 回复意见反馈 /// </summary> /// <param name="request">回复实体</param> /// <returns></returns> public bool Reply(FeedBackReplyRequest request) { string postData = JsonHelper.GetJson(request); FeedBackResponse response = client.Execute(request, reply, postData); if (response != null) { return(response.success); } return(false); }
public JsonResult FeedBackReply(int feedBackId, string replyContent) { var result = new JsonResultObject(); JXAPI.JXSdk.Domain.FeedBackInfo feedBackInfo = FeedBackService.Instance.Get(feedBackId); if (feedBackInfo == null) { result.msg = "修改失败,反馈已被删除!"; result.status = false; return(Json(result)); } feedBackInfo.replyContents = replyContent; feedBackInfo.replyUserName = base.UNICKNAME; feedBackInfo.replyTime = JXAPI.JXSdk.Utils.ConvertDataTimeHelper.ConvertDataTimeLong(DateTime.Now); FeedBackReplyRequest rReply = new FeedBackReplyRequest() { feedBackId = feedBackInfo.feedBackId , replyContents = replyContent + " 感谢您对金象网一如既往的支持!" , uid = base.UID , userName = base.UNICKNAME }; result.status = FeedBackService.Instance.Reply(rReply); if (result.status == true) { var outFBInfo = new JXProduct.AdminUI.Models.OM.FeedBackInfo(); outFBInfo.feedBackId = feedBackInfo.feedBackId; outFBInfo.contact = feedBackInfo.contact; outFBInfo.contents = feedBackInfo.contents; outFBInfo.createTime = JXAPI.JXSdk.Utils.ConvertDataTimeHelper.ConvertLongDateTime(feedBackInfo.createTime).ToString(); outFBInfo.replyContents = feedBackInfo.replyContents; outFBInfo.replyTime = JXAPI.JXSdk.Utils.ConvertDataTimeHelper.ConvertLongDateTime(feedBackInfo.replyTime).ToString(); outFBInfo.replyUserName = feedBackInfo.replyUserName; outFBInfo.status = feedBackInfo.status; outFBInfo.typeID = feedBackInfo.typeID; outFBInfo.typeName = FeedBackType(outFBInfo.typeID); outFBInfo.userID = feedBackInfo.userID; outFBInfo.userName = feedBackInfo.userName; result.data = Newtonsoft.Json.JsonConvert.SerializeObject(outFBInfo); result.msg = "回复成功!"; } else { result.msg = "回复失败,未能连接至网络!"; } return(Json(result)); }
/// <summary> /// 查看意见反馈 /// </summary> /// <param name="feedBackId">ID</param> /// <returns></returns> public FeedBackInfo Get(int feedBackId) { FeedBackReplyRequest request = new FeedBackReplyRequest() { feedBackId = feedBackId, uid = 1 }; string postData = JsonHelper.GetJson(request); FeedBackResponse response = client.Execute(request, get, postData); if (response != null && response.dto != null) { return(response.dto); } return(null); }
/// <summary> /// 删除意见反馈 /// </summary> /// <param name="feedBackId">ID</param> /// <param name="changUser">操作用户</param> /// <returns></returns> public bool Delete(int feedBackId, string changUser) { FeedBackReplyRequest request = new FeedBackReplyRequest() { feedBackId = feedBackId, uid = 1, userName = changUser }; string postData = JsonHelper.GetJson(request); FeedBackResponse response = client.Execute(request, delete, postData); if (response != null) { return(response.success); } return(false); }