Skip to content

Commit

Permalink
[Refactor] 학교 데이터베이스 조회 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hen715 committed May 2, 2024
1 parent 97d7da0 commit 8da5fbb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public ResponseEntity<ResponseDto<Boolean>> checkMail(@Valid@RequestBody EmailCh
})
@PostMapping("/login/school")
public ResponseEntity<ResponseDto<Boolean>> checkLogin(@Valid@RequestBody LoginDto loginDto) {
return new ResponseEntity<>(new ResponseDto<>(schoolLoginRepository.loginCheck(loginDto.getNum(),loginDto.getNum()),"로그인 성공 여부 테스트"),HttpStatus.OK);
return new ResponseEntity<>(new ResponseDto<>(schoolLoginRepository.loginCheck(loginDto.getNum(),loginDto.getPassword()),"로그인 성공 여부 테스트"),HttpStatus.OK);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ public class SchoolLoginRepository {


public boolean loginCheck(String username, String password) {
String param = "'"+username+"','"+password+"'";
String sql = "SELECT F_LOGIN_CHECK("+param+") FROM DUAL";
log.info("학교 로그인 조회 :{}",username);
String sql = "SELECT F_LOGIN_CHECK(?,?) FROM DUAL";
log.info("학교 로그인 조회 id:{}",username);
try {
String result = jdbcTemplate.queryForObject(sql, String.class);
String result = jdbcTemplate.queryForObject(sql, String.class,username,password);
log.info("학교 디비 조회 결과 : {}",result);
return "Y".equals(result);
} catch (Exception e) {
Expand Down

0 comments on commit 8da5fbb

Please sign in to comment.