chenhj
3 天以前 31e23deb9ae71263fb59fcd82c26b22c9cdfc3d4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.business.mapper.InventorySummaryMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.business.entity.InventorySummary">
        <id column="id" property="id"/>
        <result column="deleted" property="deleted"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
        <result column="inventory_id" property="inventoryId"/>
        <result column="inventory_type" property="inventoryType"/>
        <result column="inventory_quantity" property="inventoryQuantity"/>
        <result column="input_end_record_id" property="inputEndRecordId"/>
        <result column="output_end_record_id" property="outputEndRecordId"/>
    </resultMap>
 
    <!-- 通用查询结果列 -->
        <sql id="Base_Column_List">
                deleted,
                create_time,
                update_time,
            id, inventory_id, inventory_type, inventory_quantity, input_end_record_id, output_end_record_id
        </sql>
 
    <select id="getInventorySummaryForUpdateById" resultType="com.ruoyi.business.entity.InventorySummary">
        select *
        from inventory_summary
        where id = #{id} for update
    </select>
 
    <select id="getInventorySummaryForUpdateByInventoryIdAndType" resultType="com.ruoyi.business.entity.InventorySummary">
        select *
        from inventory_summary
        where inventory_id = #{inventoryId} and inventory_type = #{type} for update
    </select>
 
</mapper>