Skip to content

Commit

Permalink
fix some bug
Browse files Browse the repository at this point in the history
  • Loading branch information
HimitZH committed Nov 14, 2022
1 parent c3386f9 commit 4bb1315
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ public List<RecentUpdatedProblemVO> getRecentUpdatedProblemList() {
QueryWrapper<Problem> problemQueryWrapper = new QueryWrapper<>();
problemQueryWrapper.select("id", "problem_id", "title", "type", "gmt_modified", "gmt_create");
problemQueryWrapper.eq("auth", 1);
problemQueryWrapper.eq("is_group", false);
problemQueryWrapper.orderByDesc("gmt_create");
problemQueryWrapper.last("limit 10");
List<Problem> problemList = problemEntityService.list(problemQueryWrapper);
Expand Down
2 changes: 1 addition & 1 deletion hoj-springboot/DataBackup/src/main/resources/banner.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ ${AnsiColor.BRIGHT_YELLOW}
'---' `---` '---' `----'
Hcode Online Judge(HOJ) - Backend
@Author Himit_ZH
@Last Update 20221112
@Last Update 20221114
->Github<- https://www.github.com/HimitZH/HOJ
->Gitee<- https://gitee.com/himitzh0730/hoj
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public HashMap<String, Object> getJudgeServerInfo() {

HashMap<String, Object> res = new HashMap<>();

res.put("version", "20221111");
res.put("version", "20221114");
res.put("currentTime", new Date());
res.put("judgeServerName", name);
res.put("cpu", Runtime.getRuntime().availableProcessors());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,12 @@ public RemoteJudgeRes result() {
// 找到时
Validate.isTrue(matcher.find());
String rawStatus = matcher.group(1).replaceAll("<[\\s\\S]*?>", "").trim();
Constants.Judge judgeStatus = statusTypeMap.getOrDefault(rawStatus, Constants.Judge.STATUS_PENDING);

Constants.Judge judgeStatus;
if (rawStatus.contains("Runtime Error")){
judgeStatus = Constants.Judge.STATUS_RUNTIME_ERROR;
}else{
judgeStatus = statusTypeMap.getOrDefault(rawStatus, Constants.Judge.STATUS_PENDING);
}
RemoteJudgeRes remoteJudgeRes = RemoteJudgeRes.builder()
.status(judgeStatus.getStatus())
.build();
Expand Down
2 changes: 1 addition & 1 deletion hoj-springboot/JudgeServer/src/main/resources/banner.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ ${AnsiColor.BRIGHT_YELLOW}
'---' `---` '---' `----'
Hcode Online Judge(HOJ) - JudgeServer
@Author Himit_ZH
@Last Update 20221111
@Last Update 20221114
->Github<- https://www.github.com/HimitZH/HOJ
->Gitee<- https://gitee.com/himitzh0730/hoj
6 changes: 3 additions & 3 deletions hoj-vue/src/components/oj/group/DiscussionList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<el-button
icon="el-icon-delete-solid"
size="mini"
@click.native="deleteGroupDiscussion([row.id])"
@click.native="deleteGroupDiscussion(row.id)"
type="danger"
>
</el-button>
Expand Down Expand Up @@ -181,7 +181,7 @@ export default {
this.currentChange(1);
});
},
deleteGroupDiscussion(uid, gid) {
deleteGroupDiscussion(did) {
this.$confirm(
this.$i18n.t('m.Delete_Discussion_Tips'),
this.$i18n.t('m.Warning'),
Expand All @@ -193,7 +193,7 @@ export default {
)
.then(() => {
this.loading = true;
api.deleteGroupDiscussion(uid, gid).then((res) => {
api.deleteGroupDiscussion(did).then((res) => {
this.loading = true;
mMessage.success(this.$i18n.t('m.Delete_successfully'));
this.$emit('currentChange', 1);
Expand Down

0 comments on commit 4bb1315

Please sign in to comment.