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

fixed

parent 0d488e30
...@@ -18,7 +18,7 @@ import java.text.SimpleDateFormat; ...@@ -18,7 +18,7 @@ import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
@Controller @Controller
@RequestMapping("com/chineseall/eden/authcenter/log") @RequestMapping("log")
public class AuthLogController { public class AuthLogController {
private static final String USER_NAME = "admin"; private static final String USER_NAME = "admin";
...@@ -55,94 +55,8 @@ public class AuthLogController { ...@@ -55,94 +55,8 @@ public class AuthLogController {
ModelAndView mv = new ModelAndView(); ModelAndView mv = new ModelAndView();
String flag = (String) request.getSession().getAttribute("loginFlag"); String flag = (String) request.getSession().getAttribute("loginFlag");
if(StringUtils.isNotEmpty(flag)){ if(StringUtils.isNotEmpty(flag)){
mv.setViewName("loginstat"); mv.setViewName("statistics");
// 累计登录人次
Map<String, Object> params1 = new HashMap<>();
params1.put("authSource", "上海运营中心");
params1.put("getUserInfoSuccessFlag", true);
Long loginCounts = authLogService.countLoginByParams(params1);
mv.addObject("data_total", loginCounts);
// 电教馆累计登录人次
Map<String, Object> params2 = new HashMap<>();
params2.put("authSource", "上海运营中心");
params2.put("getUserInfoSuccessFlag", true);
params2.put("oauthType", OauthType.dianjiaoguan.name());
Long dianjiaoguanLoginCounts = authLogService.countLoginByParams(params2);
mv.addObject("data_total_djg", dianjiaoguanLoginCounts);
// 省运营累计登录人次
Map<String, Object> params3 = new HashMap<>();
params3.put("authSource", "上海运营中心");
params3.put("getUserInfoSuccessFlag", true);
params3.put("oauthType", OauthType.edenoperation.name());
Long edenoperationLoginCounts = authLogService.countLoginByParams(params3);
mv.addObject("data_total_syy", edenoperationLoginCounts);
// 近30日累计登录人次
Map<String, Object> params4 = new HashMap<>();
params4.put("authSource", "上海运营中心");
params4.put("getUserInfoSuccessFlag", true);
params4.put("beginTime", getZeroTime(DateUtils.addDays(new Date(), -29)));
Long loginCounts30Day = authLogService.countLoginByParams(params4);
mv.addObject("data_30", loginCounts30Day);
// 电教馆近30日累计登录人次
Map<String, Object> params5 = new HashMap<>();
params5.put("authSource", "上海运营中心");
params5.put("getUserInfoSuccessFlag", true);
params5.put("oauthType", OauthType.dianjiaoguan.name());
params5.put("beginTime", getZeroTime(DateUtils.addDays(new Date(), -29)));
Long dianjiaoguanLoginCounts30Day = authLogService.countLoginByParams(params5);
mv.addObject("data_30_djg", dianjiaoguanLoginCounts30Day);
// 省运营近30日累计登录人次
Map<String, Object> params6 = new HashMap<>();
params6.put("authSource", "上海运营中心");
params6.put("getUserInfoSuccessFlag", true);
params6.put("oauthType", OauthType.edenoperation.name());
params6.put("beginTime", getZeroTime(DateUtils.addDays(new Date(), -29)));
Long edenoperationLoginCounts30Day = authLogService.countLoginByParams(params6);
mv.addObject("data_30_syy", edenoperationLoginCounts30Day);
// 近7日累计登录人次
Map<String, Object> params7 = new HashMap<>();
params7.put("authSource", "上海运营中心");
params7.put("getUserInfoSuccessFlag", true);
params7.put("beginTime", getZeroTime(DateUtils.addDays(new Date(), -6)));
Long loginCounts7Day = authLogService.countLoginByParams(params7);
mv.addObject("data_7", loginCounts7Day);
// 电教馆近7日累计登录人次
Map<String, Object> params8 = new HashMap<>();
params8.put("authSource", "上海运营中心");
params8.put("getUserInfoSuccessFlag", true);
params8.put("oauthType", OauthType.dianjiaoguan.name());
params8.put("beginTime", getZeroTime(DateUtils.addDays(new Date(), -6)));
Long dianjiaoguanLoginCounts7Day = authLogService.countLoginByParams(params8);
mv.addObject("data_7_djj", dianjiaoguanLoginCounts7Day);
// 省运营近7日累计登录人次
Map<String, Object> params9 = new HashMap<>();
params9.put("authSource", "上海运营中心");
params9.put("getUserInfoSuccessFlag", true);
params9.put("oauthType", OauthType.edenoperation.name());
params9.put("beginTime", getZeroTime(DateUtils.addDays(new Date(), -6)));
Long edenoperationLoginCounts7Day = authLogService.countLoginByParams(params9);
mv.addObject("data_7_syy", edenoperationLoginCounts7Day);
// 近7日登录人次查询
List<String> dates = new ArrayList<>();
List<Long> dianjiaoguanDay7counts = new ArrayList<>();
List<Long> edenoperationDay7counts = new ArrayList<>();
for(int i = 0;i<7;i++){
dates.add(getDateDtr(DateUtils.addDays(new Date(), -(6-i))));
Map<String, Object> params = new HashMap<>();
params.put("authSource", "上海运营中心");
params.put("getUserInfoSuccessFlag", true);
params.put("beginTime", getZeroTime(DateUtils.addDays(new Date(), -(6-i))));
params.put("endTime", getEndTime(DateUtils.addDays(new Date(), -(6-i))));
params.put("oauthType", OauthType.dianjiaoguan.name());
Long dianjiaoguanCounts = authLogService.countLoginByParams(params);
dianjiaoguanDay7counts.add(dianjiaoguanCounts);
params.put("oauthType", OauthType.edenoperation.name());
Long edenoperationCounts = authLogService.countLoginByParams(params);
edenoperationDay7counts.add(edenoperationCounts);
}
mv.addObject("data_time", dates);
mv.addObject("data_djg", dianjiaoguanDay7counts);
mv.addObject("data_syy", edenoperationDay7counts);
} else { } else {
response.sendRedirect("adminLogin"); response.sendRedirect("adminLogin");
return null; return null;
......
body { body {
overflow: auto; overflow: auto;
} }
.static{ .statistics-header{
width: 800px; width: 100%;
margin: 0 auto; display: flex;
background-color: white; background-color: white;
} align-items: center;
.static-title{ justify-content: space-between;
font-size: 20px; }
text-align: center; .flex {
padding-top: 50px; /* flex: 1; */
padding-bottom: 30px; }
margin-top: 0; .statistics-content {
} margin: 20px 20px;
.p-class{ display: flex;
margin-left: 120px; }
display: flex; .statistics-content-item {
} background-color: white;
margin: 10px 5px;
.p-label{ overflow: hidden;
flex-basis: 200px; }
text-align: right; .statistics-content-item-title {
margin-right: 10px; padding: 20px 0 0 20px;
} font-size: 14px;
.p-num{ }
margin-right: 10px; .nums-total {
} width: 162px;
height: 81px;
display: inline-block;
}
.nums-title {
color: white;
margin: 10px 10px;
font-weight: 700;
}
.nums-total-nums {
font-size: 24px;
}
.idp-total-nums {
color: rgb(77, 160, 255);
}
\ No newline at end of file
This diff is collapsed.
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