start api with kotlin
This commit is contained in:
parent
ec11937139
commit
e238ee257a
@ -10,4 +10,6 @@ interface UserRepo : JpaRepository<UserDto,Long> {
|
||||
|
||||
@Query("SELECT * FROM user_dto WHERE firstName=?1 AND lastName=?2",nativeQuery = true)
|
||||
fun findByFirstnameAndLastname(firstName:String?="",lastName:String?=""):UserDto
|
||||
@Query("SELECT * FROM user_dto",nativeQuery = true)
|
||||
fun findAllRecord():List<UserDto>
|
||||
}
|
@ -12,6 +12,6 @@ class UserService @Autowired constructor(private val userRepo: UserRepo) {
|
||||
return userRepo.findByFirstnameAndLastname(firstName,lastName)
|
||||
}
|
||||
fun findAllRecord():List<UserDto>{
|
||||
return userRepo.findAll()
|
||||
return userRepo.findAllRecord()
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user