@Select("SELECT FROM users") @Results({ @Result(property = "userSex", column = "user_sex", javaType = UserSexEnum.class), @Result(property = "nickName", column = "nick_name") }) List<UserEntity> getAll(); @Select("SELECT FROM users WHERE id = #{id}")
@Results({ @Result(property = "userSex", column = "user_sex", javaType = UserSexEnum.class), @Result(property = "nickName", column = "nick_name") }) UserEntity getOne(Long id);
如果我要写多个方法是不是要有多个相同的Results(,如果在同一个类可以使用同一个Results(,那么我在不同的类是不是还要粘贴一样的代码,
所以能不能将Results(注解放在结果类的上方
HUH函数