Merge branch 'tolag3'

This commit is contained in:
leejunho 2024-12-10 16:04:39 +09:00
commit bca435a379
16 changed files with 175 additions and 11 deletions

View File

@ -60,4 +60,6 @@ public interface EgovAuthorGroupService {
*/ */
public int selectAuthorGroupListTotCnt(AuthorGroupVO authorGroupVO) throws Exception; public int selectAuthorGroupListTotCnt(AuthorGroupVO authorGroupVO) throws Exception;
public void insertAuthorGroupTMember(AuthorGroup authorGroup) throws Exception;
} }

View File

@ -76,4 +76,8 @@ public class AuthorGroupDAO extends EgovAbstractDAO {
public int selectAuthorGroupListTotCnt(AuthorGroupVO authorGroupVO) throws Exception { public int selectAuthorGroupListTotCnt(AuthorGroupVO authorGroupVO) throws Exception {
return (Integer)select("authorGroupDAO.selectAuthorGroupListTotCnt", authorGroupVO); return (Integer)select("authorGroupDAO.selectAuthorGroupListTotCnt", authorGroupVO);
} }
public void insertAuthorGroupTMember(AuthorGroup authorGroup) throws Exception {
insert("authorGroupDAO.insertAuthorGroupTMember", authorGroup);
}
} }

View File

@ -82,4 +82,11 @@ public class EgovAuthorGroupServiceImpl extends EgovAbstractServiceImpl impleme
return authorGroupDAO.selectAuthorGroupListTotCnt(authorGroupVO); return authorGroupDAO.selectAuthorGroupListTotCnt(authorGroupVO);
} }
@Override
public void insertAuthorGroupTMember(AuthorGroup authorGroup) throws Exception {
authorGroupDAO.insertAuthorGroupTMember(authorGroup);
}
} }

View File

@ -61,6 +61,8 @@ public class MenuManageJTreeVO implements Serializable {
/** 권한정보설정 */ /** 권한정보설정 */
/** 권한코드 */ /** 권한코드 */
private String authorCode; private String authorCode;
/** 권한이름 */
private String authorNm;
/** 기타VO변수 */ /** 기타VO변수 */
private String tempValue; private String tempValue;
@ -492,6 +494,15 @@ public class MenuManageJTreeVO implements Serializable {
this.childMenuCnt = childMenuCnt; this.childMenuCnt = childMenuCnt;
} }
public String getAuthorNm() {
return authorNm;
}
public void setAuthorNm(String authorNm) {
this.authorNm = authorNm;
}
} }

View File

@ -171,4 +171,10 @@ public class EgovMberManageServiceImpl extends EgovAbstractServiceImpl implement
mberManageDAO.updateMberCnf(vo); mberManageDAO.updateMberCnf(vo);
} }
@Override
public MberManageVO selectTMber(String uniqId) throws Exception {
MberManageVO mberManageVO = mberManageDAO.selectTMber(uniqId);
return mberManageVO;
}
} }

View File

@ -79,4 +79,8 @@ public class MberManageDAO extends EgovComAbstractDAO{
delete("mberManageDAO.deleteMber", delId); delete("mberManageDAO.deleteMber", delId);
} }
public MberManageVO selectTMber(String uniqId) {
return (MberManageVO) select("mberManageDAO.selectTMber", uniqId);
}
} }

View File

@ -126,5 +126,7 @@ public interface EgovMberManageService {
*/ */
public void updateMberCnf(MberManageConfigVO mberManageConfigVO) throws Exception; public void updateMberCnf(MberManageConfigVO mberManageConfigVO) throws Exception;
public MberManageVO selectTMber(String uniqId) throws Exception;
} }

View File

@ -2,7 +2,10 @@ package seed.com.gtm.join;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -13,6 +16,11 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import kcc.let.sec.ram.service.AuthorManageVO;
import kcc.let.sec.ram.service.EgovAuthorManageService;
import kcc.let.sec.rgm.service.AuthorGroup;
import kcc.let.sec.rgm.service.EgovAuthorGroupService;
import kcc.let.uss.umt.service.EgovMberManageService;
import seed.com.gtm.util.Criteria; import seed.com.gtm.util.Criteria;
import seed.com.gtm.util.PageMaker; import seed.com.gtm.util.PageMaker;
import seed.utils.SeedUtils; import seed.utils.SeedUtils;
@ -22,9 +30,22 @@ import seed.utils.SeedUtils;
public class MemberJoinController { public class MemberJoinController {
@Autowired @Autowired
private MemberJoinService service; private MemberJoinService service;
@Resource(name = "egovAuthorManageService")
private EgovAuthorManageService egovAuthorManageService;
@Resource(name = "mberManageService")
private EgovMberManageService egovMberManageService;
@Resource(name = "egovAuthorGroupService")
private EgovAuthorGroupService egovAuthorGroupService;
// /gtm/case/join/write.do // /gtm/case/join/write.do
@RequestMapping(value="/join/write.do", method=RequestMethod.GET) @RequestMapping(value="/join/write.do", method=RequestMethod.GET)
public String memberWrite(){ public String memberWrite(ModelMap model){
authorListSet(model);
return "/seed/_extra/gtm/join/write"; return "/seed/_extra/gtm/join/write";
} }
@ -91,6 +112,9 @@ public class MemberJoinController {
map.put("message", "common.message.reg"); map.put("message", "common.message.reg");
map.put("url", "/gtm/case/join/list.do"); map.put("url", "/gtm/case/join/list.do");
authorUpsert(paramMap.get("seq").toString(), paramMap.get("authorCode").toString());
return "/_common/jsp/message"; return "/_common/jsp/message";
} }
@ -179,6 +203,13 @@ public class MemberJoinController {
} }
} }
authorListSet(model);
try {
model.addAttribute("mberManageVO", egovMberManageService.selectTMber(memberInfo.get("MEMBER_IDX").toString()));
} catch (Exception e) {
e.printStackTrace();
}
return "/seed/_extra/gtm/join/edit"; return "/seed/_extra/gtm/join/edit";
} }
@ -247,6 +278,8 @@ public class MemberJoinController {
service.memberUpdate(paramMap); service.memberUpdate(paramMap);
authorUpsert(paramMap.get("memberSeq").toString(), paramMap.get("authorCode").toString());
map.put("message", "common.message.mod"); map.put("message", "common.message.mod");
map.put("url", "/gtm/case/join/list.do"); map.put("url", "/gtm/case/join/list.do");
@ -264,4 +297,43 @@ public class MemberJoinController {
return "/_common/jsp/message"; return "/_common/jsp/message";
} }
private void authorListSet(ModelMap model) {
AuthorManageVO authorManageVO = new AuthorManageVO();
authorManageVO.setRecordCountPerPage(999);
try {
List <AuthorManageVO> authorList = egovAuthorManageService.selectAuthorList(authorManageVO);
authorList = authorList.stream()
.filter(t ->
!"ROLE_ANONYMOUS".equals(t.getAuthorCode())
&& !"ROLE_USER_MEMBER".equals(t.getAuthorCode())
&& !"ROLE_USER_MANAGER".equals(t.getAuthorCode())
).collect(Collectors.toList());
model.addAttribute("authorList", authorList);
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
private void authorUpsert(String uniqId, String authorCode) {
AuthorGroup authorGroup = new AuthorGroup();
authorGroup.setUniqId(uniqId);
authorGroup.setAuthorCode(authorCode);
authorGroup.setMberTyCode("USR");
try {
egovAuthorGroupService.insertAuthorGroupTMember(authorGroup);
} catch (Exception e) {
System.out.println("권한 등록 실패!!!!!!!!!!!!!!!!!");
}
}
} }

View File

@ -4,7 +4,7 @@
<sqlMapConfig> <sqlMapConfig>
<sqlMap resource="egovframework/sqlmap/let/uss/umt/EgovUserManage_SQL_Oracle.xml"/> <sqlMap resource="egovframework/sqlmap/let/uss/umt/EgovUserManage_SQL_Oracle.xml"/>
<!-- <sqlMap resource="egovframework/sqlmap/let/uss/umt/EgovMberManage_SQL_Oracle.xml"/> --><!-- 회원가입 config 추가 --> <sqlMap resource="egovframework/sqlmap/let/uss/umt/EgovMberManage_SQL_Oracle.xml"/>
<!-- <sqlMap resource="egovframework/sqlmap/let/uss/ion/sign/SignManage_SQL_Oracle.xml"/> --><!-- 결제 추가 --> <!-- <sqlMap resource="egovframework/sqlmap/let/uss/ion/sign/SignManage_SQL_Oracle.xml"/> --><!-- 결제 추가 -->
</sqlMapConfig> </sqlMapConfig>

View File

@ -40,13 +40,7 @@
AUTHOR_CREAT_DE, AUTHOR_CREAT_DE,
SORT_NUM SORT_NUM
FROM LETTNAUTHORINFO FROM LETTNAUTHORINFO
ORDER BY 1 ORDER BY SORT_NUM ASC
<isNotEmpty property="searchSortCnd">
,$searchSortCnd$
</isNotEmpty>
<isNotEmpty property="searchSortOrd">
$searchSortOrd$
</isNotEmpty>
) a ) a
<![CDATA[ <![CDATA[
WHERE ROWNUM <= (#firstIndex# + #recordCountPerPage#) WHERE ROWNUM <= (#firstIndex# + #recordCountPerPage#)

View File

@ -129,4 +129,23 @@
</isNotEmpty> </isNotEmpty>
</select> </select>
<insert id="authorGroupDAO.insertAuthorGroupTMember" parameterClass="AuthorGroup">
/* authorGroupDAO.insertAuthorGroupTMember */
<![CDATA[
MERGE INTO LETTNEMPLYRSCRTYESTBS D
USING (
SELECT
#uniqId# AS SCRTY_DTRMN_TRGET_ID,
#mberTyCode# AS MBER_TY_CODE,
#authorCode# AS AUTHOR_CODE
FROM
DUAL
) S
ON (D.SCRTY_DTRMN_TRGET_ID = S.SCRTY_DTRMN_TRGET_ID)
WHEN NOT MATCHED THEN
INSERT (SCRTY_DTRMN_TRGET_ID, MBER_TY_CODE, AUTHOR_CODE)
VALUES (S.SCRTY_DTRMN_TRGET_ID, S.MBER_TY_CODE, S.AUTHOR_CODE)
]]>
</insert>
</sqlMap> </sqlMap>

View File

@ -988,7 +988,10 @@
SELECT SELECT
a.MENU_NO as menuNo a.MENU_NO as menuNo
, a.AUTHOR_CODE as authorCode , a.AUTHOR_CODE as authorCode
, B.AUTHOR_NM AS AUTHORNM
FROM lettnmenucreatdtls a FROM lettnmenucreatdtls a
LEFT OUTER JOIN LETTNAUTHORINFO B
ON A.AUTHOR_CODE = B.AUTHOR_CODE
WHERE a.MENU_NO = #menuNo# WHERE a.MENU_NO = #menuNo#
</select> </select>

View File

@ -350,4 +350,24 @@
WHERE ESNTL_ID=#delId# WHERE ESNTL_ID=#delId#
]]> ]]>
</delete> </delete>
<select id="mberManageDAO.selectTMber" resultClass="kcc.let.uss.umt.service.MberManageVO">
/* mberManageDAO.selectMber */
SELECT
A.ESNTL_ID UNIQID,
C.AUTHOR_CODE AUTHORCODE
FROM
COMVNUSERMASTER A
LEFT OUTER JOIN (
SELECT
B.AUTHOR_CODE,
B.SCRTY_DTRMN_TRGET_ID
FROM
LETTNEMPLYRSCRTYESTBS B
) C
ON A.ESNTL_ID = C.SCRTY_DTRMN_TRGET_ID
WHERE
ESNTL_ID= #uniqId#
</select>
</sqlMap> </sqlMap>

View File

@ -203,6 +203,16 @@
</select> </select>
</div> </div>
</div> </div>
<div class="bbs-view-item">
<p class="item-title">권한</p>
<div class="item-box">
<select name="authorCode">
<c:forEach var="list" items="${authorList}" varStatus="sts">
<option value="${list.authorCode}" <c:if test="${mberManageVO.authorCode eq list.authorCode}">selected="selected"</c:if>><c:out value="${list.authorNm}"/></option>
</c:forEach>
</select>
</div>
</div>
<div class="bbs-view-item joinContent"> <div class="bbs-view-item joinContent">
<p class="item-title">비고</p> <p class="item-title">비고</p>
<div class="item-box"> <div class="item-box">

View File

@ -198,6 +198,16 @@
</select> </select>
</div> </div>
</div> </div>
<div class="bbs-view-item">
<p class="item-title">권한</p>
<div class="item-box">
<select name="authorCode">
<c:forEach var="list" items="${authorList}" varStatus="sts">
<option value="${list.authorCode}"><c:out value="${list.authorNm}"/></option>
</c:forEach>
</select>
</div>
</div>
<div class="bbs-view-item"> <div class="bbs-view-item">
<p class="item-title">비고</p> <p class="item-title">비고</p>
<div class="item-box"> <div class="item-box">

View File

@ -899,7 +899,7 @@ function set_bbs(){
<%-- <input type="checkbox" id="${authorList.authorCode}" name="${authorList.authorCode}" value="${authorList.authorCode}"/> <%-- <input type="checkbox" id="${authorList.authorCode}" name="${authorList.authorCode}" value="${authorList.authorCode}"/>
<label for="${authorList.authorCode}"> ${authorList.authorNm} </label> --%> <label for="${authorList.authorCode}"> ${authorList.authorNm} </label> --%>
<input name="authorChkList" id="<c:out value="${authorList.authorCode}"/>" title="Check <c:out value="${status.count}"/>" type="checkbox" value="${authorList.authorCode}"/> <input name="authorChkList" id="<c:out value="${authorList.authorCode}"/>" title="Check <c:out value="${status.count}"/>" type="checkbox" value="${authorList.authorCode}"/>
<label for="<c:out value="${authorList.authorCode}"/>" style="position: unset;"><c:out value="${authorList.authorCode}"/></label> <label for="<c:out value="${authorList.authorCode}"/>" style="position: unset;"><c:out value="${authorList.authorNm}"/>(<c:out value="${authorList.authorCode}"/>)</label>
</div> </div>
</c:forEach> </c:forEach>
</td> </td>