扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
public ListGetNoticeByToUserID(Search search) { //search.userId=3; string sql = "select * from Notices WHERE ID>0 "; var param = new DynamicParameters(); sql += " AND ToUserID LIKE @toUserID"; param.Add("toUserID", "%"+search.userId.ToString()+"%" ); if (search.ID > 0) { sql += " AND id = @id"; param.Add("id", search.ID); } var NoticeState = new List (); NoticeState.AddRange(_workingDB.Query (sql, param).ToList()); string sql2 = "select * from IsReadNotices where NoticeID=@noticeID AND UserID=@uid "; foreach (var n in NoticeState) { IsReadNotice isReadNotices = _workingDB.Query (sql2, new { noticeID = n.ID, uid = search.userId }).SingleOrDefault(); if (isReadNotices != null) { n.statusMsg = isReadNotices.statusMsg; n.Remarks = isReadNotices.Remarks; } } return NoticeState; }
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流