修改问题判断企业和岗位时,是企业则,社会信用代码为空则返回空

This commit is contained in:
sh
2026-06-17 00:13:28 +08:00
parent 4feffc1c48
commit bcca13f396
2 changed files with 7 additions and 0 deletions

View File

@@ -88,6 +88,9 @@ public class CmsJobController extends BaseController
{
if (RoleUtils.isCompanyAdmin()) {
Company company = companyService.queryCodeCompany(RoleUtils.getCurrentUseridCard());
if(company==null){
return getDataTable(new ArrayList<>());
}
job.setCompanyId(Objects.nonNull(company) ? company.getCompanyId() : null);
}
startPage();

View File

@@ -24,6 +24,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
@@ -54,6 +55,9 @@ public class CompanyController extends BaseController
{
if (RoleUtils.isCompanyAdmin()) {
System.out.println("企业社会信用代码============================="+RoleUtils.getCurrentUseridCard());
if(company==null){
return getDataTable(new ArrayList<>());
}
company.setCode(RoleUtils.getCurrentUseridCard());
}
startPage();