주소록 오류 수정
This commit is contained in:
parent
d7bdace043
commit
e6ce8ce036
@ -69,21 +69,32 @@ public class AddrRestController {
|
|||||||
public ResponseEntity<StatusResponse> addrMassInsertByTempAjax_advc(@RequestBody List<AddrVO> addrListVO
|
public ResponseEntity<StatusResponse> addrMassInsertByTempAjax_advc(@RequestBody List<AddrVO> addrListVO
|
||||||
,ModelMap model) throws Exception{
|
,ModelMap model) throws Exception{
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
|
||||||
|
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
|
||||||
|
if(userId.equals("")) {
|
||||||
if(userId.equals("")) {
|
return ResponseEntity.ok(
|
||||||
return ResponseEntity.ok(
|
new StatusResponse(HttpStatus.UNAUTHORIZED
|
||||||
new StatusResponse(HttpStatus.UNAUTHORIZED
|
, "로그인을 하셔야 이용 가능합니다."
|
||||||
, "로그인을 하셔야 이용 가능합니다."
|
, LocalDateTime.now()
|
||||||
, LocalDateTime.now()
|
)
|
||||||
)
|
);
|
||||||
);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return ResponseEntity.ok().body(addrService.addrMassInsertByTempAjax_advc(addrListVO, userId));
|
return ResponseEntity.ok().body(addrService.addrMassInsertByTempAjax_advc(addrListVO, userId));
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
// TODO: handle exception
|
||||||
|
return ResponseEntity.ok().body(new StatusResponse(
|
||||||
|
HttpStatus.BAD_REQUEST
|
||||||
|
, "오류가 발생하였습니다."
|
||||||
|
, ""
|
||||||
|
));
|
||||||
|
}
|
||||||
|
// return ResponseEntity.ok().body(addrService.addrMassInsertByTempAjax_advc(addrListVO, userId));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user