@Results(id = “userResult”, value = {
@Result(property = “id”, column = “uid”, id = true),
@Result(property = “firstName”, column = “first_name”),
@Result(property = “lastName”, column = “last_name”)
})
@Select(“select * from users where id = #{id}”)
User getUserById(Integer id);
解决springboot数据库字段与实体类属性名不一致
最新推荐文章于 2022-12-30 13:59:20 发布