Commit fe3f144cff6e63aaa459f79f8370aa47a754641d

Authored by YunaiV
1 parent 26588981

【缺陷修复】ERP:数据统计时,租户在 MyBatis XML 不生效的问题

yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpPurchaseStatisticsMapper.xml
... ... @@ -10,6 +10,7 @@
10 10 <if test="endTime != null">
11 11 AND in_time &lt; #{endTime}
12 12 </if>
  13 + AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
13 14 AND deleted = 0) -
14 15 (SELECT IFNULL(SUM(total_price), 0)
15 16 FROM erp_purchase_return
... ... @@ -17,6 +18,7 @@
17 18 <if test="endTime != null">
18 19 AND return_time &lt; #{endTime}
19 20 </if>
  21 + AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
20 22 AND deleted = 0)
21 23 </select>
22 24  
... ...
yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpSaleStatisticsMapper.xml
... ... @@ -10,6 +10,7 @@
10 10 <if test="endTime != null">
11 11 AND out_time &lt; #{endTime}
12 12 </if>
  13 + AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
13 14 AND deleted = 0) -
14 15 (SELECT IFNULL(SUM(total_price), 0)
15 16 FROM erp_sale_return
... ... @@ -17,6 +18,7 @@
17 18 <if test="endTime != null">
18 19 AND return_time &lt; #{endTime}
19 20 </if>
  21 + AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
20 22 AND deleted = 0)
21 23 </select>
22 24  
... ...