linwe
2024-11-06 6077ce233ec0ecb454f34a58f68e3ff958ef0dc1
src/main/java/org/springblade/modules/yw/mapper/EmergencySuppliesMapper.xml
@@ -37,12 +37,20 @@
        <if test="emergencySupplies.name!=null and emergencySupplies.name!=''">
            and yes.name like concat('%',#{emergencySupplies.name},'%')
        </if>
        <if test="emergencySupplies.firmId!=null">
            and yes.firm_id = #{emergencySupplies.firmId}
        <if test="emergencySupplies.id!=null">
            and yes.firm_id = #{emergencySupplies.id}
        </if>
        <if test="emergencySupplies.type!=null">
            and yes.type = #{emergencySupplies.type}
        </if>
        <if test="emergencySupplies.ownership!=null">
            <if test="emergencySupplies.ownership==1">
                and yes.firm_id is null
            </if>
            <if test="emergencySupplies.ownership==2">
                and yes.firm_id is not null
            </if>
        </if>
    </select>
</mapper>