게시판을 추가해 보자
http://localhost:8080/egovframework-all-in-one/ 에서
업무사용자
로그인 : TEST1
PW : 공통12
로그인 한 뒤에
협업 > 게시판 속성관리 에서 '등록'을 누른다.
공지사항 게시판 부터 만들자
- 게시판 유형 '공지게시판' 선택
공지사항 게시판이 생성되었다.
게시판 명 : 공지사항을 클릭하면 게시판 수정화면이 나옴
----
게시판 사용등록
추가한 게시판을 사용하도록 선택해야 하므로
등록 버튼을 누른다.
게시판명 옆에 돋보기 아이콘을 누르면 게시판 목록이 나온다.
'공지사항'게시판 끝에 선택버튼을 누른다.
사용할 대상선택
일단은 뭔지 모르니까 '시스템'을 선택하고 등록버튼 클릭
등록 목록에 나옴
게시판 명 '공지사항'을 클릭하면
게시판의 사용정보가 나온다.
제공 URL이 해당 게시판 접속정보다.
제공 URL을 클릭하면
공지사항 게시판이 나온다.
게시물이 없으므로 등록 버튼을 누르면
게시물 등록화면이 나온다.
-- firefox 에서 에디터에 글쓰기가 안된다. 커서가 에디터 안으로 안들어가짐. ㅜ.ㅜ chrome에서는 됨.
공지사항을 등록한 결과
제목을 클릭하여 내용을 보면
게시판 생성할 때 댓글기능을 넣어서
댓글목록과 달기 기능이 있는데
그렇게 이쁘지는 않군...
글 내용도 짧으니 최소영역없이 한줄만 나오는것도...
템플릿 파일을 만들어 템플릿 변경을 하면 좀 낫겠지...
-----
게시판 추가시 발생하는 내용
쿼리는 대략 이렇다..
로그 파일에 쭉~ 나오는 결과임.
[IDGeneration Service] key_table에 대한 10 ID의 새로운 블록을 할당 BBS_ID.
SELECT next_id FROM COMTECOPSEQ WHERE table_name = 'BBS_ID'
UPDATE COMTECOPSEQ SET next_id = 11 WHERE table_name = 'BBS_ID'
INSERT INTO COMTNBBSMASTER (BBS_ID, BBS_TY_CODE, BBS_ATTRB_CODE, BBS_NM, BBS_INTRCN, REPLY_POSBL_AT,
FILE_ATCH_POSBL_AT, ATCH_POSBL_FILE_NUMBER, ATCH_POSBL_FILE_SIZE, TMPLAT_ID, USE_AT, FRST_REGISTER_ID,
FRST_REGIST_PNTTM ) VALUES ( 'BBSMSTR_000000000001', 'BBST03', 'BBSA01', '공지사항', '공지사항 게시판',
'N', 'Y', 3, NULL, 'TMPLAT_BOARD_DEFAULT', 'Y', 'USRCNFRM_00000000000', SYSDATE() )
INSERT INTO COMTNBBSMASTEROPTN (BBS_ID, ANSWER_AT, STSFDG_AT, FRST_REGISTER_ID, FRST_REGIST_PNTTM
) VALUES ( 'BBSMSTR_000000000001', 'Y', 'N', 'USRCNFRM_00000000000', SYSDATE() )
SELECT a.BBS_ID, a.BBS_TY_CODE, b.CODE_NM as BBS_TY_CODE_NM, a.BBS_ATTRB_CODE, c.CODE_NM as
BBS_ATTRB_CODE_NM, a.BBS_NM, a.TMPLAT_ID, a.USE_AT, DATE_FORMAT(a.FRST_REGIST_PNTTM, '%Y-%m-%d')
as FRST_REGIST_PNTTM FROM COMTNBBSMASTER a LEFT OUTER JOIN (SELECT CODE_ID, CODE, CODE_NM FROM
COMTCCMMNDETAILCODE WHERE CODE_ID = 'COM004' AND USE_AT='Y') b ON a.BBS_TY_CODE = b.CODE LEFT
OUTER JOIN (SELECT CODE_ID, CODE, CODE_NM FROM COMTCCMMNDETAILCODE WHERE CODE_ID = 'COM009'
AND USE_AT='Y') c ON a.BBS_ATTRB_CODE = c.CODE WHERE 1=1 ORDER BY a.FRST_REGIST_PNTTM DESC
LIMIT 10 OFFSET 0
SELECT COUNT(a.BBS_ID) FROM COMTNBBSMASTER a LEFT OUTER JOIN (SELECT CODE_ID, CODE, CODE_NM
FROM COMTCCMMNDETAILCODE WHERE CODE_ID = 'COM004' AND USE_AT='Y') b ON a.BBS_TY_CODE = b.CODE
LEFT OUTER JOIN (SELECT CODE_ID, CODE, CODE_NM FROM COMTCCMMNDETAILCODE WHERE CODE_ID = 'COM009'
AND USE_AT='Y') c ON a.BBS_ATTRB_CODE = c.CODE WHERE 1=1
게시판 사용등록
SELECT a.BBS_ID, e.BBS_NM, a.TRGET_ID, a.REGIST_SE_CODE, b.CODE_NM as REGIST_SE_CODE_NM, a.USE_AT,
a.FRST_REGISTER_ID, a.FRST_REGIST_PNTTM, c.CMMNTY_ID, c.CMMNTY_NM, d.CLB_ID, d.CLB_NM, e.BBS_TY_CODE
FROM COMTNBBSUSE a LEFT OUTER JOIN COMTNBBSMASTER e ON a.BBS_ID = e.BBS_ID LEFT OUTER JOIN
COMTCCMMNDETAILCODE b ON b.CODE = a.REGIST_SE_CODE LEFT OUTER JOIN COMTNCMMNTY c ON a.TRGET_ID
= c.CMMNTY_ID LEFT OUTER JOIN COMTNCLUB d ON a.TRGET_ID = d.CLB_ID WHERE b.CODE_ID = 'COM001'
AND a.REGIST_SE_CODE != 'REGC07' ORDER BY a.FRST_REGIST_PNTTM DESC LIMIT 10 OFFSET 0
SELECT COUNT(a.BBS_ID) FROM COMTNBBSUSE a LEFT OUTER JOIN COMTNBBSMASTER e ON a.BBS_ID = e.BBS_ID
LEFT OUTER JOIN COMTCCMMNDETAILCODE b ON b.CODE = a.REGIST_SE_CODE WHERE b.CODE_ID = 'COM001'
AND a.REGIST_SE_CODE != 'REGC07'
게시글 목록
SELECT a.BBS_ID, e.BBS_NM, a.TRGET_ID, a.REGIST_SE_CODE, b.CODE_NM as REGIST_SE_CODE_NM, a.USE_AT,
a.FRST_REGISTER_ID, a.FRST_REGIST_PNTTM, c.CMMNTY_ID, c.CMMNTY_NM, d.CLB_ID, d.CLB_NM, e.BBS_TY_CODE
FROM COMTNBBSUSE a LEFT OUTER JOIN COMTNBBSMASTER e ON a.BBS_ID = e.BBS_ID LEFT OUTER JOIN
COMTCCMMNDETAILCODE b ON b.CODE = a.REGIST_SE_CODE LEFT OUTER JOIN COMTNCMMNTY c ON a.TRGET_ID
= c.CMMNTY_ID LEFT OUTER JOIN COMTNCLUB d ON a.TRGET_ID = d.CLB_ID WHERE b.CODE_ID = 'COM001'
AND a.BBS_ID = 'BBSMSTR_000000000001' AND a.TRGET_ID = 'SYSTEM_DEFAULT_BOARD'
SELECT a.BBS_ID, a.BBS_TY_CODE, b.CODE_NM as BBS_TY_CODE_NM, a.BBS_INTRCN, a.BBS_ATTRB_CODE,
c.CODE_NM as BBS_ATTRB_CODE_NM, a.BBS_NM, a.TMPLAT_ID, d.TMPLAT_NM, d.TMPLAT_COURS, a.FILE_ATCH_POSBL_AT,
a.ATCH_POSBL_FILE_NUMBER, a.ATCH_POSBL_FILE_SIZE, a.REPLY_POSBL_AT, a.FRST_REGISTER_ID, e.USER_NM
as FRST_REGISTER_NM, a.USE_AT, DATE_FORMAT(a.FRST_REGIST_PNTTM, '%Y-%m-%d') as FRST_REGIST_PNTTM
,(SELECT IFNULL(USE_AT,'N') FROM COMTNBBSUSE WHERE BBS_ID = 'BBSMSTR_000000000001' AND TRGET_ID
IN ('USRCNFRM_00000000000', 'SYSTEM_DEFAULT_BOARD') ) as AUTH_FLAG FROM COMTNBBSMASTER a LEFT
OUTER JOIN (SELECT CODE_ID, CODE, CODE_NM FROM COMTCCMMNDETAILCODE WHERE CODE_ID = 'COM004'
AND USE_AT='Y') b ON a.BBS_TY_CODE = b.CODE LEFT OUTER JOIN (SELECT CODE_ID, CODE, CODE_NM
FROM COMTCCMMNDETAILCODE WHERE CODE_ID = 'COM009' AND USE_AT='Y') c ON a.BBS_ATTRB_CODE = c.CODE
LEFT OUTER JOIN COMTNTMPLATINFO d ON a.TMPLAT_ID = d.TMPLAT_ID LEFT OUTER JOIN COMVNUSERMASTER
e ON a.FRST_REGISTER_ID = e.ESNTL_ID WHERE a.BBS_ID = 'BBSMSTR_000000000001'
SELECT a.BBS_ID, a.ANSWER_AT, a.STSFDG_AT, a.FRST_REGISTER_ID, b.USER_NM as FRST_REGISTER_NM,
DATE_FORMAT(a.FRST_REGIST_PNTTM, '%Y-%m-%d') as FRST_REGIST_PNTTM FROM COMTNBBSMASTEROPTN a
LEFT OUTER JOIN COMVNUSERMASTER b ON a.FRST_REGISTER_ID = b.ESNTL_ID WHERE a.BBS_ID = 'BBSMSTR_000000000001'
SELECT a.NTT_ID, a.NTT_SJ, a.FRST_REGISTER_ID, IFNULL(b.USER_NM, a.NTCR_NM) as FRST_REGISTER_NM,
DATE_FORMAT(a.FRST_REGIST_PNTTM, '%Y-%m-%d') as FRST_REGIST_PNTTM, a.RDCNT, a.PARNTSCTT_NO,
a.ANSWER_AT, a.ANSWER_LC, a.USE_AT, a.ATCH_FILE_ID, a.BBS_ID, a.NTCE_BGNDE, a.NTCE_ENDDE FROM
COMTNBBS a LEFT OUTER JOIN COMVNUSERMASTER b ON a.FRST_REGISTER_ID = b.ESNTL_ID WHERE a.BBS_ID
= 'BBSMSTR_000000000001' ORDER BY a.SORT_ORDR DESC, NTT_NO ASC LIMIT 10 OFFSET 0
SELECT COUNT(a.NTT_ID) FROM COMTNBBS a LEFT OUTER JOIN COMVNUSERMASTER b ON a.FRST_REGISTER_ID
= b.ESNTL_ID WHERE a.BBS_ID = 'BBSMSTR_000000000001'
SELECT a.BBS_ID, a.BBS_TY_CODE, b.CODE_NM as BBS_TY_CODE_NM, a.BBS_INTRCN, a.BBS_ATTRB_CODE,
c.CODE_NM as BBS_ATTRB_CODE_NM, a.BBS_NM, a.TMPLAT_ID, d.TMPLAT_NM, d.TMPLAT_COURS, a.FILE_ATCH_POSBL_AT,
a.ATCH_POSBL_FILE_NUMBER, a.ATCH_POSBL_FILE_SIZE, a.REPLY_POSBL_AT, a.FRST_REGISTER_ID, e.USER_NM
as FRST_REGISTER_NM, a.USE_AT, DATE_FORMAT(a.FRST_REGIST_PNTTM, '%Y-%m-%d') as FRST_REGIST_PNTTM
,(SELECT IFNULL(USE_AT,'N') FROM COMTNBBSUSE WHERE BBS_ID = 'BBSMSTR_000000000001' AND TRGET_ID
IN ('USRCNFRM_00000000000', 'SYSTEM_DEFAULT_BOARD') ) as AUTH_FLAG FROM COMTNBBSMASTER a LEFT
OUTER JOIN (SELECT CODE_ID, CODE, CODE_NM FROM COMTCCMMNDETAILCODE WHERE CODE_ID = 'COM004'
AND USE_AT='Y') b ON a.BBS_TY_CODE = b.CODE LEFT OUTER JOIN (SELECT CODE_ID, CODE, CODE_NM
FROM COMTCCMMNDETAILCODE WHERE CODE_ID = 'COM009' AND USE_AT='Y') c ON a.BBS_ATTRB_CODE = c.CODE
LEFT OUTER JOIN COMTNTMPLATINFO d ON a.TMPLAT_ID = d.TMPLAT_ID LEFT OUTER JOIN COMVNUSERMASTER
e ON a.FRST_REGISTER_ID = e.ESNTL_ID WHERE a.BBS_ID = 'BBSMSTR_000000000001'
SELECT IFNULL(MAX(SORT_ORDR),0)+1 AS NTT_NO FROM COMTNBBS WHERE BBS_ID = 'BBSMSTR_000000000001'
INSERT INTO COMTNBBS (NTT_ID, BBS_ID, NTT_SJ, NTT_CN, SORT_ORDR, NTCR_ID, NTCR_NM, PASSWORD,
RDCNT, NTCE_BGNDE, NTCE_ENDDE, ANSWER_AT, PARNTSCTT_NO, NTT_NO, ANSWER_LC, ATCH_FILE_ID, FRST_REGISTER_ID,
FRST_REGIST_PNTTM, USE_AT ) VALUES ( 1, 'BBSMSTR_000000000001', '첫번째 공지사항', '첫번째 공지사항입니다.',
1, 'TEST1', '테스트1', '', 0, '20180930', '20190331', 'N', '0', 1, '0', NULL, 'USRCNFRM_00000000000',
SYSDATE(), 'Y' )
SELECT a.NTT_ID, a.NTT_SJ, a.FRST_REGISTER_ID, IFNULL(b.USER_NM, a.NTCR_NM) as FRST_REGISTER_NM,
DATE_FORMAT(a.FRST_REGIST_PNTTM, '%Y-%m-%d') as FRST_REGIST_PNTTM, a.RDCNT, a.PARNTSCTT_NO,
a.ANSWER_AT, a.ANSWER_LC, a.USE_AT, a.ATCH_FILE_ID, a.BBS_ID, a.NTCE_BGNDE, a.NTCE_ENDDE FROM
COMTNBBS a LEFT OUTER JOIN COMVNUSERMASTER b ON a.FRST_REGISTER_ID = b.ESNTL_ID WHERE a.BBS_ID
= 'BBSMSTR_000000000001' ORDER BY a.SORT_ORDR DESC, NTT_NO ASC LIMIT 10 OFFSET 0
SELECT IFNULL(MAX(RDCNT),0)+1 AS RDCNT FROM COMTNBBS WHERE BBS_ID = 'BBSMSTR_000000000001'
AND NTT_ID = 1
UPDATE COMTNBBS SET RDCNT = 1, LAST_UPDUSR_ID = 'USRCNFRM_00000000000', LAST_UPDT_PNTTM = SYSDATE()
WHERE BBS_ID = 'BBSMSTR_000000000001' AND NTT_ID = 1
SELECT a.NTT_SJ, a.NTCR_ID, a.NTCR_NM, a.NTT_NO, a.NTT_CN, a.PASSWORD, a.FRST_REGISTER_ID,
b.USER_NM as FRST_REGISTER_NM, DATE_FORMAT(a.FRST_REGIST_PNTTM, '%Y-%m-%d') as FRST_REGIST_PNTTM,
a.NTCE_BGNDE, a.NTCE_ENDDE, a.RDCNT, a.USE_AT, a.ATCH_FILE_ID, a.BBS_ID, a.NTT_ID, a.PARNTSCTT_NO,
a.ANSWER_AT, a.ANSWER_LC, a.SORT_ORDR, c.BBS_TY_CODE, c.BBS_ATTRB_CODE, c.REPLY_POSBL_AT, c.FILE_ATCH_POSBL_AT,
c.ATCH_POSBL_FILE_NUMBER, c.BBS_NM FROM COMTNBBS a LEFT OUTER JOIN COMVNUSERMASTER b ON a.FRST_REGISTER_ID
= b.ESNTL_ID LEFT OUTER JOIN COMTNBBSMASTER c ON a.BBS_ID = c.BBS_ID WHERE a.BBS_ID = 'BBSMSTR_000000000001'
AND a.NTT_ID = 1
SELECT a.BBS_ID, a.BBS_TY_CODE, b.CODE_NM as BBS_TY_CODE_NM, a.BBS_INTRCN, a.BBS_ATTRB_CODE,
c.CODE_NM as BBS_ATTRB_CODE_NM, a.BBS_NM, a.TMPLAT_ID, d.TMPLAT_NM, d.TMPLAT_COURS, a.FILE_ATCH_POSBL_AT,
a.ATCH_POSBL_FILE_NUMBER, a.ATCH_POSBL_FILE_SIZE, a.REPLY_POSBL_AT, a.FRST_REGISTER_ID, e.USER_NM
as FRST_REGISTER_NM, a.USE_AT, DATE_FORMAT(a.FRST_REGIST_PNTTM, '%Y-%m-%d') as FRST_REGIST_PNTTM
,(SELECT IFNULL(USE_AT,'N') FROM COMTNBBSUSE WHERE BBS_ID = 'BBSMSTR_000000000001' AND TRGET_ID
IN ('USRCNFRM_00000000000', 'SYSTEM_DEFAULT_BOARD') ) as AUTH_FLAG FROM COMTNBBSMASTER a LEFT
OUTER JOIN (SELECT CODE_ID, CODE, CODE_NM FROM COMTCCMMNDETAILCODE WHERE CODE_ID = 'COM004'
AND USE_AT='Y') b ON a.BBS_TY_CODE = b.CODE LEFT OUTER JOIN (SELECT CODE_ID, CODE, CODE_NM
FROM COMTCCMMNDETAILCODE WHERE CODE_ID = 'COM009' AND USE_AT='Y') c ON a.BBS_ATTRB_CODE = c.CODE
LEFT OUTER JOIN COMTNTMPLATINFO d ON a.TMPLAT_ID = d.TMPLAT_ID LEFT OUTER JOIN COMVNUSERMASTER
e ON a.FRST_REGISTER_ID = e.ESNTL_ID WHERE a.BBS_ID = 'BBSMSTR_000000000001'
SELECT a.BBS_ID, a.ANSWER_AT, a.STSFDG_AT, a.FRST_REGISTER_ID, b.USER_NM as FRST_REGISTER_NM,
DATE_FORMAT(a.FRST_REGIST_PNTTM, '%Y-%m-%d') as FRST_REGIST_PNTTM FROM COMTNBBSMASTEROPTN a
LEFT OUTER JOIN COMVNUSERMASTER b ON a.FRST_REGISTER_ID = b.ESNTL_ID WHERE a.BBS_ID = 'BBSMSTR_000000000001'