Browse Source

凌云集团更改公司

peiguo 5 years ago
parent
commit
4101a34e39
1 changed files with 3 additions and 1 deletions
  1. 3 1
      whepi-web/src/main/java/com/bofeng/dao/MsReportMapper.java

+ 3 - 1
whepi-web/src/main/java/com/bofeng/dao/MsReportMapper.java

@@ -142,7 +142,9 @@ public interface MsReportMapper extends BaseMapper<MsReport> {
     @Select("select * from ms_report where user_create=#{userId} and report_status=1 order by report_date desc limit 1")
     @Select("select * from ms_report where user_create=#{userId} and report_status=1 order by report_date desc limit 1")
     MsReport selectMsReportToday(@Param("userId") Long userId);
     MsReport selectMsReportToday(@Param("userId") Long userId);
 
 
-    @Select("select * from ms_report where user_create=#{userId} and ms_status = 2 and report_status=1 order by report_date desc limit 3")
+    @Select("select * from (select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 1 day) and user_create=#{userId}\n" +
+            "union select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 2 day) and user_create=#{userId}\n" +
+            "union select * from ms_report where report_status=1 and report_date=curdate() and user_create=#{userId}) aa where aa.ms_status = 2")
     List<MsReport> selectMsReportThereError(@Param("userId") Long userId);
     List<MsReport> selectMsReportThereError(@Param("userId") Long userId);
 
 
     /**
     /**