Commit 6d170d1f authored by Quxl's avatar Quxl

优化

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