Commit 09fa918f authored by wangsong's avatar wangsong

fix problem

parent b65852c8
...@@ -208,12 +208,6 @@ public class StatisticsController { ...@@ -208,12 +208,6 @@ public class StatisticsController {
@ResponseBody @ResponseBody
public MapMessage authUserTypes(@RequestParam(value = "clientId", required = false) String clientId, @RequestParam(value = "latestDays", defaultValue = "7") Integer latestDays) { public MapMessage authUserTypes(@RequestParam(value = "clientId", required = false) String clientId, @RequestParam(value = "latestDays", defaultValue = "7") Integer latestDays) {
Map<String,Object> param = new HashMap<>();
param.put("loginSuccessFlag", true);
if (clientId != null){
param.put("clientId",clientId);
}
int type = 1; // 1: 日数据 2: 月数据 int type = 1; // 1: 日数据 2: 月数据
if(latestDays > 30){ if(latestDays > 30){
type = 2; type = 2;
...@@ -223,6 +217,12 @@ public class StatisticsController { ...@@ -223,6 +217,12 @@ public class StatisticsController {
List<Map<String,Object>> dataList = new ArrayList<>(); List<Map<String,Object>> dataList = new ArrayList<>();
Date endDate = new Date(); Date endDate = new Date();
while(startDate.before(endDate)){ while(startDate.before(endDate)){
Map<String,Object> param = new HashMap<>();
param.put("loginSuccessFlag", true);
if (clientId != null){
param.put("clientId",clientId);
}
String dateStr = ""; String dateStr = "";
if(Objects.equals(type, 1)){ // 日数据 if(Objects.equals(type, 1)){ // 日数据
String yearMonthDay = DateUtils.dateToString(startDate, "yyyy-MM-dd"); String yearMonthDay = DateUtils.dateToString(startDate, "yyyy-MM-dd");
......
...@@ -17,8 +17,8 @@ public class ApiInterceptorConfig extends WebMvcConfigurerAdapter { ...@@ -17,8 +17,8 @@ public class ApiInterceptorConfig extends WebMvcConfigurerAdapter {
@Override @Override
public void addInterceptors(InterceptorRegistry registry) { public void addInterceptors(InterceptorRegistry registry) {
//注册TestInterceptor拦截器 //注册TestInterceptor拦截器
// InterceptorRegistration registration = registry.addInterceptor(apiInterceptor); InterceptorRegistration registration = registry.addInterceptor(apiInterceptor);
// registration.addPathPatterns("/config/**"); // registration.addPathPatterns("/config/**"); //
} }
@Override @Override
......
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