--- .idea/dataSources.xml
+++ .idea/dataSources.xml
... | ... | @@ -12,5 +12,17 @@ |
12 | 12 |
</jdbc-additional-properties> |
13 | 13 |
<working-dir>$ProjectFileDir$</working-dir> |
14 | 14 |
</data-source> |
15 |
+ <data-source source="LOCAL" name="[email protected]" uuid="b6b803e3-d638-4654-8d07-5ac10c3c3829"> |
|
16 |
+ <synchronize>true</synchronize> |
|
17 |
+ <imported>true</imported> |
|
18 |
+ <configured-by-url>true</configured-by-url> |
|
19 |
+ <remarks>$PROJECT_DIR$/src/main/resources/application.yml</remarks> |
|
20 |
+ <jdbc-driver>net.sf.log4jdbc.sql.jdbcapi.DriverSpy</jdbc-driver> |
|
21 |
+ <jdbc-url>jdbc:log4jdbc:postgresql://210.180.118.83:5432/yj_cms?currentSchema=yj_cms</jdbc-url> |
|
22 |
+ <jdbc-additional-properties> |
|
23 |
+ <property name="com.intellij.clouds.kubernetes.db.enabled" value="false" /> |
|
24 |
+ </jdbc-additional-properties> |
|
25 |
+ <working-dir>$ProjectFileDir$</working-dir> |
|
26 |
+ </data-source> |
|
15 | 27 |
</component> |
16 | 28 |
</project>(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/cms/mber/dao/MberDAO.java
+++ src/main/java/com/takensoft/cms/mber/dao/MberDAO.java
... | ... | @@ -89,8 +89,15 @@ |
89 | 89 |
|
90 | 90 |
/** |
91 | 91 |
* @author 박정하 |
92 |
- * @since 2024.04.03 |
|
92 |
+ * @since 2024.04.23 |
|
93 | 93 |
* 사용자 정보 수정 |
94 | 94 |
*/ |
95 | 95 |
int updateUser(HashMap<String, Object> params); |
96 |
+ |
|
97 |
+ /** |
|
98 |
+ * @author 박정하 |
|
99 |
+ * @since 2024.04.26 |
|
100 |
+ * 회원 권한 삭제 |
|
101 |
+ */ |
|
102 |
+ int deleteByMbrId(HashMap<String, Object> params); |
|
96 | 103 |
} |
--- src/main/java/com/takensoft/cms/mber/dto/JoinDTO.java
+++ src/main/java/com/takensoft/cms/mber/dto/JoinDTO.java
... | ... | @@ -83,6 +83,14 @@ |
83 | 83 |
*/ |
84 | 84 |
private boolean useYn; |
85 | 85 |
/** |
86 |
+ * 차단일 |
|
87 |
+ */ |
|
88 |
+ private String cntrlDt; |
|
89 |
+ /** |
|
90 |
+ * 차단사유 |
|
91 |
+ */ |
|
92 |
+ private String cntrlRsn; |
|
93 |
+ /** |
|
86 | 94 |
* 문자수신여부 |
87 | 95 |
* N: 거부, Y: 허용 |
88 | 96 |
*/ |
--- src/main/java/com/takensoft/cms/mber/service/Impl/MberServiceImpl.java
+++ src/main/java/com/takensoft/cms/mber/service/Impl/MberServiceImpl.java
... | ... | @@ -1,5 +1,6 @@ |
1 | 1 |
package com.takensoft.cms.mber.service.Impl; |
2 | 2 |
|
3 |
+import com.takensoft.cms.author.dto.AuthorDTO; |
|
3 | 4 |
import com.takensoft.cms.mber.dao.MberDAO; |
4 | 5 |
import com.takensoft.cms.mber.dto.JoinDTO; |
5 | 6 |
import com.takensoft.cms.mber.dto.PasswordDTO; |
... | ... | @@ -195,6 +196,8 @@ |
195 | 196 |
if (mberVO.getTelno() != null && !mberVO.getTelno().equals("")) { |
196 | 197 |
mberVO.setTelno(Secret.decrypt(mberVO.getTelno().toString())); |
197 | 198 |
} |
199 |
+ // 사용자 권한 조회 |
|
200 |
+ |
|
198 | 201 |
return mberVO; |
199 | 202 |
} |
200 | 203 |
|
... | ... | @@ -235,7 +238,25 @@ |
235 | 238 |
} |
236 | 239 |
|
237 | 240 |
// 수정자 조회 및 등록 |
238 |
- params.put("rgtr", jwtUtil.getWriter()); |
|
241 |
+ if(jwtUtil.getWriter() != null && !jwtUtil.getWriter().equals("")) { |
|
242 |
+ params.put("mdfr", jwtUtil.getWriter()); |
|
243 |
+ } |
|
244 |
+ |
|
245 |
+ // 권한 수정 |
|
246 |
+ result += mberDAO.deleteByMbrId(params); |
|
247 |
+ if(params.get("authorList") != null && !params.get("authorList").equals("")) { |
|
248 |
+ List<HashMap<String, Object>> authorList = (List<HashMap<String, Object>>) params.get("authorList"); |
|
249 |
+ for(HashMap<String, Object> author : authorList) { |
|
250 |
+ MberAuthorVO mberAuthorVO = new MberAuthorVO(); |
|
251 |
+ mberAuthorVO.setMbrId(author.get("mbrId").toString()); |
|
252 |
+ mberAuthorVO.setAuthrtCd(author.get("authrtCd").toString()); |
|
253 |
+ // 작성자 조회 및 등록 |
|
254 |
+ if(jwtUtil.getWriter() != null && !jwtUtil.getWriter().equals("")) { |
|
255 |
+ mberAuthorVO.setRgtr(jwtUtil.getWriter()); |
|
256 |
+ } |
|
257 |
+ result += mberDAO.authorSave(mberAuthorVO); |
|
258 |
+ } |
|
259 |
+ } |
|
239 | 260 |
|
240 | 261 |
// 회원정보 수정 |
241 | 262 |
result += mberDAO.updateUser(params); |
--- src/main/java/com/takensoft/cms/mber/web/AdmMberController.java
+++ src/main/java/com/takensoft/cms/mber/web/AdmMberController.java
... | ... | @@ -93,20 +93,24 @@ |
93 | 93 |
*/ |
94 | 94 |
@PostMapping(value = "/joinProc.json") |
95 | 95 |
public ResponseEntity<?> joinProc(@RequestBody @Valid JoinDTO joinDTO, HttpServletRequest req) throws Exception { |
96 |
+ // 응답 처리 |
|
97 |
+ HttpHeaders headers = new HttpHeaders(); |
|
98 |
+ headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
99 |
+ ResponseData responseData = new ResponseData(); |
|
100 |
+ |
|
96 | 101 |
// 아이디 중복 검사 |
97 | 102 |
boolean isExistence = mberService.findByCheckLoginId(joinDTO.getLgnId()); |
98 | 103 |
if(isExistence) { |
99 |
- throw new IdDuplicationException("이미 존재하는 아이디입니다."); |
|
104 |
+ responseData.setStatus(HttpStatus.OK); |
|
105 |
+ responseData.setMessage("이미 존재하는 아이디입니다."); |
|
106 |
+ return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
107 |
+// throw new IdDuplicationException("이미 존재하는 아이디입니다."); |
|
100 | 108 |
} |
101 | 109 |
|
102 | 110 |
// 회원가입 진행 |
103 | 111 |
HashMap<String, Object> result = mberService.userJoin(req, joinDTO); |
104 | 112 |
int insertResult = (int) result.get("result"); |
105 | 113 |
|
106 |
- // 응답 처리 |
|
107 |
- HttpHeaders headers = new HttpHeaders(); |
|
108 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
109 |
- ResponseData responseData = new ResponseData(); |
|
110 | 114 |
if(insertResult > 0) { |
111 | 115 |
responseData.setStatus(HttpStatus.OK); |
112 | 116 |
responseData.setMessage("정상적으로 회원가입 처리되었습니다."); |
--- src/main/resources/mybatis/mapper/entInfo/entInfo-SQL.xml
+++ src/main/resources/mybatis/mapper/entInfo/entInfo-SQL.xml
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 |
, #{clsbizYn} |
49 | 49 |
, 'Y' |
50 | 50 |
, #{rgtr} |
51 |
- , now()::timestamp |
|
51 |
+ , now() |
|
52 | 52 |
) |
53 | 53 |
</insert> |
54 | 54 |
|
--- src/main/resources/mybatis/mapper/mber/mber-SQL.xml
+++ src/main/resources/mybatis/mapper/mber/mber-SQL.xml
... | ... | @@ -77,6 +77,8 @@ |
77 | 77 |
, daddr |
78 | 78 |
, mbr_stts |
79 | 79 |
, use_yn |
80 |
+ , cntrl_dt |
|
81 |
+ , cntrl_rsn |
|
80 | 82 |
, sms_rcptn_agre_yn |
81 | 83 |
, eml_rcptn_agre_yn |
82 | 84 |
, prvc_rcptn_agre_yn |
... | ... | @@ -98,8 +100,10 @@ |
98 | 100 |
, #{zip} |
99 | 101 |
, #{addr} |
100 | 102 |
, #{daddr} |
101 |
- , 1 |
|
103 |
+ , #{mbrStts} |
|
102 | 104 |
, 'Y' |
105 |
+ , #{cntrlDt}::timestamp |
|
106 |
+ , #{cntrlRsn} |
|
103 | 107 |
, #{smsRcptnAgreYn} |
104 | 108 |
, #{emlRcptnAgreYn} |
105 | 109 |
, #{prvcRcptnAgreYn} |
... | ... | @@ -145,7 +149,7 @@ |
145 | 149 |
, mi.daddr |
146 | 150 |
, mi.mbr_stts |
147 | 151 |
, mi.use_yn |
148 |
- , TO_CHAR(mi.cntrl_dt, 'YYYY-MM-DD HH24:MI') AS cntrl_dt |
|
152 |
+ , TO_CHAR(mi.cntrl_dt, 'YYYY-MM-DD') AS cntrl_dt |
|
149 | 153 |
, mi.cntrl_rsn |
150 | 154 |
, mi.sms_rcptn_agre_yn |
151 | 155 |
, mi.eml_rcptn_agre_yn |
... | ... | @@ -287,7 +291,7 @@ |
287 | 291 |
<select id="findAllMbr" resultMap="mberMap"> |
288 | 292 |
<include refid="findAll"></include> |
289 | 293 |
WHERE mi.use_yn = 'Y' |
290 |
- AND mai.authrt_cd = 'ROLE_USER' |
|
294 |
+ AND mai.authrt_cd != 'ROLE_ADMIN' |
|
291 | 295 |
<include refid="selectRequirement" /> |
292 | 296 |
ORDER BY mi.reg_dt DESC |
293 | 297 |
OFFSET #{limitStart} LIMIT #{recordSize} |
... | ... | @@ -329,26 +333,37 @@ |
329 | 333 |
내 용 : 회원정보 수정 |
330 | 334 |
--> |
331 | 335 |
<update id="updateUser" parameterType="HashMap"> |
332 |
- UPDATE mbr_info AS mi |
|
333 |
- SET mi.mbr_nm = #{mbrNm} |
|
334 |
- , mi.ncnm = #{ncnm} |
|
335 |
- , mi.mbl_telno = #{mblTelno} |
|
336 |
- , mi.telno = #{telno} |
|
337 |
- , mi.eml = #{eml} |
|
338 |
- , mi.zip = #{zip} |
|
339 |
- , mi.addr = #{addr} |
|
340 |
- , mi.daddr = #{daddr} |
|
341 |
- , mi.mbr_stts = #{mbrStts} |
|
342 |
- , mi.use_yn = #{useYn} |
|
343 |
- , mi.cntrl_dt = #{cntrlDt} |
|
344 |
- , mi.cntrl_rsn = #{cntrlRsn} |
|
345 |
- , mi.sms_rcptn_agre_yn = #{smsRcptnAgreYn} |
|
346 |
- , mi.eml_rcptn_agre_yn = #{emlRcptnAgreYn} |
|
347 |
- , mi.prvc_rcptn_agre_yn = #{prvcRcptnAgreYn} |
|
348 |
- , mi.mbr_type = #{mbrType} |
|
349 |
- , mi.sys_pvsn_yn = #{sysPvsnYn} |
|
350 |
- , mi.mdfr = #{mdfr} |
|
351 |
- , mi.mdfcn_dt = NOW() |
|
336 |
+ UPDATE mbr_info |
|
337 |
+ SET mbr_nm = #{mbrNm} |
|
338 |
+ , ncnm = #{ncnm} |
|
339 |
+ , mbl_telno = #{mblTelno} |
|
340 |
+ , telno = #{telno} |
|
341 |
+ , eml = #{eml} |
|
342 |
+ , zip = #{zip} |
|
343 |
+ , addr = #{addr} |
|
344 |
+ , daddr = #{daddr} |
|
345 |
+ , mbr_stts = #{mbrStts} |
|
346 |
+ , use_yn = #{useYn} |
|
347 |
+ , cntrl_dt = #{cntrlDt}::timestamp |
|
348 |
+ , cntrl_rsn = #{cntrlRsn} |
|
349 |
+ , sms_rcptn_agre_yn = #{smsRcptnAgreYn} |
|
350 |
+ , eml_rcptn_agre_yn = #{emlRcptnAgreYn} |
|
351 |
+ , prvc_rcptn_agre_yn = #{prvcRcptnAgreYn} |
|
352 |
+ , mbr_type = #{mbrType} |
|
353 |
+ , sys_pvsn_yn = #{sysPvsnYn} |
|
354 |
+ , mdfr = #{mdfr} |
|
355 |
+ , mdfcn_dt = NOW() |
|
352 | 356 |
WHERE mbr_id = #{mbrId} |
353 | 357 |
</update> |
358 |
+ |
|
359 |
+ <!-- |
|
360 |
+ 작성자 : 박정하 |
|
361 |
+ 작성일 : 2024.04.26 |
|
362 |
+ 내 용 : 회원 권한 삭제 |
|
363 |
+ --> |
|
364 |
+ <delete id="deleteByMbrId" parameterType="HashMap"> |
|
365 |
+ DELETE |
|
366 |
+ FROM mbr_authrt_info |
|
367 |
+ WHERE mbr_id = #{mbrId} |
|
368 |
+ </delete> |
|
354 | 369 |
</mapper>(파일 끝에 줄바꿈 문자 없음) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?