publish
This commit is contained in:
@@ -68,4 +68,6 @@ public interface ICompanyService
|
||||
void importLabel();
|
||||
|
||||
void importLabelBank();
|
||||
|
||||
void register(Company company);
|
||||
}
|
||||
|
||||
@@ -215,4 +215,14 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper,Company> imple
|
||||
companyLabelMapper.insert(label);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(Company company) {
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
company.setUserId(userId);
|
||||
if(companyMapper.selectCount(Wrappers.<Company>lambdaQuery().eq(Company::getName, company.getName()).in(Company::getStatus,Arrays.asList(0,1)))>0){
|
||||
throw new ServiceException(company.getName()+"已经存在");
|
||||
}
|
||||
company.setStatus(0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user