gongchunyi
2026-02-13 74edc58b0d751f788da1d7a7e3fb241f946c5072
src/main/resources/mapper/stock/StockInventoryMapper.xml
@@ -199,14 +199,16 @@
    </select>
    <select id="selectStorageProductCountByDate" resultType="int">
        SELECT COUNT(*)
        FROM (SELECT create_time
        SELECT SUM(total_count)
        FROM (SELECT COUNT(*) as total_count
              FROM stock_inventory
              WHERE create_time &gt;= #{startDate}
                AND create_time &lt;= #{endDate}
              UNION ALL
              SELECT create_time
              FROM stock_uninventory) combined
        WHERE create_time &gt;= #{startDate}
          AND create_time &lt;= #{endDate}
              SELECT COUNT(*) as total_count
              FROM stock_uninventory
              WHERE create_time &gt;= #{startDate}
                AND create_time &lt;= #{endDate}) AS combined_counts
    </select>
    <select id="selectDailyStockInCounts" resultType="java.util.Map">