Newer
Older
bremer / src / main / kotlin / dao / UserDao.kt
yhornisse on 6 Aug 2023 624 bytes refactor and add tag
/*
 * 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 findOneByName(@Param("accountId") accountId: String): UserEntity?
}