智慧农业后台管理
Administrator
2022-05-20 8723d79af0f29e5dae144aeafe86f3df1b6e0716
src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.xml
@@ -4,13 +4,14 @@
    <!--自定义查询农产品库存分页数据-->
    <select id="selectFarmProductStockPage" resultType="org.springblade.modules.farmplant.vo.FarmProductStockVO">
        select * from sys_farm_product_stock
        select sfps.*,ss.url url from sys_farm_product_stock sfps
        left join sys_strain ss on ss.id = sfps.strain_id
        where 1=1
        <if test="farmProductStock.strainId!=null and farmProductStock.strainId!=''">
            and strain_id = #{farmProductStock.strainId}
            and sfps.strain_id = #{farmProductStock.strainId}
        </if>
        <if test="farmProductStock.leaves!=null and farmProductStock.leaves!=''">
            and leaves = #{farmProductStock.leaves}
            and sfps.leaves = #{farmProductStock.leaves}
        </if>
    </select>
</mapper>