Преглед на файлове

凌云集团更改公司

peiguo преди 5 години
родител
ревизия
68ef1e2dc6
променени са 1 файла, в които са добавени 5 реда и са изтрити 16 реда
  1. 5 16
      whepi-web/src/main/resources/mapper/MsReport.xml

+ 5 - 16
whepi-web/src/main/resources/mapper/MsReport.xml

@@ -101,28 +101,17 @@
         </where>
         </where>
     </select>
     </select>
 
 
-<!--    select * from (-->
-<!--    select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 1 day) and user_create=#{userId}-->
-<!--    union select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 2 day) and user_create=#{userId}-->
-<!--    union select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 3 day) and user_create=#{userId}-->
-<!--    union select * from ms_report where report_status=1 and report_date=curdate() and user_create=#{userId}-->
-<!--    ) aa-->
-<!--    <where>-->
-<!--        aa.ms_status = 2-->
-<!--        <if test="reportDate!=null and reportDate!=''">-->
-<!--            and aa.report_date > #{reportDate}-->
-<!--        </if>-->
-<!--    </where>-->
     <select id="selectMsReportThereError" resultType="com.bofeng.entity.MsReport">
     <select id="selectMsReportThereError" resultType="com.bofeng.entity.MsReport">
         select * from (
         select * from (
-           select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 1 day) and user_create=#{userId}
-           union select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 2 day) and user_create=#{userId}
-           union select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 3 day) and user_create=#{userId}
+        select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 1 day) and user_create=#{userId}
+        union select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 2 day) and user_create=#{userId}
+        union select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 3 day) and user_create=#{userId}
+        union select * from ms_report where report_status=1 and report_date=curdate() and user_create=#{userId}
         ) aa
         ) aa
         <where>
         <where>
             aa.ms_status = 2
             aa.ms_status = 2
             <if test="reportDate!=null and reportDate!=''">
             <if test="reportDate!=null and reportDate!=''">
-               and aa.report_date > #{reportDate}
+                and aa.report_date > #{reportDate}
             </if>
             </if>
         </where>
         </where>
     </select>
     </select>