修改后端
This commit is contained in:
parent
3690a0da74
commit
7131cd090f
|
@ -243,12 +243,6 @@ public class AdminContestController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!StringUtils.isEmpty(keyword)) {
|
|
||||||
problemQueryWrapper.and(wrapper -> wrapper.like("title", keyword).or()
|
|
||||||
.like("problem_id", keyword).or()
|
|
||||||
.like("author", keyword));
|
|
||||||
}
|
|
||||||
|
|
||||||
// 根据oj筛选过滤
|
// 根据oj筛选过滤
|
||||||
if (oj != null && !"All".equals(oj)) {
|
if (oj != null && !"All".equals(oj)) {
|
||||||
if (!Constants.RemoteOJ.isRemoteOJ(oj)) {
|
if (!Constants.RemoteOJ.isRemoteOJ(oj)) {
|
||||||
|
@ -258,6 +252,12 @@ public class AdminContestController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!StringUtils.isEmpty(keyword)) {
|
||||||
|
problemQueryWrapper.and(wrapper -> wrapper.like("title", keyword).or()
|
||||||
|
.like("problem_id", keyword).or()
|
||||||
|
.like("author", keyword));
|
||||||
|
}
|
||||||
|
|
||||||
IPage<Problem> problemList = problemService.page(iPage, problemQueryWrapper);
|
IPage<Problem> problemList = problemService.page(iPage, problemQueryWrapper);
|
||||||
HashMap<String, Object> contestProblem = new HashMap<>();
|
HashMap<String, Object> contestProblem = new HashMap<>();
|
||||||
contestProblem.put("problemList", problemList);
|
contestProblem.put("problemList", problemList);
|
||||||
|
|
|
@ -69,8 +69,13 @@ public class AdminProblemController {
|
||||||
QueryWrapper<Problem> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<Problem> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.orderByDesc("gmt_create");
|
queryWrapper.orderByDesc("gmt_create");
|
||||||
|
|
||||||
if (oj != null && oj.equals("Mine")) {
|
// 根据oj筛选过滤
|
||||||
queryWrapper.eq("is_remote", false);
|
if (oj != null && !"All".equals(oj)) {
|
||||||
|
if (!Constants.RemoteOJ.isRemoteOJ(oj)) {
|
||||||
|
queryWrapper.eq("is_remote", false);
|
||||||
|
} else {
|
||||||
|
queryWrapper.eq("is_remote", true).likeRight("problem_id", oj);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (auth != null && auth != 0) {
|
if (auth != null && auth != 0) {
|
||||||
|
|
Loading…
Reference in New Issue