Commit 6d170d1f authored by Quxl's avatar Quxl

优化

parent f3d0d8cf
......@@ -72,7 +72,8 @@ public class UserReviewServiceImpl implements UserReviewService {
+ "left join fc_film_review review on review.film_id = allot.film_id and review.uid = allot.uid and review.round = allot.review_round "
+ "where "
+ "allot.uid = ? "
+ "and review.state > 0" + StringUtil.join(" and ", " ", "", "", strs);
+ "and review.state > 0"
+ StringUtil.join(" and ", " ", "", "", strs);
return jdbcTemplate.limit(sql, page, args.toArray());
}
......@@ -121,7 +122,8 @@ public class UserReviewServiceImpl implements UserReviewService {
+ "left join fc_film_review review on review.film_id = allot.film_id and review.uid = allot.uid and review.round = allot.review_round "
+ "where "
+ "allot.uid = ? "
+ "and review.state is null" + StringUtil.join(" and ", " ", "", "", strs);
+ "and review.state is null"
+ StringUtil.join(" and ", " ", "", "", strs);
return jdbcTemplate.limit(sql, page, args.toArray());
}
......
......@@ -87,9 +87,11 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter {
HttpServletRequest request = WebMvcConfig.getRequest();
if(request != null) {
Cookie[] cookies = request.getCookies();
for(Cookie cookie : cookies) {
if(cookie.getName().equals(name)) {
return cookie;
if(cookies != null) {
for(Cookie cookie : cookies) {
if(cookie.getName().equals(name)) {
return cookie;
}
}
}
}
......
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