huminmin
5 小时以前 fd09cebd6ede8c697741dcae5b2e3f927e0611af
src/main/resources/mapper/basic/ProductModelMapper.xml
@@ -13,11 +13,16 @@
        <result column="tenant_id" property="tenantId" />
        <result column="product_name" property="productName" />
        <result column="product_id" property="productId" />
        <result column="validity_period" property="validityPeriod" />
        <result column="filing_certificate_no" property="filingCertificateNo" />
        <result column="uid_no" property="uidNo" />
        <result column="parent_name" property="parentName" />
    </resultMap>
    <select id="listPageProductModel" resultType="com.ruoyi.basic.pojo.ProductModel">
        select pm.*,p.product_name
        select pm.*,p.product_name, parent_p.product_name as parent_name
        from product_model pm
        left join product p on pm.product_id = p.id
        left join product parent_p on p.parent_id = parent_p.id
        <where>
            <if test="c.model != null and c.model != ''">
                and pm.model  like  concat('%',#{c.model},'%')
@@ -97,5 +102,14 @@
        ORDER BY pm.id DESC
    </select>
    <select id="getProductAndModelList" resultType="java.util.Map">
        select p.id as id,
               pm.id as modelId,
               p.product_name as productName ,
               pm.model as  model
        from product_model pm
        left join product p on p.id = pm.product_id
        order by p.id,pm.id desc
    </select>
</mapper>