소스 검색

解决商铺收益导出日期类型不生效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>