From db6da36b94e1e43096a818052ee65dbfcd5e6d98 Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期四, 12 十二月 2024 17:54:01 +0800
Subject: [PATCH] add: 供应商子账号5
---
src/main/java/com/mzl/flower/service/system/UserService.java | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/mzl/flower/service/system/UserService.java b/src/main/java/com/mzl/flower/service/system/UserService.java
index 92bf94e..6721d3c 100644
--- a/src/main/java/com/mzl/flower/service/system/UserService.java
+++ b/src/main/java/com/mzl/flower/service/system/UserService.java
@@ -225,9 +225,19 @@
}
}else if(Constants.USER_TYPE.supplier.name().equals(user.getType())){
result.setSupplierDTO(supplierService.getCurrentSupplier());
+ //子账号信息
SupplierSub sub = supplierSubMapper.getCurrentSupplier(SecurityUtils.getUserId());
+ //主账号信息
SupplierDTO dto = supplierMapper.getCurrentSupplier(SecurityUtils.getUserId());
- String tempUserId = globalSupplierVariables.getSupplier(String.valueOf(dto.getId()));
+// if (!ObjectUtils.isEmpty(dto)) {
+// globalSupplierVariables.removeSupplier(String.valueOf(dto.getId()));
+// }
+ String tempUserId = "";
+ if (!ObjectUtils.isEmpty(sub)) {
+ tempUserId = globalSupplierVariables.getSupplier(String.valueOf(sub.getId()));
+ } else {
+ tempUserId = globalSupplierVariables.getSupplier(String.valueOf(dto.getId()));
+ }
if (!ObjectUtils.isEmpty(sub)) {
result.setIsSubSupplier(true);
result.setSupplierSub(sub);
--
Gitblit v1.9.3