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,12 +87,14 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter { ...@@ -87,12 +87,14 @@ 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();
if(cookies != null) {
for(Cookie cookie : cookies) { for(Cookie cookie : cookies) {
if(cookie.getName().equals(name)) { if(cookie.getName().equals(name)) {
return cookie; return cookie;
} }
} }
} }
}
return null; return null;
} }
......
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