/// <summary> /// 获取评论列表 /// </summary> /// <param name="context"></param> /// <param name="msg"></param> /// <param name="P1"></param> /// <param name="P2"></param> /// <param name="UserInfo"></param> public void GETPLLIST(JObject context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo) { string userName = UserInfo.User.UserName; string strWhere = " JH_Auth_TL.ComId=" + UserInfo.User.ComId; if (P1 != "") { strWhere += string.Format(" And JH_Auth_TL.MSGContent like '%{0}%'", P1); } int page = 0; int pagecount = 8; int.TryParse(context["p"] == null ? "0" : context["p"].ToString(), out page); int.TryParse(context["pagecount"] == null ? "8" : context["pagecount"].ToString(), out pagecount);//页数 page = page == 0 ? 1 : page; int total = 0; DataTable dt = new JH_Auth_TLB().GetDataPager(" JH_Auth_TL LEFT JOIN SZHL_TSSQ ON JH_Auth_TL.MSGTLYID=SZHL_TSSQ.ID ", " JH_Auth_TL.*,SZHL_TSSQ.HTNR ", pagecount, page, " JH_Auth_TL.CRDate desc", strWhere, ref total); msg.Result = dt; msg.Result1 = total; }
/// <summary> /// 添加评论 /// </summary> /// <param name="context"></param> /// <param name="msg"></param> /// <param name="strParamData"></param> /// <param name="strUserName"></param> public void ADDCOMENT(JObject context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo) { string strMsgType = context.Request["MsgType"] ?? ""; string strMsgLYID = context.Request["MsgLYID"] ?? ""; string strPoints = context.Request["Points"] ?? "0"; string strfjID = context.Request["fjID"] ?? ""; string strTLID = context.Request["TLID"] ?? ""; if (!string.IsNullOrEmpty(P1) && APIHelp.TestWB(P1) != "0") { msg.ErrorMsg = "您得发言涉及违规内容,请完善后再发"; return; } JH_Auth_TL Model = new JH_Auth_TL(); Model.CRDate = DateTime.Now; Model.CRUser = UserInfo.User.UserName; Model.CRUserName = UserInfo.User.UserRealName; Model.MSGContent = P1; Model.ComId = UserInfo.User.ComId; Model.MSGTLYID = strMsgLYID; Model.MSGType = strMsgType; Model.MSGisHasFiles = strfjID; Model.Remark1 = P1; if (strTLID != "") { int TLID = Int32.Parse(strTLID); var tl = new JH_Auth_TLB().GetEntity(p => p.ID == TLID); if (tl != null) { Model.TLID = TLID; Model.ReUser = tl.CRUserName; } } int record = 0; int.TryParse(strPoints, out record); Model.Points = record; new JH_Auth_TLB().Insert(Model); if (Model.MSGType == "GZBG" || Model.MSGType == "RWGL" || Model.MSGType == "TSSQ") { int modelId = int.Parse(Model.MSGTLYID); string CRUser = ""; string Content = UserInfo.User.UserRealName + "评论了您的"; if (CRUser != UserInfo.User.UserName) { SZHL_TXSX CSTX = new SZHL_TXSX(); CSTX.Date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); CSTX.APIName = "XTGL"; CSTX.ComId = UserInfo.User.ComId; CSTX.FunName = "SENDPLMSG"; CSTX.CRUserRealName = UserInfo.User.UserRealName; CSTX.MsgID = modelId.ToString(); CSTX.TXContent = Content; CSTX.ISCS = "N"; CSTX.TXUser = CRUser; CSTX.TXMode = Model.MSGType; CSTX.CRUser = UserInfo.User.UserName; TXSX.TXSXAPI.AddALERT(CSTX); //时间为发送时间 } } msg.Result = Model; if (Model.MSGisHasFiles == "") { Model.MSGisHasFiles = "0"; } msg.Result1 = new FT_FileB().GetEntities(" ID in (" + Model.MSGisHasFiles + ")"); }