Newer
Older
bremer / src / main / kotlin / dao / UserDao.kt
yhornisse on 2 Jul 2023 621 bytes add project
/*
 * Copyright (c) 2023. yo-saito. All Rights Reserved.
 */

package net.piedpiper.bremer.dao

import net.piedpiper.bremer.entity.UserEntity
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Param
import org.apache.ibatis.annotations.ResultMap
import org.apache.ibatis.annotations.Select
import org.springframework.stereotype.Repository

@Repository("bremer.dao.UserDao")
@Mapper
interface UserDao {

    @ResultMap("net.piedpiper.bremer.UserEntity")
    @Select("SELECT * FROM user WHERE account_id = #{accountId}")
    fun findByName(@Param("accountId") accountId: String): UserEntity?
}