liyong
16 小时以前 dcb74418d8106d4f57e56a584f73da5484cd64b8
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
<?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.production.mapper.ProductStructureMapper">
 
    <resultMap id="basicMap" type="com.ruoyi.production.pojo.ProductStructure">
        <id property="id" column="id"/>
        <result property="productModelId" column="product_model_id"/>
        <result property="processId" column="process_id"/>
        <result property="unitQuantity" column="unit_quantity"/>
        <result property="demandedQuantity" column="demanded_quantity"/>
        <result property="unit" column="unit"/>
        <result property="diskQuantity" column="disk_quantity"/>
        <result property="tenantId" column="tenant_id"/>
    </resultMap>
 
    <select id="listByproductModelId" resultType="com.ruoyi.production.dto.ProductStructureDto">
        select ps.*,
        pm.speculative_trading_name ,
        pp.name as  process_name,
        pm.product_id,
        pm.model
        from
        product_structure ps
        left join product_model pm on ps.product_model_id = pm.id
        left join product_process pp on ps.process_id = pp.id
        where pm.id = #{productId}
        order by ps.id
    </select>
</mapper>