|
@@ -200,7 +200,7 @@ public class CompanyServiceImpl implements CompanyService {
|
|
|
result = pcCompanyMapper.updateByPrimaryKeySelective(dbData);
|
|
|
}
|
|
|
|
|
|
- if(data.listLabel.size()>0){
|
|
|
+ if(data.listLabel!=null && data.listLabel.size()>0){
|
|
|
PcLabelCompanyExample labelEmp = new PcLabelCompanyExample();
|
|
|
labelEmp.or().andCompanyIDEqualTo(data.getCompanyID());
|
|
|
pcLabelCompanyMapper.deleteByExample(labelEmp);
|
|
@@ -225,9 +225,13 @@ public class CompanyServiceImpl implements CompanyService {
|
|
|
if( curCompanyPostList != null && curCompanyPostList.size() > 0){
|
|
|
throw new BaseException("10004","所选企业已有关联岗位信息,不允许删除!");
|
|
|
}else{
|
|
|
- PcCompanyExample contactExample = new PcCompanyExample();
|
|
|
- contactExample.or().andCompanyIDEqualTo(curCompanyID);
|
|
|
- result += pcCompanyMapper.deleteByExample(contactExample);
|
|
|
+ int count = pcCompanyMapper.deleteByPrimaryKey(curCompanyID);
|
|
|
+ if(count>0){
|
|
|
+ PcLabelCompanyExample labelEmp = new PcLabelCompanyExample();
|
|
|
+ labelEmp.or().andCompanyIDEqualTo(curCompanyID);
|
|
|
+ pcLabelCompanyMapper.deleteByExample(labelEmp);
|
|
|
+ }
|
|
|
+ result+=count;
|
|
|
}
|
|
|
}
|
|
|
return result;
|