/* Notice.selectNoticeList */ SELECT np_idx AS npIdx , np_subject AS npSubject , np_writer AS npWriter , np_regdate AS npRegdate , np_start AS npStart , np_end AS npEnd FROM h2_notice_popup WHERE 1 = 1 AND NP_WRITER LIKE CONCAT('%' , #{searchKeyword} , '%') AND NP_SUBJECT LIKE CONCAT('%' , #{searchKeyword} , '%') ORDER BY np_idx DESC LIMIT #{firstIndex} , #{recordCountPerPage}
/* Notice.selectNoticeTotalCnt */ SELECT COUNT(*) FROM h2_notice_popup WHERE 1 = 1 AND NP_WRITER LIKE CONCAT('%' , #{searchKeyword} , '%') AND NP_SUBJECT LIKE CONCAT('%' , #{searchKeyword} , '%')
/* Notice.selectNoticeListTotCnt */ SELECT COUNT(*) FROM h2_notice_popup WHERE 1 = 1 AND NP_WRITER LIKE CONCAT('%' , #{searchKeyword} , '%') AND NP_SUBJECT LIKE CONCAT('%' , #{searchKeyword} , '%')
/* Notice.selectNotice */ SELECT np_idx AS npIdx , np_subject AS npSubject , np_text AS npText , np_writer AS npWriter , np_regdate AS npRegdate , np_active AS npActive , np_width AS npWidth , np_height AS npHeight , np_start AS npStart , np_end AS npEnd FROM h2_notice_popup WHERE np_idx = #{npIdx}
SELECT IFNULL(MAX(np_idx) + 1, 1) FROM h2_notice_popup
/* Notice.insertNotice */ INSERT INTO h2_notice_popup( np_idx , np_subject , np_text , np_active , np_width , np_height , np_writer , np_regdate , np_start , np_end )VALUES( #{npIdx} , #{npSubject} , #{npText} , #{npActive} , #{npWidth} , #{npHeight} , #{npWriter} , NOW() , #{npStart} , #{npEnd} )
/* Notice.selectPrevSeq */ SELECT IFNULL(MIN(NP_IDX), 0) AS NP_IDX FROM h2_notice_popup WHERE NP_IDX > #{npIdx}
/* Notice.selectNextSeq */ SELECT IFNULL(MAX(NP_IDX), 0) AS NP_IDX FROM h2_notice_popup WHERE NP_IDX < #{npIdx}
/* Notice.updateNotice */ UPDATE h2_notice_popup SET NP_SUBJECT = #{npSubject} , NP_TEXT = #{npText} , NP_START = #{npStart} , NP_END = #{npEnd} , NP_HEIGHT = #{npHeight} , NP_WIDTH = #{npWidth} , NP_ACTIVE = #{npActive} WHERE NP_IDX = #{npIdx}
/* Notice.deleteNotice */ DELETE FROM h2_notice_popup WHERE NP_IDX = #{npIdx}
select np_idx AS npIdx , np_subject AS npSubject , np_text AS npText , np_writer AS npWriter , np_regdate AS npRegdate , np_active AS npActive , np_width AS npWidth , np_height AS npHeight , np_start AS npStart , np_end AS npEnd from h2_notice_popup where NP_START <= NOW() and NP_END >= NOW() and NP_ACTIVE = 'Y'