메인페이지 게시물 획득 쿼리 수정.

master
강석 최 2022-03-28 11:15:31 +09:00
parent db70792bf3
commit 20df991f64
3 changed files with 31 additions and 34 deletions

View File

@ -72,9 +72,6 @@ public class BoardSearchVO extends BaseSearchVO {
* @param id .
*/
public void setCategory(String category) {
if (category == null || category.equals("")) {
category = " ";
}
this.category = category;
}

View File

@ -91,6 +91,7 @@ public class CommonController {
if (EgovUserDetailsHelper.isAuthenticated()) {
BoardSearchVO searchVO = new BoardSearchVO();
searchVO.setRecordCountPerPage(5);
searchVO.setCategory(null);
/* 내실적 조회 리스트 */
LoginUserVO loginUserVO = UserUtil.getMemberInfo();

View File

@ -19,15 +19,13 @@
SELECT
*
FROM H3_BD_${id}_LIST BBS
WHERE 1 = 1
<choose>
<when test='category == " " and id == "stat_bbs"'>
</when>
<otherwise>
<where>
<if test='category != null'>
AND BD_CATEGORY = #{category}
</otherwise>
</choose>
</if>
<!--<if test='id != "stat_bbs"'>
AND BD_CATEGORY = #{category}
</if>-->
<if test="searchKeyword != null and searchKeyword != ''">
<choose>
<when test="searchCondition == 0">
@ -41,6 +39,7 @@
</when>
</choose>
</if>
</where>
ORDER BY
BBS.BD_NOTICE DESC,
BBS.BD_GROUP_SEQ DESC,