Authored by zhaoyue

Merge branch 'zhaoyue-dev4' into 'master'

Zhaoyue dev4



See merge request !7
1 git add --all src/* 1 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 names"  
5 -git push origin zhaoyue-dev3 4 +git commit -m "Fix little points"
  5 +git push origin zhaoyue-dev4
6 git status 6 git status
@@ -50,13 +50,8 @@ public interface Constants { @@ -50,13 +50,8 @@ public interface Constants {
50 public static final int LOWER = 1; 50 public static final int LOWER = 1;
51 public static final int HIGHER = 2; 51 public static final int HIGHER = 2;
52 52
53 - public static final int STATUS_BAD = 0;  
54 - public static final boolean STATUS_BAD2 = false;  
55 - public static final Byte STATUS_BAD3 = 0;  
56 -  
57 public static final int STATUS_OK = 1; 53 public static final int STATUS_OK = 1;
58 - public static final boolean STATUS_OK2= true;  
59 - public static final Byte STATUS_OK3= 1; 54 + public static final boolean STATUS_OK2 = true;
60 55
61 56
62 } 57 }
@@ -9,7 +9,7 @@ import com.xkl.domain.XklAmpReportEntity; @@ -9,7 +9,7 @@ import com.xkl.domain.XklAmpReportEntity;
9 * @see XklAmpReportEntity 9 * @see XklAmpReportEntity
10 */ 10 */
11 public interface ReportRepository extends CrudRepository<XklAmpReportEntity, Long> { 11 public interface ReportRepository extends CrudRepository<XklAmpReportEntity, Long> {
12 - public XklAmpReportEntity findByMd5AndStatus(String md5, Byte status); 12 + public XklAmpReportEntity findByMd5AndStatus(String md5, int status);
13 13
14 public XklAmpReportEntity findById(long id); 14 public XklAmpReportEntity findById(long id);
15 15
@@ -61,7 +61,7 @@ public class ReportService implements IReportService { @@ -61,7 +61,7 @@ public class ReportService implements IReportService {
61 /* 61 /*
62 * 如果已经处理过的报告,不再进行处理。 62 * 如果已经处理过的报告,不再进行处理。
63 */ 63 */
64 - XklAmpReportEntity report = reportRepository.findByMd5AndStatus(reportMd5, Constants.STATUS_OK3); 64 + XklAmpReportEntity report = reportRepository.findByMd5AndStatus(reportMd5, Constants.STATUS_OK);
65 if (report != null && report.getStatus() > 0) { 65 if (report != null && report.getStatus() > 0) {
66 // 返回,报告已存在。 66 // 返回,报告已存在。
67 return new ResponseEntity<>(ResultModel.ok(new ReportIdModel(report.getId())), HttpStatus.OK); 67 return new ResponseEntity<>(ResultModel.ok(new ReportIdModel(report.getId())), HttpStatus.OK);