Index: .idea/sonarIssues.xml
===================================================================
diff -u -r5b58dcdc464fb120bff3c7d4a19b7771ac8095d8 -r458facbd00d299a2ec09b3d7d38a55baf0e629ce
--- .idea/sonarIssues.xml (.../sonarIssues.xml) (revision 5b58dcdc464fb120bff3c7d4a19b7771ac8095d8)
+++ .idea/sonarIssues.xml (.../sonarIssues.xml) (revision 458facbd00d299a2ec09b3d7d38a55baf0e629ce)
@@ -938,6 +938,11 @@
+
+
+
+
+
@@ -978,6 +983,11 @@
+
+
+
+
+
Index: standard/project/web/script/ddl/oracle/egovframework/api/rivalWar/directChat/DirectChat_DDL_Oracle.sql
===================================================================
diff -u -r6b8c4d7b039335012a2a19df87003435e1255391 -r458facbd00d299a2ec09b3d7d38a55baf0e629ce
--- standard/project/web/script/ddl/oracle/egovframework/api/rivalWar/directChat/DirectChat_DDL_Oracle.sql (.../DirectChat_DDL_Oracle.sql) (revision 6b8c4d7b039335012a2a19df87003435e1255391)
+++ standard/project/web/script/ddl/oracle/egovframework/api/rivalWar/directChat/DirectChat_DDL_Oracle.sql (.../DirectChat_DDL_Oracle.sql) (revision 458facbd00d299a2ec09b3d7d38a55baf0e629ce)
@@ -2,7 +2,7 @@
* JsTree 추적 로그 테이블
* 트리거 Log를 저장합니다.
*/
-CREATE TABLE T_JSTREE_DIRECTCHAT_LOG
+CREATE TABLE T_DIRECT_CHAT_LOG
(
C_ID NUMBER NOT NULL,
C_PARENTID NUMBER NOT NULL,
@@ -17,23 +17,23 @@
C_DATE DATE NOT NULL
);
-COMMENT ON TABLE T_JSTREE_DIRECTCHAT_LOG IS '기본 트리 스키마 트리거 로그';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT_LOG.C_ID IS '노드 아이디';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT_LOG.C_PARENTID IS '부모 노드 아이디';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT_LOG.C_POSITION IS '노드 포지션';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT_LOG.C_LEFT IS '노드 좌측 끝 포인트';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT_LOG.C_RIGHT IS '노드 우측 끝 포인트';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT_LOG.C_LEVEL IS '노드 DEPTH ';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT_LOG.C_TITLE IS '노드 명';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT_LOG.C_TYPE IS '노드 타입';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT_LOG.C_METHOD IS '노드 변경 행위';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT_LOG.C_STATE IS '노드 상태값 ( 이전인지. 이후인지)';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT_LOG.C_DATE IS '노드 변경 시';
+COMMENT ON TABLE T_DIRECT_CHAT_LOG IS '기본 트리 스키마 트리거 로그';
+COMMENT ON COLUMN T_DIRECT_CHAT_LOG.C_ID IS '노드 아이디';
+COMMENT ON COLUMN T_DIRECT_CHAT_LOG.C_PARENTID IS '부모 노드 아이디';
+COMMENT ON COLUMN T_DIRECT_CHAT_LOG.C_POSITION IS '노드 포지션';
+COMMENT ON COLUMN T_DIRECT_CHAT_LOG.C_LEFT IS '노드 좌측 끝 포인트';
+COMMENT ON COLUMN T_DIRECT_CHAT_LOG.C_RIGHT IS '노드 우측 끝 포인트';
+COMMENT ON COLUMN T_DIRECT_CHAT_LOG.C_LEVEL IS '노드 DEPTH ';
+COMMENT ON COLUMN T_DIRECT_CHAT_LOG.C_TITLE IS '노드 명';
+COMMENT ON COLUMN T_DIRECT_CHAT_LOG.C_TYPE IS '노드 타입';
+COMMENT ON COLUMN T_DIRECT_CHAT_LOG.C_METHOD IS '노드 변경 행위';
+COMMENT ON COLUMN T_DIRECT_CHAT_LOG.C_STATE IS '노드 상태값 ( 이전인지. 이후인지)';
+COMMENT ON COLUMN T_DIRECT_CHAT_LOG.C_DATE IS '노드 변경 시';
/*
* JsTree
*/
-CREATE TABLE T_JSTREE_DIRECTCHAT
+CREATE TABLE T_DIRECT_CHAT
(
C_ID NUMBER NOT NULL,
C_PARENTID NUMBER NOT NULL,
@@ -44,41 +44,54 @@
C_TITLE VARCHAR2(4000 BYTE),
C_TYPE VARCHAR2(4000 BYTE),
- C_USERID NUMBER,
- C_TIME VARCHAR2(4000 BYTE),
- C_LIKECOUNT NUMBER,
- C_HATECOUNT NUMBER,
- C_CAMP NUMBER,
- CONSTRAINT T_JSTREE_DIRECTCHAT_PK PRIMARY KEY (C_ID)
+ MENU_ID NUMBER,
+ USER_ID VARCHAR2(4000 BYTE),
+ USER_LEVEL NUMBER,
+ WRITE_TIME VARCHAR2(4000 BYTE),
+ SELECTED_COMPARE_ITEM NUMBER,
+ CONTENTS_BODY VARCHAR2(4000 BYTE),
+ HASH_TAGS VARCHAR2(4000 BYTE),
+ LIKE_COUNT NUMBER,
+ HATE_COUNT NUMBER,
+ HIDDEN_YN VARCHAR2(4000 BYTE),
+ REPORT_YN VARCHAR2(4000 BYTE),
+
+ CONSTRAINT T_DIRECT_CHAT_PK PRIMARY KEY (C_ID)
/*
- * CONSTRAINT T_JSTREE_DIRECTCHAT_FK1 FOREIGN KEY (OTHER_ID) REFERENCES OTHER T_JSTREE_DIRECTCHAT(C_ID) ON DELETE CASCADE
+ * CONSTRAINT T_DIRECT_CHAT_FK1 FOREIGN KEY (OTHER_ID) REFERENCES OTHER T_DIRECT_CHAT(C_ID) ON DELETE CASCADE
*/
);
-COMMENT ON TABLE T_JSTREE_DIRECTCHAT IS '기본 트리 스키마';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT.C_ID IS '노드 아이디';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT.C_PARENTID IS '부모 노드 아이디';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT.C_POSITION IS '노드 포지션';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT.C_LEFT IS '노드 좌측 끝 포인트';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT.C_RIGHT IS '노드 우측 끝 포인트';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT.C_LEVEL IS '노드 DEPTH ';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT.C_TITLE IS '노드 명';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT.C_TYPE IS '노드 타입';
+COMMENT ON TABLE T_DIRECT_CHAT IS '기본 트리 스키마';
+COMMENT ON COLUMN T_DIRECT_CHAT.C_ID IS '노드 아이디';
+COMMENT ON COLUMN T_DIRECT_CHAT.C_PARENTID IS '부모 노드 아이디';
+COMMENT ON COLUMN T_DIRECT_CHAT.C_POSITION IS '노드 포지션';
+COMMENT ON COLUMN T_DIRECT_CHAT.C_LEFT IS '노드 좌측 끝 포인트';
+COMMENT ON COLUMN T_DIRECT_CHAT.C_RIGHT IS '노드 우측 끝 포인트';
+COMMENT ON COLUMN T_DIRECT_CHAT.C_LEVEL IS '노드 DEPTH ';
+COMMENT ON COLUMN T_DIRECT_CHAT.C_TITLE IS '노드 명';
+COMMENT ON COLUMN T_DIRECT_CHAT.C_TYPE IS '노드 타입';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT.C_USERID IS '비교토론 등록사용자 아이디';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT.C_TIME IS '비교토론 등록시간';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT.C_LIKECOUNT IS '비교토론 좋아요 수';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT.C_HATECOUNT IS '비교토론 싫어요 수';
-COMMENT ON COLUMN T_JSTREE_DIRECTCHAT.C_CAMP IS '비교토론 등록 진영 구분';
+COMMENT ON COLUMN T_DIRECT_CHAT.MENU_ID IS '다이렉트챗 메뉴아이디 ( request )';
+COMMENT ON COLUMN T_DIRECT_CHAT.USER_ID IS '글쓴 사용자 아이디 ( springsecurity )';
+COMMENT ON COLUMN T_DIRECT_CHAT.USER_LEVEL IS '글쓴 사용자 레벨 ( springsecurity )';
+COMMENT ON COLUMN T_DIRECT_CHAT.WRITE_TIME IS '글쓴시간 ( system )';
+COMMENT ON COLUMN T_DIRECT_CHAT.SELECTED_COMPARE_ITEM IS '글쓴이 선택 진영 ( usermappingitem )';
+COMMENT ON COLUMN T_DIRECT_CHAT.CONTENTS_BODY IS '글내용';
+COMMENT ON COLUMN T_DIRECT_CHAT.HASH_TAGS IS '글해시태그';
+COMMENT ON COLUMN T_DIRECT_CHAT.LIKE_COUNT IS '좋아요 카운트';
+COMMENT ON COLUMN T_DIRECT_CHAT.HATE_COUNT IS '싫어요 카운트';
+COMMENT ON COLUMN T_DIRECT_CHAT.HIDDEN_YN IS '글 보이기 감추기 여부';
+COMMENT ON COLUMN T_DIRECT_CHAT.REPORT_YN IS '신고여부';
/*
* 인덱스는 되도록 걸지 말것.
- * CREATE UNIQUE INDEX I_COMPREHENSIVETREE ON T_JSTREE_DIRECTCHAT
+ * CREATE UNIQUE INDEX I_COMPREHENSIVETREE ON T_DIRECT_CHAT
* ("C_ID" ASC)
- * DROP SEQUENCE S_JSTREE_DIRECTCHAT;
+ * DROP SEQUENCE S_DIRECT_CHAT;
*/
-CREATE SEQUENCE S_JSTREE_DIRECTCHAT
+CREATE SEQUENCE S_DIRECT_CHAT
START WITH 10
MAXVALUE 999999999999999999999999999
MINVALUE 0
@@ -89,9 +102,9 @@
/*
* JsTree 트리거
*/
-CREATE OR REPLACE TRIGGER "TRIGGER_JSTREE_DIRECTCHAT"
+CREATE OR REPLACE TRIGGER "TRIGGER_DIRECT_CHAT"
BEFORE DELETE OR INSERT OR UPDATE
-ON T_JSTREE_DIRECTCHAT
+ON T_DIRECT_CHAT
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
@@ -112,29 +125,29 @@
Sysdate: 2012-08-29
Date and Time: 2012-08-29, 오후 5:26:44, and 2012-08-29 오후 5:26:44
Username: (set in TOAD Options, Proc Templates)
- Table Name: T_JSTREE_DIRECTCHAT (set in the "New PL/SQL Object" dialog)
+ Table Name: T_DIRECT_CHAT (set in the "New PL/SQL Object" dialog)
Trigger Options: (set in the "New PL/SQL Object" dialog)
******************************************************************************/
BEGIN
tmpVar := 0;
IF UPDATING THEN
- insert into T_JSTREE_DIRECTCHAT_LOG
+ insert into T_DIRECT_CHAT_LOG
values (:old.C_ID,:old.C_PARENTID,:old.C_POSITION,:old.C_LEFT,:old.C_RIGHT,:old.C_LEVEL,:old.C_TITLE,:old.C_TYPE,'update','변경이전데이터',sysdate);
- insert into T_JSTREE_DIRECTCHAT_LOG
+ insert into T_DIRECT_CHAT_LOG
values (:new.C_ID,:new.C_PARENTID,:new.C_POSITION,:new.C_LEFT,:new.C_RIGHT,:new.C_LEVEL,:new.C_TITLE,:new.C_TYPE,'update','변경이후데이터',sysdate);
END IF;
IF DELETING THEN
- insert into T_JSTREE_DIRECTCHAT_LOG
+ insert into T_DIRECT_CHAT_LOG
values (:old.C_ID,:old.C_PARENTID,:old.C_POSITION,:old.C_LEFT,:old.C_RIGHT,:old.C_LEVEL,:old.C_TITLE,:old.C_TYPE,'delete','삭제된데이터',sysdate);
END IF;
IF INSERTING THEN
- insert into T_JSTREE_DIRECTCHAT_LOG
+ insert into T_DIRECT_CHAT_LOG
values (:new.C_ID,:new.C_PARENTID,:new.C_POSITION,:new.C_LEFT,:new.C_RIGHT,:new.C_LEVEL,:new.C_TITLE,:new.C_TYPE,'insert','삽입된데이터',sysdate);
END IF;
EXCEPTION
WHEN OTHERS THEN
-- Consider logging the error and then re-raise
RAISE;
-END TRIGGER_JSTREE_DIRECTCHAT;
+END TRIGGER_DIRECT_CHAT;
/
\ No newline at end of file
Index: standard/project/web/script/dml/oracle/egovframework/api/rivalWar/directChat/DirectChat_Data_Script_Oracle.sql
===================================================================
diff -u -r6b8c4d7b039335012a2a19df87003435e1255391 -r458facbd00d299a2ec09b3d7d38a55baf0e629ce
--- standard/project/web/script/dml/oracle/egovframework/api/rivalWar/directChat/DirectChat_Data_Script_Oracle.sql (.../DirectChat_Data_Script_Oracle.sql) (revision 6b8c4d7b039335012a2a19df87003435e1255391)
+++ standard/project/web/script/dml/oracle/egovframework/api/rivalWar/directChat/DirectChat_Data_Script_Oracle.sql (.../DirectChat_Data_Script_Oracle.sql) (revision 458facbd00d299a2ec09b3d7d38a55baf0e629ce)
@@ -1,25 +1,33 @@
-Insert into T_JSTREE_DIRECTCHAT
- (C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT,
- C_LEVEL, C_TITLE, C_TYPE, C_USERID, C_TIME, C_LIKECOUNT, C_HATECOUNT, C_CAMP)
+Insert into T_DIRECT_CHAT
+ ( C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT, C_LEVEL, C_TITLE, C_TYPE,
+ MENU_ID, USER_ID, USER_LEVEL, WRITE_TIME, SELECTED_COMPARE_ITEM, CONTENTS_BODY,
+ HASH_TAGS, LIKE_COUNT, HATE_COUNT, HIDDEN_YN, REPORT_YN )
Values
- (1, 0, 0, 1, 8,
- 0, 'Root Node', 'root', 3, '2017-03-13 03:13:31', 313, 131, 1);
-Insert into T_JSTREE_DIRECTCHAT
- (C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT,
- C_LEVEL, C_TITLE, C_TYPE, C_USERID, C_TIME, C_LIKECOUNT, C_HATECOUNT, C_CAMP)
+ ( 1, 0, 0, 1, 8, 0, 'Root Node', 'root',
+ 3, 'rootID', 313, '2017-03-13 13:31:33', 3, '글내용',
+ '해시태그들', 31, 13, 'show', 'N');
+Insert into T_DIRECT_CHAT
+ ( C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT, C_LEVEL, C_TITLE, C_TYPE,
+ MENU_ID, USER_ID, USER_LEVEL, WRITE_TIME, SELECTED_COMPARE_ITEM, CONTENTS_BODY,
+ HASH_TAGS, LIKE_COUNT, HATE_COUNT, HIDDEN_YN, REPORT_YN )
Values
- (2, 1, 0, 2, 7,
- 1, 'First Child', 'drive', 3, '2017-03-13 03:13:31', 313, 131, 1);
-Insert into T_JSTREE_DIRECTCHAT
- (C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT,
- C_LEVEL, C_TITLE, C_TYPE, C_USERID, C_TIME, C_LIKECOUNT, C_HATECOUNT, C_CAMP)
+ ( 2, 1, 0, 2, 7, 1, 'First Child', 'drive',
+ 3, 'rootID', 313, '2017-03-13 13:31:33', 3, '글내용',
+ '해시태그들', 31, 13, 'show', 'N');
+Insert into T_DIRECT_CHAT
+ ( C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT, C_LEVEL, C_TITLE, C_TYPE,
+ MENU_ID, USER_ID, USER_LEVEL, WRITE_TIME, SELECTED_COMPARE_ITEM, CONTENTS_BODY,
+ HASH_TAGS, LIKE_COUNT, HATE_COUNT, HIDDEN_YN, REPORT_YN )
Values
- (3, 2, 0, 3, 4,
- 2, 'Leaf Node', 'default', 3, '2017-03-13 03:13:31', 313, 131, 1);
-Insert into T_JSTREE_DIRECTCHAT
- (C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT,
- C_LEVEL, C_TITLE, C_TYPE, C_USERID, C_TIME, C_LIKECOUNT, C_HATECOUNT, C_CAMP)
+ ( 3, 2, 0, 3, 4, 2, 'Leaf Node', 'default',
+ 3, 'rootID', 313, '2017-03-13 13:31:33', 3, '글내용',
+ '해시태그들', 31, 13, 'show', 'N');
+Insert into T_DIRECT_CHAT
+ ( C_ID, C_PARENTID, C_POSITION, C_LEFT, C_RIGHT, C_LEVEL, C_TITLE, C_TYPE,
+ MENU_ID, USER_ID, USER_LEVEL, WRITE_TIME, SELECTED_COMPARE_ITEM, CONTENTS_BODY,
+ HASH_TAGS, LIKE_COUNT, HATE_COUNT, HIDDEN_YN, REPORT_YN )
Values
- (4, 2, 1, 5, 6,
- 2, 'Branch Node', 'folder', 3, '2017-03-13 03:13:31', 313, 131, 1);
+ ( 4, 2, 1, 5, 6, 2, 'Branch Node', 'folder',
+ 3, 'rootID', 313, '2017-03-13 13:31:33', 3, '글내용',
+ '해시태그들', 31, 13, 'show', 'N');
COMMIT;
\ No newline at end of file
Index: standard/project/web/src/main/java/egovframework/api/rivalWar/directChat/vo/DirectChatDTO.java
===================================================================
diff -u -r5b58dcdc464fb120bff3c7d4a19b7771ac8095d8 -r458facbd00d299a2ec09b3d7d38a55baf0e629ce
--- standard/project/web/src/main/java/egovframework/api/rivalWar/directChat/vo/DirectChatDTO.java (.../DirectChatDTO.java) (revision 5b58dcdc464fb120bff3c7d4a19b7771ac8095d8)
+++ standard/project/web/src/main/java/egovframework/api/rivalWar/directChat/vo/DirectChatDTO.java (.../DirectChatDTO.java) (revision 458facbd00d299a2ec09b3d7d38a55baf0e629ce)
@@ -10,12 +10,12 @@
import java.io.Serializable;
@Entity
-@Table(name = "T_JSTREE_DIRECT_CHAT")
+@Table(name = "T_DIRECT_CHAT")
@SelectBeforeUpdate(value = true)
@DynamicInsert(value = true)
@DynamicUpdate(value = true)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
-@SequenceGenerator(name = "JsTreeSequence", sequenceName = "S_JSTREE_DIRECT_CHAT", allocationSize = 1)
+@SequenceGenerator(name = "JsTreeSequence", sequenceName = "S_DIRECT_CHAT", allocationSize = 1)
public class DirectChatDTO extends JsTreeHibernateSearchDTO implements Serializable {
private static final long serialVersionUID = -2826589626523340365L;
@@ -50,18 +50,114 @@
}
private Long menuId; //다이렉트챗 메뉴아이디 ( request )
+ @Column(name = "MENU_ID")
+ public Long getMenuId() {
+ return menuId;
+ }
+
+ public void setMenuId(Long menuId) {
+ this.menuId = menuId;
+ }
+
private String userId; //글쓴 사용자 아이디 ( springsecurity )
+ @Column(name = "USER_ID")
+ public String getUserId() {
+ return userId;
+ }
- private String writeTime; //글쓴시간
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ private Long userLevel; //글쓴 사용자 레벨 ( springsecurity )
+ @Column(name = "USER_LEVEL")
+ public Long getUserLevel() {
+ return userLevel;
+ }
+
+ public void setUserLevel(Long userLevel) {
+ this.userLevel = userLevel;
+ }
+
+ private String writeTime; //글쓴시간 ( system )
+ @Column(name = "WRITE_TIME")
+ public String getWriteTime() {
+ return writeTime;
+ }
+
+ public void setWriteTime(String writeTime) {
+ this.writeTime = writeTime;
+ }
+
private Long selectedCompareItem; //글쓴이 선택 진영 ( usermappingitem )
- private String contents; //글내용
- private String hashtag; //글해시태그
+ @Column(name = "SELECTED_COMPARE_ITEM")
+ public Long getSelectedCompareItem() {
+ return selectedCompareItem;
+ }
+ public void setSelectedCompareItem(Long selectedCompareItem) {
+ this.selectedCompareItem = selectedCompareItem;
+ }
+
+ private String contentsBody; //글내용
+ @Column(name = "CONTENTS_BODY")
+ public String getContentsBody() {
+ return contentsBody;
+ }
+
+ public void setContentsBody(String contentsBody) {
+ this.contentsBody = contentsBody;
+ }
+
+ private String hashTags; //글해시태그
+ @Column(name = "HASH_TAGS")
+ public String getHashTags() {
+ return hashTags;
+ }
+
+ public void setHashTags(String hashTags) {
+ this.hashTags = hashTags;
+ }
+
private Long likeCount; //좋아요 카운트
+ @Column(name = "LIKE_COUNT")
+ public Long getLikeCount() {
+ return likeCount;
+ }
+
+ public void setLikeCount(Long likeCount) {
+ this.likeCount = likeCount;
+ }
+
private Long hateCount; //싫어요 카운트
+ @Column(name = "HATE_COUNT")
+ public Long getHateCount() {
+ return hateCount;
+ }
+
+ public void setHateCount(Long hateCount) {
+ this.hateCount = hateCount;
+ }
+
private String hiddenYN; //글 보이기 감추기 여부
+ @Column(name = "HIDDEN_YN")
+ public String getHiddenYN() {
+ return hiddenYN;
+ }
+
+ public void setHiddenYN(String hiddenYN) {
+ this.hiddenYN = hiddenYN;
+ }
+
private String reportYN; //신고여부
+ @Column(name = "REPORT_YN")
+ public String getReportYN() {
+ return reportYN;
+ }
+ public void setReportYN(String reportYN) {
+ this.reportYN = reportYN;
+ }
@Override
public void setFieldFromNewInstance(T paramInstance) {