Commit fe3f144cff6e63aaa459f79f8370aa47a754641d
1 parent
26588981
【缺陷修复】ERP:数据统计时,租户在 MyBatis XML 不生效的问题
Showing
2 changed files
with
4 additions
and
0 deletions
yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpPurchaseStatisticsMapper.xml
| @@ -10,6 +10,7 @@ | @@ -10,6 +10,7 @@ | ||
| 10 | <if test="endTime != null"> | 10 | <if test="endTime != null"> |
| 11 | AND in_time < #{endTime} | 11 | AND in_time < #{endTime} |
| 12 | </if> | 12 | </if> |
| 13 | + AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()} | ||
| 13 | AND deleted = 0) - | 14 | AND deleted = 0) - |
| 14 | (SELECT IFNULL(SUM(total_price), 0) | 15 | (SELECT IFNULL(SUM(total_price), 0) |
| 15 | FROM erp_purchase_return | 16 | FROM erp_purchase_return |
| @@ -17,6 +18,7 @@ | @@ -17,6 +18,7 @@ | ||
| 17 | <if test="endTime != null"> | 18 | <if test="endTime != null"> |
| 18 | AND return_time < #{endTime} | 19 | AND return_time < #{endTime} |
| 19 | </if> | 20 | </if> |
| 21 | + AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()} | ||
| 20 | AND deleted = 0) | 22 | AND deleted = 0) |
| 21 | </select> | 23 | </select> |
| 22 | 24 |
yudao-module-erp/yudao-module-erp-biz/src/main/resources/mapper/statistics/ErpSaleStatisticsMapper.xml
| @@ -10,6 +10,7 @@ | @@ -10,6 +10,7 @@ | ||
| 10 | <if test="endTime != null"> | 10 | <if test="endTime != null"> |
| 11 | AND out_time < #{endTime} | 11 | AND out_time < #{endTime} |
| 12 | </if> | 12 | </if> |
| 13 | + AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()} | ||
| 13 | AND deleted = 0) - | 14 | AND deleted = 0) - |
| 14 | (SELECT IFNULL(SUM(total_price), 0) | 15 | (SELECT IFNULL(SUM(total_price), 0) |
| 15 | FROM erp_sale_return | 16 | FROM erp_sale_return |
| @@ -17,6 +18,7 @@ | @@ -17,6 +18,7 @@ | ||
| 17 | <if test="endTime != null"> | 18 | <if test="endTime != null"> |
| 18 | AND return_time < #{endTime} | 19 | AND return_time < #{endTime} |
| 19 | </if> | 20 | </if> |
| 21 | + AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()} | ||
| 20 | AND deleted = 0) | 22 | AND deleted = 0) |
| 21 | </select> | 23 | </select> |
| 22 | 24 |