주소록 오류 수정

This commit is contained in:
hehihoho3@gmail.com 2024-12-23 15:29:57 +09:00
parent d7bdace043
commit e6ce8ce036

View File

@ -69,21 +69,32 @@ public class AddrRestController {
public ResponseEntity<StatusResponse> addrMassInsertByTempAjax_advc(@RequestBody List<AddrVO> addrListVO
,ModelMap model) throws Exception{
try {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId.equals("")) {
return ResponseEntity.ok(
new StatusResponse(HttpStatus.UNAUTHORIZED
, "로그인을 하셔야 이용 가능합니다."
, LocalDateTime.now()
)
);
}
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId.equals("")) {
return ResponseEntity.ok(
new StatusResponse(HttpStatus.UNAUTHORIZED
, "로그인을 하셔야 이용 가능합니다."
, 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));
}
//