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 | 10 | <if test="endTime != null"> |
| 11 | 11 | AND in_time < #{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 < #{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 < #{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 < #{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 | ... | ... |