fix(goods): 调整SKU查询逻辑以支持租户忽略查询

This commit is contained in:
huk 2025-09-20 14:15:35 +08:00
parent b5b588eb2c
commit e8685c3eba
2 changed files with 5 additions and 6 deletions

View File

@ -36,7 +36,7 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuSe
public IPage<SkuVO> getList(SkuBo query, Page<Sku> page) {
query.setTenantId(TenantHelper.getTenantId());
return skuMapper.getlist(page,query);
return TenantHelper.ignore(() ->skuMapper.getlist(page,query));
}
public SkuVO selectSkuByid(Long id) {

View File

@ -27,11 +27,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
s.update_by,
s.update_time,
p.name AS productName
FROM
pms_sku s
LEFT JOIN
pms_product p ON s.product_id = p.id
and s.del_flag = '0' and p.del_flag = '0'
FROM pms_sku s
LEFT JOIN
pms_product p ON s.product_id = p.id
where s.del_flag = '0' and p.del_flag = '0'
<if test="query.productName != null and query.productName != ''">
AND p.name LIKE CONCAT('%', #{query.productName}, '%')
</if>