|
@@ -101,28 +101,17 @@
|
|
|
</where>
|
|
|
</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 * 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
|
|
|
<where>
|
|
|
aa.ms_status = 2
|
|
|
<if test="reportDate!=null and reportDate!=''">
|
|
|
- and aa.report_date > #{reportDate}
|
|
|
+ and aa.report_date > #{reportDate}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|