Authored by zhaoyue

Merge branch 'zhaoyue-dev' into 'master'

Fix little bug



See merge request !11
@@ -2,5 +2,5 @@ git add --all src/* @@ -2,5 +2,5 @@ git add --all src/*
2 git add push.sh 2 git add push.sh
3 git add pom.xml 3 git add pom.xml
4 git commit -m "Fix little bug" 4 git commit -m "Fix little bug"
5 -git push origin master 5 +git push origin zhaoyue-dev
6 git status 6 git status
@@ -24,13 +24,13 @@ public enum ResultStatus { @@ -24,13 +24,13 @@ public enum ResultStatus {
24 // 111开头的都是与amp报告上传软件相关的 24 // 111开头的都是与amp报告上传软件相关的
25 AMP_KEY_ERROR(-11100, "AMP密钥不匹配"), 25 AMP_KEY_ERROR(-11100, "AMP密钥不匹配"),
26 REPORT_FORMAT_ERROR(-11140,"报告格式错误/Report json format error"), 26 REPORT_FORMAT_ERROR(-11140,"报告格式错误/Report json format error"),
27 - REPORT_EXISTED_ERROR(-11141,"报告重复上传"), 27 + REPORT_EXISTED_ERROR(-11141,"报告重复上传/Report is already exist"),
28 REPORT_INVALID__ERROR(-11142,"报告在数据库中不存在/Report is not exist in the DB"), 28 REPORT_INVALID__ERROR(-11142,"报告在数据库中不存在/Report is not exist in the DB"),
29 29
30 INVALID_USER_ERROR(-11150,"报告所属用户未注册/Report user's account is not exist"), 30 INVALID_USER_ERROR(-11150,"报告所属用户未注册/Report user's account is not exist"),
31 INVALID_ADMIN_RPDEL_ERROR(-11151,"报告非此操作员创建,无权删除!/Operator can not delete this report"), 31 INVALID_ADMIN_RPDEL_ERROR(-11151,"报告非此操作员创建,无权删除!/Operator can not delete this report"),
32 32
33 - DB_ERROR(-11160,"服务器错误,无法写入数据库"); 33 + DB_ERROR(-11160,"服务器错误,无法写入数据库/Server error, can not write into database");
34 34
35 35
36 36
@@ -118,7 +118,7 @@ public class ReportService implements IReportService { @@ -118,7 +118,7 @@ public class ReportService implements IReportService {
118 XklAmpReportEntity report = reportRepository.findById(report_id); 118 XklAmpReportEntity report = reportRepository.findById(report_id);
119 if (report == null || report.getStatus() == 0) { 119 if (report == null || report.getStatus() == 0) {
120 // 报告不存在,返回 120 // 报告不存在,返回
121 - return new ResponseEntity<>(ResultModel.ok(), HttpStatus.OK); 121 + return new ResponseEntity<>(ResultModel.error(ResultStatus.REPORT_INVALID__ERROR), HttpStatus.OK);
122 } 122 }
123 123
124 // 2. 验证admin 124 // 2. 验证admin