Index: .idea/sonarIssues.xml =================================================================== diff -u -rd2169059103859ead0bc869967eac65329fffb96 -r6002d2a87002bdc63bed63cadcca70734e7158dd --- .idea/sonarIssues.xml (.../sonarIssues.xml) (revision d2169059103859ead0bc869967eac65329fffb96) +++ .idea/sonarIssues.xml (.../sonarIssues.xml) (revision 6002d2a87002bdc63bed63cadcca70734e7158dd) @@ -918,6 +918,11 @@ + + + + + Index: standard/project/web/script/ddl/oracle/egovframework/api/rivalWar/JsTreeMap_DDL_Oracle.sql =================================================================== diff -u --- standard/project/web/script/ddl/oracle/egovframework/api/rivalWar/JsTreeMap_DDL_Oracle.sql (revision 0) +++ standard/project/web/script/ddl/oracle/egovframework/api/rivalWar/JsTreeMap_DDL_Oracle.sql (revision 6002d2a87002bdc63bed63cadcca70734e7158dd) @@ -0,0 +1,17 @@ +CREATE TABLE T_M_MENU_DIRECTCHAT +( + MENU_CID NUMBER, + DIRECTCHAT_CID NUMBER +); + +CREATE TABLE T_M_MENU_COMPAREITEM +( + MENU_CID NUMBER, + COMPAREITEM_CID NUMBER +); + +CREATE TABLE T_M_COMPAREITEM_SPECHASHTAG +( + COMPAREITEM_CID NUMBER, + SPECHASHTAG_CID NUMBER +); \ No newline at end of file Index: standard/project/web/src/main/java/egovframework/api/rivalWar/compareItem/vo/CompareItemDTO.java =================================================================== diff -u -r5b58dcdc464fb120bff3c7d4a19b7771ac8095d8 -r6002d2a87002bdc63bed63cadcca70734e7158dd --- standard/project/web/src/main/java/egovframework/api/rivalWar/compareItem/vo/CompareItemDTO.java (.../CompareItemDTO.java) (revision 5b58dcdc464fb120bff3c7d4a19b7771ac8095d8) +++ standard/project/web/src/main/java/egovframework/api/rivalWar/compareItem/vo/CompareItemDTO.java (.../CompareItemDTO.java) (revision 6002d2a87002bdc63bed63cadcca70734e7158dd) @@ -16,6 +16,7 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.List; +import java.util.Set; /** * Created by Administrator on 2017-10-08. @@ -79,31 +80,21 @@ } } - private MenuDTO menuDTO; + private Set specHashTagDTOs; - //영속성 전이 설정 - @JsonBackReference - @ManyToOne(fetch=FetchType.LAZY) //Lazy Loading 설정 - @JoinColumn(name="MAPPING_MENU_ID") //조인 컬럼 설정 - public MenuDTO getMenuDTO() { - return menuDTO; - } - - public void setMenuDTO(MenuDTO menuDTO) { - this.menuDTO = menuDTO; - } - - private List specHashTagDTOs = new ArrayList(); - - // default fetch type = LAZY @LazyCollection(LazyCollectionOption.FALSE) @JsonManagedReference - @OneToMany(mappedBy = "compareItemDTO", fetch = FetchType.LAZY, cascade = CascadeType.ALL) - public List getSpecHashTagDTOs() { + @OneToMany(cascade = CascadeType.ALL) + @JoinTable( + name = "T_M_COMPAREITEM_SPECHASHTAG", + joinColumns = @JoinColumn(name = "COMPAREITEM_CID"), + inverseJoinColumns = @JoinColumn(name = "SPECHASHTAG_CID") + ) + public Set getSpecHashTagDTOs() { return specHashTagDTOs; } - public void setSpecHashTagDTOs(List specHashTagDTOs) { + public void setSpecHashTagDTOs(Set specHashTagDTOs) { this.specHashTagDTOs = specHashTagDTOs; } } Index: standard/project/web/src/main/java/egovframework/api/rivalWar/menu/vo/MenuDTO.java =================================================================== diff -u -rf86ce6c5d366bba160a9c9a78e79f3ffe56fe98f -r6002d2a87002bdc63bed63cadcca70734e7158dd --- standard/project/web/src/main/java/egovframework/api/rivalWar/menu/vo/MenuDTO.java (.../MenuDTO.java) (revision f86ce6c5d366bba160a9c9a78e79f3ffe56fe98f) +++ standard/project/web/src/main/java/egovframework/api/rivalWar/menu/vo/MenuDTO.java (.../MenuDTO.java) (revision 6002d2a87002bdc63bed63cadcca70734e7158dd) @@ -6,6 +6,7 @@ import egovframework.api.rivalWar.compareInfo.vo.CompareInfoDTO; import egovframework.api.rivalWar.compareItem.vo.CompareItemDTO; import egovframework.api.rivalWar.compareSpec.vo.CompareSpecDTO; +import egovframework.api.rivalWar.directChat.vo.DirectChatDTO; import egovframework.com.ext.jstree.springHibernate.core.vo.JsTreeHibernateSearchDTO; import org.hibernate.annotations.Cache; import org.hibernate.annotations.*; @@ -129,17 +130,40 @@ this.compareSpecDTO = compareSpecDTO; } - private List compareItemDTOs = new ArrayList(); + private Set compareItemDTOs; - // default fetch type = LAZY @LazyCollection(LazyCollectionOption.FALSE) @JsonManagedReference - @OneToMany(mappedBy = "menuDTO", fetch = FetchType.LAZY, cascade = CascadeType.ALL) - public List getCompareItemDTOs() { + @OneToMany(cascade = CascadeType.ALL) + @JoinTable( + name = "T_M_MENU_COMPAREITEM", + joinColumns = @JoinColumn(name = "MENU_CID"), + inverseJoinColumns = @JoinColumn(name = "COMPAREITEM_CID") + ) + public Set getCompareItemDTOs() { return compareItemDTOs; } - public void setCompareItemDTOs(List compareItemDTOs) { + public void setCompareItemDTOs(Set compareItemDTOs) { this.compareItemDTOs = compareItemDTOs; } + + private Set directChatDTOs; + + @LazyCollection(LazyCollectionOption.FALSE) + @JsonManagedReference + @OneToMany(cascade = CascadeType.ALL) + @JoinTable( + name = "T_M_MENU_DIRECTCHAT", + joinColumns = @JoinColumn(name = "MENU_CID"), + inverseJoinColumns = @JoinColumn(name = "DIRECTCHAT_CID") + ) + public Set getDirectChatDTOs() { + return directChatDTOs; + } + + public void setDirectChatDTOs(Set directChatDTOs) { + this.directChatDTOs = directChatDTOs; + } + } Index: standard/project/web/src/main/java/egovframework/api/rivalWar/specHashTag/vo/SpecHashTagDTO.java =================================================================== diff -u -r3c18337afe6ae498e542cda1d22a1f44eff43989 -r6002d2a87002bdc63bed63cadcca70734e7158dd --- standard/project/web/src/main/java/egovframework/api/rivalWar/specHashTag/vo/SpecHashTagDTO.java (.../SpecHashTagDTO.java) (revision 3c18337afe6ae498e542cda1d22a1f44eff43989) +++ standard/project/web/src/main/java/egovframework/api/rivalWar/specHashTag/vo/SpecHashTagDTO.java (.../SpecHashTagDTO.java) (revision 6002d2a87002bdc63bed63cadcca70734e7158dd) @@ -65,13 +65,13 @@ this.tagName = tagName; } - private String tagSourceChatID; //결국 chat 안으로 들어갈테니까 + private Long tagSourceChatID; //결국 chat 안으로 들어갈테니까 @Column(name = "TAG_SOURCE_CHAT_ID") - public String getTagSourceChatID() { + public Long getTagSourceChatID() { return tagSourceChatID; } - public void setTagSourceChatID(String tagSourceChatID) { + public void setTagSourceChatID(Long tagSourceChatID) { this.tagSourceChatID = tagSourceChatID; } @@ -82,16 +82,5 @@ } } - private CompareItemDTO compareItemDTO; - //영속성 전이 설정, 어떤 아이템에 해당하는 해쉬태그인지 구분 - @JsonBackReference - @ManyToOne(fetch=FetchType.LAZY) //Lazy Loading 설정 - @JoinColumn(name="MAPPING_COMPARE_ID") //조인 컬럼 설정 - public CompareItemDTO getCompareItemDTO() { - return compareItemDTO; - } - public void setCompareItemDTO(CompareItemDTO compareItemDTO) { - this.compareItemDTO = compareItemDTO; - } } Index: standard/project/web/src/main/webapp/WEB-INF/jsp/egovframework/api/rivalWar/compareItem/JsTreeView.jsp =================================================================== diff -u -rdf7966c5af96a690dce0fa28f988c3d87d1e8638 -r6002d2a87002bdc63bed63cadcca70734e7158dd --- standard/project/web/src/main/webapp/WEB-INF/jsp/egovframework/api/rivalWar/compareItem/JsTreeView.jsp (.../JsTreeView.jsp) (revision df7966c5af96a690dce0fa28f988c3d87d1e8638) +++ standard/project/web/src/main/webapp/WEB-INF/jsp/egovframework/api/rivalWar/compareItem/JsTreeView.jsp (.../JsTreeView.jsp) (revision 6002d2a87002bdc63bed63cadcca70734e7158dd) @@ -261,7 +261,7 @@
-

Rival War Menu Controller

+

Rival War CompareItem Controller

@@ -305,7 +305,7 @@ paste @@ -357,7 +357,7 @@ function jstreeDataTableReload() { var jstreeDataTable = $('#jstreeTable').dataTable({ "ajax": { - "url": "${pageContext.request.contextPath}/rivalWar/api/menu/monitor/list.do", + "url": "${pageContext.request.contextPath}/rivalWar/api/compareItem/monitor/list.do", "dataSrc": "rows" }, "processing": true, @@ -387,7 +387,7 @@ var jstreeDataTable = $('#jstreeTable').dataTable({ "ajax": { - "url": "${pageContext.request.contextPath}/rivalWar/api/menu/monitor/list.do", + "url": "${pageContext.request.contextPath}/rivalWar/api/compareItem/monitor/list.do", "dataSrc": "rows" }, "processing": true, @@ -411,15 +411,19 @@ }] }); }); + + function jsTreeClick(selectedNodeID) { + console.log(selectedNodeID); + } + getChildNode="${pageContext.request.contextPath}/api/rivalWar/compareItem/getChildNode.do" + searchNode="${pageContext.request.contextPath}/api/rivalWar/compareItem/searchNode.do" + addNode="${pageContext.request.contextPath}/api/rivalWar/ROLE_ADMIN/compareItem/addNode.do" + removeNode="${pageContext.request.contextPath}/api/rivalWar/ROLE_ADMIN/compareItem/removeNode.do" + alterNode="${pageContext.request.contextPath}/api/rivalWar/ROLE_ADMIN/compareItem/alterNode.do" + alterNodeType="${pageContext.request.contextPath}/api/rivalWar/ROLE_ADMIN/compareItem/alterNodeType.do" + moveNode="${pageContext.request.contextPath}/api/rivalWar/ROLE_ADMIN/compareItem/moveNode.do">