|
楼主 |
发表于 2018-8-1 17:25:50
|
显示全部楼层
还可以用这个方法:findForJdbcParam
把上面代码改下,
String getCountSql ="SELECT count(notice.id) as count FROM t_s_notice notice LEFT JOIN t_s_notice_read_user noticeRead ON notice.id = noticeRead.notice_id "
+ "WHERE noticeRead.del_flag = 0 and noticeRead.user_id = ? and noticeRead.is_read = 0";
List<Map<String, Object>> resultList2 = systemService.findForJdbcParam(getCountSql,new Object[]{user.getId()}); |
|