Commit b0757e95 authored by 喻春霖's avatar 喻春霖

整理登录成功的数据

parent d247208b
......@@ -393,7 +393,9 @@ public class LogStatisticsController {
public MapMessage sourcedata() {
int i = 1;
for (;;){
List<AuthLog> authLogs = authLogService.listLogWithPage(i, 100);
Map<String,Object> param = new HashMap<>();
param.put("loginSuccessFlag", true);
List<AuthLog> authLogs = authLogService.listLogWithPage(i, 100,param);
if (CollectionUtils.isEmpty(authLogs)){
break;
}
......
......@@ -71,8 +71,13 @@ public class AuthLogDao extends StaticCacheDimensionDocumentMongoDao<AuthLog, St
return count(query);
}
public List<AuthLog> listLogWithPage(int pageNo, int pageSize) {
public List<AuthLog> listLogWithPage(int pageNo, int pageSize,Map<String, Object> prams) {
Criteria criteria = new Criteria();
if (null != prams && prams.size() > 0){
prams.forEach((k,v)->{
criteria.and(k).is(v);
});
}
Query query = new Query(criteria);
Sort sort = new Sort(Sort.Direction.ASC, "createTime");
Pageable pageable = new PageRequest(pageNo-1, pageSize, sort);
......
......@@ -21,5 +21,5 @@ public interface AuthLogService {
void replace(AuthLog authLog);
public List<AuthLog> listLogWithPage(int pageNo, int pageSize);
public List<AuthLog> listLogWithPage(int pageNo, int pageSize,Map<String, Object> prams);
}
......@@ -60,7 +60,7 @@ public class AuthLogServiceImpl implements AuthLogService {
}
@Override
public List<AuthLog> listLogWithPage(int pageNo, int pageSize) {
return authLogDao.listLogWithPage(pageNo,pageSize);
public List<AuthLog> listLogWithPage(int pageNo, int pageSize,Map<String, Object> prams) {
return authLogDao.listLogWithPage(pageNo,pageSize,prams);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment