SELECT tb1.* FROM dc_base_stock tb1 LEFT JOIN dc_auto_turnover tb2 ON tb1.bailun_sku = tb2.bailun_sku and tb1.warehouse_code = tb2.warehouse_code WHERE tb2.bailun_sku is null;
SELECT tb1.* FROM dc_base_stock tb1 LEFT JOIN dc_auto_turnover tb2 ON tb1.bailun_sku = tb2.bailun_sku and tb1.warehouse_code = tb2.warehouse_code left join dc_base_sku tb3 on tb1.bailun_sku = tb3.bailun_sku WHERE tb2.bailun_sku is null and tb1.warehouse_code = 'GZBLWH' and tb3.buyer_name in ('黎艳漫', '李志民') and tb3.push_time > '2019-08-01'
</select>
<selectid="countByParam"resultType="long">
...
...
@@ -1263,13 +1263,13 @@
left join (select warehouse_code,hq_type from dc_base_warehouse where hq_type=#{jobParameter}) tb2
on tb1.warehouse_code=tb2.warehouse_code
LEFT JOIN dc_auto_turnover tb3 ON tb1.bailun_sku = tb3.bailun_sku and tb1.warehouse_code = tb3.warehouse_code
where tb2.warehouse_code is not null and tb2.bailun_sku is null
where tb2.warehouse_code is not null and tb3.bailun_sku is null