修改浏览记录查询不到
This commit is contained in:
@ -58,9 +58,7 @@ public class LogServiceImpl extends BaseServiceImpl<LogMapper, co.yixiang.loggin
|
|||||||
@Override
|
@Override
|
||||||
public Object findAllByPageable(String nickname, Pageable pageable) {
|
public Object findAllByPageable(String nickname, Pageable pageable) {
|
||||||
getPage(pageable);
|
getPage(pageable);
|
||||||
List<co.yixiang.logging.domain.Log> list = logMapper.findAllByPageable(nickname);
|
PageInfo<co.yixiang.logging.domain.Log> page = new PageInfo<>(logMapper.findAllByPageable(nickname));
|
||||||
PageInfo<co.yixiang.logging.domain.Log> page = new PageInfo<>(list);
|
|
||||||
|
|
||||||
Map<String,Object> map = new LinkedHashMap<>(2);
|
Map<String,Object> map = new LinkedHashMap<>(2);
|
||||||
map.put("content",page.getList());
|
map.put("content",page.getList());
|
||||||
map.put("totalElements",page.getTotal());
|
map.put("totalElements",page.getTotal());
|
||||||
|
@ -29,7 +29,7 @@ public interface LogMapper extends CoreMapper<Log> {
|
|||||||
void deleteByLogType(@Param("logType") String logType);
|
void deleteByLogType(@Param("logType") String logType);
|
||||||
@Select("<script>select l.id,l.create_time as createTime,l.description, l.request_ip as requestIp,l.address,u.nickname from log l " +
|
@Select("<script>select l.id,l.create_time as createTime,l.description, l.request_ip as requestIp,l.address,u.nickname from log l " +
|
||||||
" left join yx_user u on u.uid=l.uid where l.type=1 " +
|
" left join yx_user u on u.uid=l.uid where l.type=1 " +
|
||||||
" <if test = \"nickname !=''\"> and u.nickname LIKE CONCAT('%',#{nickname},'%')</if> order by l.id desc</script>")
|
" <if test = \"nickname !=null\"> and u.nickname LIKE CONCAT('%',#{nickname},'%')</if> order by l.id desc</script>")
|
||||||
List<Log> findAllByPageable(@Param("nickname") String nickname);
|
List<Log> findAllByPageable(@Param("nickname") String nickname);
|
||||||
@Select( "select count(*) FROM (select request_ip FROM log where create_time between #{date1} and #{date2} GROUP BY request_ip) as s")
|
@Select( "select count(*) FROM (select request_ip FROM log where create_time between #{date1} and #{date2} GROUP BY request_ip) as s")
|
||||||
long findIp(@Param("date1") String date1, @Param("date2")String date2);
|
long findIp(@Param("date1") String date1, @Param("date2")String date2);
|
||||||
|
Reference in New Issue
Block a user