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

fixed

parent 0d488e30
......@@ -18,7 +18,7 @@ import java.text.SimpleDateFormat;
import java.util.*;
@Controller
@RequestMapping("com/chineseall/eden/authcenter/log")
@RequestMapping("log")
public class AuthLogController {
private static final String USER_NAME = "admin";
......@@ -55,94 +55,8 @@ public class AuthLogController {
ModelAndView mv = new ModelAndView();
String flag = (String) request.getSession().getAttribute("loginFlag");
if(StringUtils.isNotEmpty(flag)){
mv.setViewName("loginstat");
// 累计登录人次
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);
mv.setViewName("statistics");
} else {
response.sendRedirect("adminLogin");
return null;
......
body {
overflow: auto;
}
.static{
width: 800px;
margin: 0 auto;
.statistics-header{
width: 100%;
display: flex;
background-color: white;
align-items: center;
justify-content: space-between;
}
.static-title{
font-size: 20px;
text-align: center;
padding-top: 50px;
padding-bottom: 30px;
margin-top: 0;
.flex {
/* flex: 1; */
}
.p-class{
margin-left: 120px;
.statistics-content {
margin: 20px 20px;
display: flex;
}
.p-label{
flex-basis: 200px;
text-align: right;
margin-right: 10px;
.statistics-content-item {
background-color: white;
margin: 10px 5px;
overflow: hidden;
}
.statistics-content-item-title {
padding: 20px 0 0 20px;
font-size: 14px;
}
.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;
}
.p-num{
margin-right: 10px;
.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