Quellcode durchsuchen

Merge branch 'lcy' of http://47.107.53.207:3000/traineeCoder001/Digital-Investment

JensionDzero vor 1 Jahr
Ursprung
Commit
c061444ca3
1 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 4 4
      ruoyi-demo/src/main/resources/mapper/demo/StatisticsMapper.xml

+ 4 - 4
ruoyi-demo/src/main/resources/mapper/demo/StatisticsMapper.xml

@@ -57,7 +57,7 @@
             `dl_statistics`
         <where>
             <if test="month != null">
-                STR_TO_DATE(#{month},'%Y-%m')
+                DATE_FORMAT(`time`,'%Y-%m') = DATE_FORMAT(#{month},'%Y-%m')
             </if>
         </where>;
     </select>
@@ -68,7 +68,7 @@
             `dl_statistics`
         <where>
             <if test="day != null">
-                STR_TO_DATE(#{day},'%Y-%m-%d')
+                DATE_FORMAT(`time`,'%Y-%m-%d') = DATE_FORMAT(#{day},'%Y-%m-%d')
             </if>
         </where>;
     </select>
@@ -78,8 +78,8 @@
         FROM
             `dl_statistics`
         <where>
-            <if test="day != null">
-                STR_TO_DATE(#{year},'%Y')
+            <if test="year != null">
+                DATE_FORMAT(`time`,'%Y') = DATE_FORMAT(#{year},'%Y')
             </if>
         </where>;
     </select>