💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## Json自动映射 如果查询结果集跟java类定义匹配,则不需要显示的json配置,可以AutoJsonMapper ```java @Data @ResultProvider(AutoJsonMapper.class) public class MyUserView { Integer id; String name; DepartmentEntity dept; } ``` 如上配置,可以自动映射如下查询结果 ```java String sql = "select u.id ,u.name ,d.id `dept.id`,d.name `dept.name` " + " from sys_user u left join department d on d.id=u.department_id"; SQLReady ready = new SQLReady(sql); List<MyUserView> list = sqlManager.execute(ready,MyUserView.class); ``` 之所以成为AutoJsonMapper,是因为AutoJsonMapper会解析POJO类,生成一个json配置,类似如下 ```json { "id":"id", "name":"name", "dept": { "id":"dept.id", "name":"dept.name" } } ```