Bläddra i källkod

解决商铺收益导出日期类型不生效bug

wanxl 1 år sedan
förälder
incheckning
78a5054428
1 ändrade filer med 9 tillägg och 0 borttagningar
  1. 9 0
      src/main/resources/mapper/dataCentre/dataCenterMapper.xml

+ 9 - 0
src/main/resources/mapper/dataCentre/dataCenterMapper.xml

@@ -303,6 +303,15 @@
         <if test="query.shopType != null and query.shopType != '' ">
             and gp.id = #{query.shopType}
         </if>
+        <if test="query.dateType=='day'">
+            and date_format(tor.pay_time,'%Y-%m-%d')=date_format(#{query.date},'%Y-%m-%d')
+        </if>
+        <if test="query.dateType=='month'">
+            and date_format(tor.pay_time,'%Y-%m')=date_format(#{query.date},'%Y-%m')
+        </if>
+        <if test="query.dateType=='year'">
+            and date_format(tor.pay_time,'%Y')=date_format(#{query.date},'%Y')
+        </if>
         GROUP BY tor.shop_id ) a
         ORDER BY shopMoney DESC
     </select>