瀏覽代碼

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

wanxl 1 年之前
父節點
當前提交
78a5054428
共有 1 個文件被更改,包括 9 次插入0 次删除
  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>