linwe
2024-11-06 bc3c8f567476dc790f662dc8c490d9a128e60bc1
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>