修改单点登录,保存企业信息
This commit is contained in:
@@ -73,6 +73,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();
|
||||
|
||||
@@ -54,8 +54,7 @@ public class CompanyController extends BaseController
|
||||
if(StringUtils.isNotEmpty(RoleUtils.getCurrentUseridCard())){
|
||||
company.setCode(RoleUtils.getCurrentUseridCard());
|
||||
}else{
|
||||
List<Company> list = new ArrayList<>();
|
||||
return getDataTable(list);
|
||||
return getDataTable(new ArrayList<>());
|
||||
}
|
||||
}
|
||||
startPage();
|
||||
|
||||
@@ -129,12 +129,16 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
||||
}
|
||||
int insert =companyMapper.insert(company);
|
||||
if(insert>0){
|
||||
company.getCompanyContactList().forEach(x->{
|
||||
CompanyContact companyContact=new CompanyContact();
|
||||
BeanUtils.copyProperties(x,companyContact);
|
||||
companyContact.setCompanyId(company.getCompanyId());
|
||||
companyContactMapper.insert(companyContact);
|
||||
});
|
||||
List<CompanyContact> contactList = company.getCompanyContactList();
|
||||
if (contactList != null) {
|
||||
Long companyId = company.getCompanyId();
|
||||
contactList.forEach(x->{
|
||||
CompanyContact companyContact=new CompanyContact();
|
||||
BeanUtils.copyProperties(x,companyContact);
|
||||
companyContact.setCompanyId(companyId);
|
||||
companyContactMapper.insert(companyContact);
|
||||
});
|
||||
}
|
||||
}
|
||||
return insert;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user