We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Data @RequiredArgsConstructor public static class UserInfo { // 其他属性...... @Assemble( containerProvider = "dictContainerProvider", container = "sex-dict", // 总是查询固定的字典类型 prop = "sexName" ) private final Integer sex; private String sexName; @Assemble( containerProvider = "dictContainerProvider", container = "status-dict", // 总是查询固定的字典类型 prop = "statusName" ) private final String status; private String statusName; }
比如上面的类,有两个字段用到字典,字典就是常用的后台管理系统的字典管理,对 UserInfo user = new UserInfo("2","1") 这个对象执行填充后,sexName 为“男” statusName 为启“用”。
UserInfo user = new UserInfo("2","1")
目前有一个问题,就是执行填充时,由于 dictContainerProvider 给出的 Container 不是同一个,所以最终会分别查两次库。不过,实际上两个容器最终会调用同一个接口,希望在后续的版本可以只用一次接口调用把两个字典类型的数据一次都查询出来。
dictContainerProvider
Container
The text was updated successfully, but these errors were encountered:
No branches or pull requests
比如上面的类,有两个字段用到字典,字典就是常用的后台管理系统的字典管理,对
UserInfo user = new UserInfo("2","1")
这个对象执行填充后,sexName 为“男” statusName 为启“用”。目前有一个问题,就是执行填充时,由于
dictContainerProvider
给出的Container
不是同一个,所以最终会分别查两次库。不过,实际上两个容器最终会调用同一个接口,希望在后续的版本可以只用一次接口调用把两个字典类型的数据一次都查询出来。The text was updated successfully, but these errors were encountered: