Commit 0d488e30 authored by 喻春霖's avatar 喻春霖

fixed

parent 3cd26ee8
......@@ -2,6 +2,7 @@ package com.chineseall.eden.authcenter.agent.controller;
import cn.sh.chineseall.framework.core.util.ArrayUtils;
import cn.sh.chineseall.framework.core.util.StringUtils;
import cn.sh.chineseall.framework.lang.calendar.DateUtils;
import com.chineseall.eden.authcenter.agent.client.AuthUserInfo;
import com.chineseall.eden.authcenter.agent.client.ClientDataInfo;
import com.chineseall.eden.authcenter.agent.client.ClientItem;
......@@ -29,6 +30,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
......@@ -190,6 +192,13 @@ public class AuthController {
authLog.setVersion(version);
authLog.setDevice(device);
authLog.setOs(os);
Date now = new Date();
String yearMonthDay = DateUtils.dateToString(now, "yyyy-MM-dd");
String yearMonth = DateUtils.dateToString(now, "yyyy-MM");
String year = DateUtils.dateToString(now, "yyyy");
authLog.setYear(year);
authLog.setYearMonth(yearMonth);
authLog.setYearMonthDay(yearMonthDay);
authLogService.save(authLog);
response.sendRedirect(loginUrl);
return null;
......
......@@ -95,7 +95,7 @@
} else if (idp=="szjc") {
window.location.href = baseUrl+ "edenoperation&loginUrl=" + encodeURIComponent(loginUrl2)+"&browser="+info.browser+"&device="+info.device+"&os="+info.os+"&version="+info.version;
} else {
window.location.href = baseUrl+"qpjy&loginUrl=" + encodeURIComponent(loginUrl3+"&auth_source="+idp)+"&browser="+info.browser+"&device="+info.device+"&os="+info.os+"&version="+info.version;
window.location.href = baseUrl+idp+"&loginUrl=" + encodeURIComponent(loginUrl3+"&auth_source="+idp)+"&browser="+info.browser+"&device="+info.device+"&os="+info.os+"&version="+info.version;
}
}
</script>
......
......@@ -70,6 +70,15 @@ public class AuthLog implements CacheDimensionDocument {
@DocumentField
private String device;
@DocumentField
private String year;
@DocumentField
private String yearMonth;
@DocumentField
private String yearMonthDay;
@Override
public String[] generateCacheDimensions() {
return new String[0];
......
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