class UserDao {

    public UserDO selectByUsername(String username) {
        return template.queryForObject("SELECT id, username, password, create_time FROM users WHERE username = ? LIMIT 1",
                new BeanPropertyRowMapper<>(UserDO.class), // 结果转换成对应的对象
                username);
    }

}