自动化立体仓库 - WMS系统
#
zjj
2024-09-23 539d9ffc477d28a23a923b41fdeabc8c37c99ce6
src/main/resources/mapper/MatMapper.xml
@@ -42,8 +42,10 @@
        <result column="update_by" property="updateBy" />
        <result column="update_time" property="updateTime" />
        <result column="memo" property="memo" />
        <result column="stock" property="stock" />
        <result column="inventory_max" property="inventoryMax" />
        <result column="inventory_min" property="inventoryMin" />
        <result column="inventory_age_max" property="inventoryAgeMax" />
    </resultMap>
    <select id="listByPage" resultMap="BaseResultMap">
@@ -74,4 +76,21 @@
    <select id="selectByMatnr" resultMap="BaseResultMap">
        select top 1 * from man_mat where 1=1 and matnr = #{matnr}
    </select>
    <select id="selectAllPage" resultMap="BaseResultMap">
        select * from
        (
        SELECT
        ROW_NUMBER() over (order by v.matnr desc) as row,
        v.*
        FROM man_mat v
        WHERE 1=1
        ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
    </select>
    <select id="selectAllPageSize" resultType="java.lang.Integer">
        select
        count(1)
        FROM man_mat v
        WHERE 1=1
    </select>
</mapper>