|
|
@@ -805,6 +805,43 @@ namespace CallCenterApi.Interface.Controllers
|
|
805
|
805
|
return Content(obj.ToJson());
|
|
806
|
806
|
}
|
|
807
|
807
|
|
|
|
808
|
+
|
|
|
809
|
+ /// <summary>
|
|
|
810
|
+ /// 即时通讯 - 关闭通讯信息(单方查看)
|
|
|
811
|
+ /// </summary>
|
|
|
812
|
+ /// <param name="id"></param>
|
|
|
813
|
+ /// <param name="userId"></param>
|
|
|
814
|
+ /// <returns></returns>
|
|
|
815
|
+ public ActionResult CloseChat(int id)
|
|
|
816
|
+ {
|
|
|
817
|
+ //接收坐席Id
|
|
|
818
|
+ int userId = Utils.StrToInt(User.UserData["F_UserID"], 0);
|
|
|
819
|
+ int recordCount = 0;
|
|
|
820
|
+ //修改(设置已读)
|
|
|
821
|
+ string sqlwhere = " ISNULL(IsRead,0) = 0 ";
|
|
|
822
|
+ if (userId > 0)
|
|
|
823
|
+ {
|
|
|
824
|
+ sqlwhere += " and ToUserId = " + userId + " ";
|
|
|
825
|
+ }
|
|
|
826
|
+ if (id > 0)
|
|
|
827
|
+ {
|
|
|
828
|
+ sqlwhere += " and ChatId = " + id + " ";
|
|
|
829
|
+ }
|
|
|
830
|
+ string sqlwhere1 = "UPDATE dbo.T_Msg_Chat_Map SET IsRead = 1 WHERE " + sqlwhere + " ";
|
|
|
831
|
+ int n = DbHelperSQL.ExecuteSql(sqlwhere1);
|
|
|
832
|
+ if (n > 0)
|
|
|
833
|
+ {
|
|
|
834
|
+ recordCount = n;
|
|
|
835
|
+ }
|
|
|
836
|
+
|
|
|
837
|
+ var obj = new
|
|
|
838
|
+ {
|
|
|
839
|
+ rows = "",
|
|
|
840
|
+ total = recordCount
|
|
|
841
|
+ };
|
|
|
842
|
+ return Content(obj.ToJson());
|
|
|
843
|
+ }
|
|
|
844
|
+
|
|
808
|
845
|
/// <summary>
|
|
809
|
846
|
/// DataRow转成DataTable
|
|
810
|
847
|
/// </summary>
|