隐藏一些数据

This commit is contained in:
Himit_ZH 2021-12-07 08:11:39 +08:00
parent adec27f2d1
commit 898f819c5f
4 changed files with 6 additions and 4 deletions

View File

@ -80,7 +80,8 @@ public class AdminContestController {
if (limit == null || limit < 1) limit = 10; if (limit == null || limit < 1) limit = 10;
IPage<Contest> iPage = new Page<>(currentPage, limit); IPage<Contest> iPage = new Page<>(currentPage, limit);
QueryWrapper<Contest> queryWrapper = new QueryWrapper<>(); QueryWrapper<Contest> queryWrapper = new QueryWrapper<>();
// 过滤密码
queryWrapper.select(Contest.class, info -> !info.getColumn().equals("pwd"));
if (!StringUtils.isEmpty(keyword)) { if (!StringUtils.isEmpty(keyword)) {
keyword = keyword.trim(); keyword = keyword.trim();
queryWrapper queryWrapper

View File

@ -61,7 +61,8 @@ public class AdminTrainingController {
if (limit == null || limit < 1) limit = 10; if (limit == null || limit < 1) limit = 10;
IPage<Training> iPage = new Page<>(currentPage, limit); IPage<Training> iPage = new Page<>(currentPage, limit);
QueryWrapper<Training> queryWrapper = new QueryWrapper<>(); QueryWrapper<Training> queryWrapper = new QueryWrapper<>();
// 过滤密码
queryWrapper.select(Training.class, info -> !info.getColumn().equals("private_pwd"));
if (!StringUtils.isEmpty(keyword)) { if (!StringUtils.isEmpty(keyword)) {
keyword = keyword.trim(); keyword = keyword.trim();
queryWrapper queryWrapper

View File

@ -453,7 +453,7 @@ public class ContestController {
if (commonJudgeList.getTotal() == 0) { // 未查询到一条数据 if (commonJudgeList.getTotal() == 0) { // 未查询到一条数据
return CommonResult.successResponse(commonJudgeList, "暂无数据"); return CommonResult.successResponse(commonJudgeList, "暂无数据");
} else { } else {
// 比赛还是进行阶段同时不是超级管理员与比赛管理员需要将除自己之外的提交的时间空间长度分数隐藏 // 比赛还是进行阶段同时不是超级管理员与比赛管理员需要将除自己之外的提交的时间空间长度隐藏
if (contest.getStatus().intValue() == Constants.Contest.STATUS_RUNNING.getCode() if (contest.getStatus().intValue() == Constants.Contest.STATUS_RUNNING.getCode()
&& !isRoot && !userRolesVo.getUid().equals(contest.getUid())) { && !isRoot && !userRolesVo.getUid().equals(contest.getUid())) {
commonJudgeList.getRecords().forEach(judgeVo -> { commonJudgeList.getRecords().forEach(judgeVo -> {

View File

@ -87,7 +87,7 @@ public class Contest implements Serializable {
@ApiModelProperty(value = "是否打开账号限制") @ApiModelProperty(value = "是否打开账号限制")
private Boolean openAccountLimit; private Boolean openAccountLimit;
@ApiModelProperty(value = "账号限制规则 <prefix>**</prefix><suffix>**</suffix><start>**</start><end>**</end>") @ApiModelProperty(value = "账号限制规则 <prefix>**</prefix><suffix>**</suffix><start>**</start><end>**</end><extra>**</extra>")
private String accountLimitRule; private String accountLimitRule;
@ApiModelProperty(value = "排行榜显示username、nickname、realname") @ApiModelProperty(value = "排行榜显示username、nickname、realname")