修复读邮件数量问题

This commit is contained in:
LuoYe_MyWork 2020-05-08 17:27:49 +08:00
parent 057d43e5c6
commit a3b0e2a0e6
2 changed files with 3 additions and 8 deletions

View File

@ -50,20 +50,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.apply(usernamePasswordAuthenticationConfig);
/*关闭创建session*/
http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);
/*formLogin()
.loginPage("/user/login")// 登陆页面
.loginProcessingUrl("/user/loginFrom")// 登陆表单提交请求
.and()*/
http.authorizeRequests().antMatchers("/user/login", "/user/loginFrom", "/auth2/getGithubUrl").permitAll()// 指定相应的请求 不需要验证
// .and()
// .authorizeRequests().antMatchers("/quartz/**").permitAll()//测试
.anyRequest()// 任何请求
.authenticated();// 都需要身份认证
// http.exceptionHandling().accessDeniedHandler();
// http.formLogin().loginProcessingUrl("api/getInfo");
// http.formLogin().usernameParameter("username");
// http.formLogin().passwordParameter("password");
}

View File

@ -206,6 +206,9 @@ public class OutlookServiceImpl extends ServiceImpl<OutlookMapper, Outlook> impl
count = jsonObject.get("value").getAsJsonArray().size();
}
JsonArray value = jsonObject.get("value").getAsJsonArray();
if (count == 0) {
count = value.size();
}
for (int i = 0; i < count - 1; i++) {
JsonObject mail = value.get(i).getAsJsonObject();
String id = mail.get("id").getAsString();