통계월보 전체목록 전시

master
Hyung Geun 2022-04-20 11:23:24 +09:00
parent bac8ab8220
commit cc4f8ddf6d
3 changed files with 10 additions and 16 deletions

View File

@ -34,7 +34,7 @@ public class BoardSearchVO extends BaseSearchVO {
private String id = ""; private String id = "";
/** 카테고리 이름 */ /** 카테고리 이름 */
private String category = " "; private String category = "";
/** 카테고리 이름 */ /** 카테고리 이름 */
private String searchCondition = ""; private String searchCondition = "";
@ -72,9 +72,6 @@ public class BoardSearchVO extends BaseSearchVO {
* @param id . * @param id .
*/ */
public void setCategory(String category) { public void setCategory(String category) {
if (category == null || category.equals("")) {
category = " ";
}
this.category = category; this.category = category;
} }

View File

@ -32,7 +32,7 @@
group by BF_BD_SEQ) file group by BF_BD_SEQ) file
on list.bd_seq = file.bf_bd_seq on list.bd_seq = file.bf_bd_seq
<where> <where>
<if test='category != " " or id == "stat_bbs"'> <if test='category != null and category != ""'>
AND BD_CATEGORY = #{category} AND BD_CATEGORY = #{category}
</if> </if>
<if test="searchKeyword != null and searchKeyword != ''"> <if test="searchKeyword != null and searchKeyword != ''">
@ -65,14 +65,10 @@
COUNT(*) COUNT(*)
FROM FROM
H3_BD_${id}_LIST H3_BD_${id}_LIST
WHERE 1=1 <where>
<choose> <if test='category != null and category != ""'>
<when test='category == " " and id == "stat_bbs"'> AND BD_CATEGORY = #{category}
</when> </if>
<otherwise>
AND BD_CATEGORY = #{category}
</otherwise>
</choose>
<if test="searchKeyword != null and searchKeyword != ''"> <if test="searchKeyword != null and searchKeyword != ''">
<choose> <choose>
<when test="searchCondition == 0"> <when test="searchCondition == 0">
@ -86,6 +82,7 @@
</when> </when>
</choose> </choose>
</if> </if>
</where>
</select> </select>
<select id="Board.selectBoard" parameterType="boardVO" resultType="boardVO"> <select id="Board.selectBoard" parameterType="boardVO" resultType="boardVO">

View File

@ -71,10 +71,10 @@
<div class="tabs"> <div class="tabs">
<ul> <ul>
<!-- 전체 --> <!-- 전체 -->
<c:if test="${searchVO.category eq ' '}"> <c:if test="${searchVO.category eq ''}">
<li class="selected"><a href="?id=${searchVO.id}&category="><spring:message code="stats.all" /></a></li> <li class="selected"><a href="?id=${searchVO.id}&category="><spring:message code="stats.all" /></a></li>
</c:if> </c:if>
<c:if test="${searchVO.category ne ' '}"> <c:if test="${searchVO.category ne ''}">
<li><a href="?id=${searchVO.id}&category="><spring:message code="stats.all" /></a></li> <li><a href="?id=${searchVO.id}&category="><spring:message code="stats.all" /></a></li>
</c:if> </c:if>