cloudroam
2024-12-12 db6da36b94e1e43096a818052ee65dbfcd5e6d98
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);