feat: 로그인시 게시판 목록 조회 caching 처리 진행중
parent
8c7117f0b0
commit
2fd247860d
@ -1,4 +1,4 @@
|
||||
package kr.xit.framework.biz.cmm.mapper;
|
||||
package kr.xit.framework.biz.cache.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package kr.xit.framework.biz.cmm.mapper;
|
||||
package kr.xit.framework.biz.cache.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package kr.xit.framework.biz.cmm.service;
|
||||
package kr.xit.framework.biz.cache.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
@ -1,4 +1,4 @@
|
||||
package kr.xit.framework.biz.cmm;
|
||||
package kr.xit.framework.biz.cache.util;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
@ -1,4 +1,4 @@
|
||||
package kr.xit.framework.biz.cmm;
|
||||
package kr.xit.framework.biz.cache.util;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
@ -1,12 +1,12 @@
|
||||
package kr.xit.framework.biz.cmm.web;
|
||||
package kr.xit.framework.biz.cache.web;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import kr.xit.framework.biz.cmm.CacheCodeUtils;
|
||||
import kr.xit.framework.biz.cmm.CacheMenuUtils;
|
||||
import kr.xit.framework.biz.cache.util.CacheCodeUtils;
|
||||
import kr.xit.framework.biz.cache.util.CacheMenuUtils;
|
||||
import kr.xit.framework.core.constants.FrameworkConstants;
|
||||
|
||||
/**
|
@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="kr.xit.framework.biz.cache.mapper">
|
||||
|
||||
<resultMap id="findListResultMap" type="kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngVO">
|
||||
<result column="nttSj" property="nttSj" />
|
||||
<result column="ntcrId" property="ntcrId" />
|
||||
<result column="ntcrNm" property="ntcrNm" />
|
||||
<result column="nttNo" property="nttNo" />
|
||||
<result column="nttCn" property="nttCn" />
|
||||
<result column="password" property="password" />
|
||||
<result column="frstRegisterId" property="frstRegisterId" />
|
||||
<result column="frstRegisterNm" property="frstRegisterNm" />
|
||||
<result column="frstRegisterPnttm" property="frstRegisterPnttm" />
|
||||
<result column="ntceBgnde" property="ntceBgnde" />
|
||||
<result column="ntceEndde" property="ntceEndde" />
|
||||
<result column="inqireCo" property="inqireCo" />
|
||||
<result column="useAt" property="useAt" />
|
||||
<result column="atchFileId" property="atchFileId" />
|
||||
<result column="bbsId" property="bbsId" />
|
||||
<result column="nttId" property="nttId" />
|
||||
<result column="parnts" property="parnts" />
|
||||
<result column="replyAt" property="replyAt" />
|
||||
<result column="replyLc" property="replyLc" />
|
||||
<result column="sortOrdr" property="sortOrdr" />
|
||||
<result column="bbsTyCode" property="bbsTyCode" />
|
||||
<result column="bbsAttrbCode" property="bbsAttrbCode" />
|
||||
<result column="replyPosblAt" property="replyPosblAt" />
|
||||
<result column="fileAtchPosblAt" property="fileAtchPosblAt" />
|
||||
<result column="posblAtchFileNumber" property="posblAtchFileNumber" />
|
||||
<result column="bbsNm" property="bbsNm" />
|
||||
<collection column="{bbsId=bbsId, nttId=nttId}" property="_children" select="findListChildren" javaType="java.util.List" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectLatestBbsList" resultType="kr.xit.framework.biz.cmm.model.XitBbsVO">
|
||||
/* cacheboard-mysql-mapper|selectLatestBbsList-게시판 최신 게시글 목록 조회|julim */
|
||||
SELECT bbs_id
|
||||
, ntt_id
|
||||
, ntt_no
|
||||
, ntt_sj
|
||||
, ntt_cn
|
||||
, answer_at
|
||||
, parnts_sntnc_no
|
||||
, answer_lc
|
||||
, sort_ordr
|
||||
, rdcnt
|
||||
, use_at
|
||||
, ntce_begin_de
|
||||
, ntce_end_de
|
||||
, ntcr_id
|
||||
, ntcr_nm
|
||||
, password
|
||||
, atch_file_id
|
||||
, frst_regist_pnttm
|
||||
, frst_register_id
|
||||
, last_updt_pnttm
|
||||
, last_updusr_id
|
||||
FROM xit_bbs
|
||||
<where>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(bbsId)">
|
||||
AND BBS_ID = #{bbsId}
|
||||
</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(parntsSntncNo)">
|
||||
AND PARNTS_SNTNC_NO = #{parntsSntncNo}
|
||||
</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(useAt)">
|
||||
AND USE_AT = #{useAt}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY frst_regist_pnttm DESC
|
||||
</select>
|
||||
|
||||
<select id="selectBaseBbsList" resultMap="findListResultMap">
|
||||
/* cacheboard-mysql-mapper|selectBaseBbsList-기본(공용)게시판 목록 조회|julim */
|
||||
<include refid="sqlBbs"/>
|
||||
<choose>
|
||||
<when test="'0'.toString() == searchCnd">
|
||||
AND INSTR(XB.ntt_sj, #{searchWrd}) > 0
|
||||
</when>
|
||||
<when test="'1'.toString() == searchCnd">
|
||||
AND INSTR(XB.ntt_cn, #{searchWrd}) > 0
|
||||
</when>
|
||||
<when test="'2'.toString() == searchCnd">
|
||||
AND INSTR(XB.user_nm, #{searchWrd}) > 0
|
||||
</when>
|
||||
</choose>
|
||||
ORDER BY XB.frst_regist_pnttm DESC limit 100000
|
||||
</select>
|
||||
|
||||
<select id="selectBaseChildList" resultMap="findListResultMap">
|
||||
/* cacheboard-mysql-mapper|selectBaseChildListt-기본(공용)게시판 자식 목록 조회|julim */
|
||||
<include refid="sqlBbs"/>
|
||||
ORDER BY XB.frst_regist_pnttm ASC
|
||||
</select>
|
||||
|
||||
<sql id="sqlBbs">
|
||||
SELECT XB.ntt_sj
|
||||
, XB.ntcr_id
|
||||
, XB.ntcr_nm
|
||||
, XB.ntt_no
|
||||
, XB.ntt_cn
|
||||
, XB.password
|
||||
, XB.frst_register_id
|
||||
, IFNULL(VUM.user_nm, XB.ntcr_nm) AS frstRegisterNm
|
||||
, DATE_FORMAT(XB.frst_regist_pnttm, '%Y-%m-%d') AS frstRegisterPnttm
|
||||
, XB.ntce_begin_de
|
||||
, XB.ntce_end_de
|
||||
, XB.rdcnt AS inqireCo
|
||||
, XB.use_at
|
||||
, XB.atch_file_id
|
||||
, XB.bbs_id
|
||||
, XB.ntt_id
|
||||
, XB.parnts_sntnc_no AS parnts
|
||||
, XB.answer_at
|
||||
, XB.answer_lc
|
||||
, XB.sort_ordr
|
||||
, XBM.bbs_ty_code
|
||||
, XBM.bbs_attrb_code
|
||||
, XBM.reply_posbl_at
|
||||
, XBM.file_atch_posbl_at
|
||||
, XBM.atch_posbl_file_number
|
||||
, XBM.BBS_NM
|
||||
FROM xit_bbs xb
|
||||
LEFT OUTER JOIN xit_vw_user_mastr VUM
|
||||
ON XB.frst_register_id = VUM.esntl_id
|
||||
LEFT OUTER JOIN xit_bbs_mastr XBM
|
||||
ON XB.bbs_id = XBM.bbs_id
|
||||
WHERE XB.BBS_ID = #{bbsId}
|
||||
<choose>
|
||||
<when test='nttId != null and nttId != ""'>
|
||||
AND XB.parnts_sntnc_no = #{nttId}
|
||||
AND XB.parnts_sntnc_no != 0
|
||||
</when>
|
||||
<otherwise>
|
||||
AND XB.parnts_sntnc_no = 0
|
||||
</otherwise>
|
||||
</choose>
|
||||
</sql>
|
||||
</mapper>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="kr.xit.framework.biz.cmm.mapper.CacheCodeMapper">
|
||||
<mapper namespace="kr.xit.framework.biz.cache.mapper.CacheCodeMapper">
|
||||
|
||||
<select id="selectCodes" parameterType="string" resultType="caseMap">
|
||||
/* cachecode-mysql-mapper|selectCodes-공통코드 코드그룹 조회|julim */
|
Loading…
Reference in New Issue