Aias00 commented on code in PR #6243:
URL: https://github.com/apache/shenyu/pull/6243#discussion_r2580175624
##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/SelectorServiceImpl.java:
##########
@@ -153,6 +157,21 @@ public void doConditionPreProcessing(final
SelectorQueryCondition condition) {
}
}
+ @Override
+ public PageInfo<SelectorVO> searchByPage(final
PageCondition<SelectorQueryCondition> pageCondition) {
+ doConditionPreProcessing(pageCondition.getCondition());
+ PageHelper.startPage(pageCondition.getPageNum(),
pageCondition.getPageSize());
+ SelectorQueryCondition condition = pageCondition.getCondition();
+ condition.init();
+ final Page<SelectorDO> page = (Page<SelectorDO>)
selectorMapper.selectByCondition(condition);
+ PageInfo<SelectorVO> pageInfo =
page.toPageInfo(SelectorVO::buildSelectorVO);
+ for (SelectorVO selector : pageInfo.getList()) {
+
selector.setMatchModeName(MatchModeEnum.getMatchModeByCode(selector.getMatchMode()));
+
selector.setTypeName(SelectorTypeEnum.getSelectorTypeByCode(selector.getType()));
+ }
Review Comment:
Error:
/home/runner/work/shenyu/shenyu/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/SelectorServiceImpl.java:20:8:
Unused import - com.github.pagehelper.Page. [UnusedImports]
Error:
/home/runner/work/shenyu/shenyu/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/RuleServiceImpl.java:20:8:
Unused import - com.github.pagehelper.Page. [UnusedImports]
Audit done.
[shenyu-admin] [INFO] There are 2 errors reported by Checkstyle 9.3 with
/script/shenyu_checkstyle.xml ruleset.
Error: -admin] [ERROR]
src/main/java/org/apache/shenyu/admin/service/impl/SelectorServiceImpl.java:[20,8]
(imports) UnusedImports: Unused import - com.github.pagehelper.Page.
Error: -admin] [ERROR]
src/main/java/org/apache/shenyu/admin/service/impl/RuleServiceImpl.java:[20,8]
(imports) UnusedImports: Unused import - com.github.pagehelper.Page.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]