mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 03:28:39 +09:00
공지사항 불필요한 리스트 수정 및 FAQ 추가 개발 진행
This commit is contained in:
@@ -13,14 +13,14 @@
|
||||
FROM
|
||||
hubez_common.EZ_NTBBS N1
|
||||
WHERE 1 = 1
|
||||
<include refid="NoticeListCondition"></include>
|
||||
<include refid="ListCondition"></include>
|
||||
</select>
|
||||
|
||||
<!-- 공지사항 조회 -->
|
||||
<select id="selectNoticeList"
|
||||
parameterType="kr.co.uplus.ez.api.homeMgt.dto.NoticeListReqDto"
|
||||
resultType="kr.co.uplus.ez.api.homeMgt.dto.NoticeDto">
|
||||
/* sysMgt-mapper.xml(selectNoticeList) */
|
||||
/* homeMgt-mapper.xml(selectNoticeList) */
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
NT_NO,
|
||||
@@ -79,7 +79,7 @@
|
||||
FROM
|
||||
hubez_common.EZ_NTBBS N1 , ( SELECT @ROWNUM := #{page} ) AS R
|
||||
WHERE 1=1
|
||||
<include refid="NoticeListCondition"></include>
|
||||
<include refid="ListCondition"></include>
|
||||
ORDER BY N1.REG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
</select>
|
||||
@@ -88,13 +88,13 @@
|
||||
<select id="selectNoticeNumber"
|
||||
parameterType="kr.co.uplus.ez.api.homeMgt.dto.NoticeListReqDto"
|
||||
resultType="int">
|
||||
/* sysMgt-mapper.xml(selectNoticeList) */
|
||||
/* homeMgt-mapper.xml(selectNoticeList) */
|
||||
SELECT
|
||||
NT_NO,
|
||||
FROM
|
||||
hubez_common.EZ_NTBBS N1
|
||||
WHERE 1=1
|
||||
<include refid="NoticeListCondition"></include>
|
||||
<include refid="ListCondition"></include>
|
||||
ORDER BY N1.REG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
</select>
|
||||
@@ -174,8 +174,7 @@
|
||||
/* homeMgt-mapper.xml (updateNotice) */
|
||||
UPDATE hubez_common.EZ_NTBBS
|
||||
SET
|
||||
CHG_DT = now()
|
||||
,CTG_CD = #{ctgCd}
|
||||
CTG_CD = #{ctgCd}
|
||||
,EMG_YN = #{emgYn}
|
||||
,USE_YN = #{useYn}
|
||||
,TITLE = #{title}
|
||||
@@ -216,9 +215,125 @@
|
||||
</foreach>
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
|
||||
<!-- faq 개수 조회 -->
|
||||
<select id="selectFaqTotalCnt"
|
||||
parameterType="kr.co.uplus.ez.api.homeMgt.dto.FaqListReqDto"
|
||||
resultType="int">
|
||||
/* homeMgt-mapper.xml(selectFaqTotalCnt) */
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
hubez_common.EZ_FAQ N1
|
||||
WHERE 1 = 1
|
||||
<include refid="ListCondition"></include>
|
||||
</select>
|
||||
|
||||
<!-- faq 조회 -->
|
||||
<select id="selectFaqList" parameterType="kr.co.uplus.ez.api.homeMgt.dto.FaqListReqDto"
|
||||
resultType="kr.co.uplus.ez.api.homeMgt.dto.FaqDto">
|
||||
/* homeMgt-mapper.xml(selectFaqList) */
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
FAQ_NO,
|
||||
CTG_CD,
|
||||
(
|
||||
SELECT DTL_CD_NM
|
||||
FROM hubez_common.EZ_CD_DTL
|
||||
WHERE DTL_CD = N1.CTG_CD
|
||||
AND GRP_CD = 'FAQ_CTG_CD' AND USE_YN = 'Y'
|
||||
) AS CTG_CD_NM,
|
||||
TITLE,
|
||||
REPLACE(FAQ_SBST,<![CDATA['<br />']]>, '\n') AS FAQ_SBST,
|
||||
USE_YN,
|
||||
RETV_CNT,
|
||||
REG_ID,
|
||||
DATE_FORMAT(REG_DT, '%Y-%m-%d') AS REG_DT,
|
||||
CHG_ID,
|
||||
CHG_DT
|
||||
FROM hubez_common.EZ_FAQ AS N1 , ( SELECT @ROWNUM := #{page} ) AS R
|
||||
WHERE 1=1
|
||||
<include refid="ListCondition"></include>
|
||||
ORDER BY N1.REG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
</select>
|
||||
|
||||
|
||||
<!-- FAQ 채번 -->
|
||||
<select id="selectFaqNumber"
|
||||
parameterType="kr.co.uplus.ez.api.homeMgt.dto.FaqListReqDto"
|
||||
resultType="int">
|
||||
/* homeMgt-mapper.xml(selectFaqList) */
|
||||
SELECT
|
||||
FAQ_NO,
|
||||
FROM
|
||||
hubez_common.EZ_FAQ N1
|
||||
WHERE 1=1
|
||||
<include refid="ListCondition"></include>
|
||||
ORDER BY N1.REG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
</select>
|
||||
|
||||
<!-- FAQ 등록 -->
|
||||
<insert id="insertFaq" parameterType="kr.co.uplus.ez.api.homeMgt.dto.InsertFaqReqDto">
|
||||
/* homeMgt-mapper.xml (insertFaq) */
|
||||
INSERT INTO
|
||||
hubez_common.EZ_FAQ(
|
||||
CTG_CD,
|
||||
TITLE,
|
||||
FAQ_SBST,
|
||||
USE_YN,
|
||||
RETV_CNT,
|
||||
REG_ID,
|
||||
REG_DT,
|
||||
CHG_ID,
|
||||
CHG_DT
|
||||
)VALUES(
|
||||
#{ctgCd},
|
||||
#{title},
|
||||
#{faqSbst},
|
||||
#{useYn},
|
||||
0,
|
||||
#{regId},
|
||||
NOW(),
|
||||
#{chgId},
|
||||
NOW()
|
||||
);
|
||||
</insert>
|
||||
|
||||
<!-- FAQ 변경 -->
|
||||
<update id="updateFaq" parameterType="kr.co.uplus.ez.api.homeMgt.dto.UpdateFaqReqDto">
|
||||
/* homeMgt-mapper.xml (updateFaq) */
|
||||
UPDATE hubez_common.EZ_FAQ
|
||||
SET
|
||||
CTG_CD = #{ctgCd}
|
||||
,USE_YN = #{useYn}
|
||||
,TITLE = #{title}
|
||||
,FAQ_SBST = #{faqSbst}
|
||||
,CHG_DT = NOW()
|
||||
,CHG_ID = #{chgId}
|
||||
WHERE
|
||||
FAQ_NO = #{faqNo}
|
||||
</update>
|
||||
|
||||
<!-- 공지사항 삭제 -->
|
||||
<delete id="deleteFaq" parameterType="kr.co.uplus.ez.api.homeMgt.dto.DeleteFaqReqDto">
|
||||
/* homeMgt-mapper.xml(deleteFaq) */
|
||||
DELETE
|
||||
FROM
|
||||
hubez_common.EZ_FAQ
|
||||
<where>
|
||||
FAQ_NO IN
|
||||
<foreach collection="list" item="item" index="i" open="("
|
||||
separator="," close=")">
|
||||
#{item.faqNo}
|
||||
</foreach>
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
<sql id="NoticeListCondition">
|
||||
<sql id="ListCondition">
|
||||
<if test="searchType1 != null and searchType1 != ''">
|
||||
AND N1.CTG_CD = #{searchType1}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user