임대기업사용자 회원탈퇴 추가

main
이범준 4 months ago
parent 8a86935194
commit 74309ad81e

@ -229,4 +229,11 @@ public class UserController extends cokr.xit.base.user.web.UserController<FimsUs
; ;
} }
@RequestMapping(name="회원탈퇴", value="/cancelAccount.do")
public ModelAndView cancelAccount() {
int affected = userService.remove(currentUser().getId());
return new ModelAndView("jsonView")
.addObject("affected", affected)
.addObject("saved", affected > 0);
}
} }

@ -91,7 +91,6 @@ SELECT A.USER_ID
</choose> </choose>
</if> </if>
<if test="userIDs != null">USER_ID IN (<foreach collection="userIDs" item="userID" separator=",">#{userID}</foreach>)</if> <if test="userIDs != null">USER_ID IN (<foreach collection="userIDs" item="userID" separator=",">#{userID}</foreach>)</if>
<if test="status == null and userIDs == null">AND STTS != 'D'</if>
<if test="status != null">AND STTS = #{status}</if> <if test="status != null">AND STTS = #{status}</if>
</where> </where>
<include refid="utility.orderBy" /> <include refid="utility.orderBy" />

@ -136,7 +136,7 @@
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
</li> </li>
<li> <li>
<a id="btnCancelAccount--Top" class="dropdown-item" href="#"> <a id="btnCancelAccount--Top" class="dropdown-item" href="#" onclick="fnCancelAccount();">
<i class="bx bx-exit me-2"></i> <i class="bx bx-exit me-2"></i>
<span class="align-middle"> <span class="align-middle">
회원탈퇴 회원탈퇴
@ -358,6 +358,24 @@ function fnOpenChangePassword(){
}); });
} }
async function fnCancelAccount(){
let ok = await confirm2("탈퇴하시겠습니까?");
if(ok){
ajax.get({
url : wctx.url("/user/cancelAccount.do"),
data : { },
success : (resp) => {
if(resp.saved){
alert('탈퇴되었습니다.');
var form = $("<form action=\"/logout.do\", method=\"POST\">");
$("<input name=\"${_csrf.parameterName}\" value=\"${_csrf.token}\" type=\"hidden\">").appendTo(form);
form.appendTo("body").submit();
}
}
});
}
}
function showHelp(){ function showHelp(){
dialog.alert({ dialog.alert({
content : "문의전화 : 070-4490-74XX" content : "문의전화 : 070-4490-74XX"
@ -375,9 +393,7 @@ function remoteRequest(){
window.open("https://www.xit.co.kr/xit-1.exe", '_blank'); window.open("https://www.xit.co.kr/xit-1.exe", '_blank');
} }
$("#btnCancelAccount--Top").on("click",function(){
//TODO : 회원탈퇴
});
/* /*
* 보안모드 토글 처리 * 보안모드 토글 처리

Loading…
Cancel
Save