修改接口:查询新用户(租户)和企业的所属的总公司列表

This commit is contained in:
guoshengxiong 2024-07-26 17:34:16 +08:00 committed by pengjie
parent b70b990094
commit c19ce04ea2
2 changed files with 6 additions and 2 deletions

View File

@ -305,7 +305,7 @@ public class CompanyController {
return Result.success(companyService.getTenantOrgTreeList(paramMap)); return Result.success(companyService.getTenantOrgTreeList(paramMap));
} }
@ApiOperation(value = "查询新用户(租户)的所属的总公司列表", notes = "查询新用户(租户)的所属的总公司列表", httpMethod = "POST") @ApiOperation(value = "查询新用户(租户)和企业的所属的总公司列表", notes = "查询新用户(租户)和企业的所属的总公司列表", httpMethod = "POST")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "userId", value = "用户id", paramType = "body", required = true, dataType = "String"), @ApiImplicitParam(name = "userId", value = "用户id", paramType = "body", required = true, dataType = "String"),
}) })

View File

@ -875,7 +875,11 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
} else if (Objects.equals(systemUser.getAccountType(), 5) || Objects.equals(systemUser.getAccountType(), 6)) { } else if (Objects.equals(systemUser.getAccountType(), 5) || Objects.equals(systemUser.getAccountType(), 6)) {
return companyMapper.getMyHeadquarterCompanyListForProject(paramMap); return companyMapper.getMyHeadquarterCompanyListForProject(paramMap);
} else { } else {
throw new OpenAlertException("只有新用户和供应商和项目账号和项目子账号有效"); //企业
Company company = companyMapper.selectOne(new LambdaQueryWrapper<Company>()
.eq(Company::getCompanySn, systemUser.getSn()));
return companyMapper.selectList(new LambdaQueryWrapper<Company>()
.eq(Company::getCompanySn, company.getHeadquartersSn()));
} }
} }