Authored by zhaoyue

Merge branch 'zhaoyue-dev' into 'master'

Fix little bug



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