增加genIdAndValid注释提示

This commit is contained in:
thinkgem
2021-01-10 11:46:26 +08:00
parent 81657cd0df
commit b05433f0b6
2 changed files with 2 additions and 0 deletions

View File

@@ -66,6 +66,7 @@ public class CompanyServiceSupport extends TreeService<CompanyDao, Company>
@Transactional(readOnly=false)
public void save(Company company) {
if (company.getIsNewRecord()){
// 生成主键,并验证改主键是否存在,如存在则抛出验证信息
genIdAndValid(company, company.getViewCode());
// 当前新数据授权,如果用户有上级数据权限,则当前数据也有相应的数据权限
dataScopeService.insertIfParentExists(company, "Company");

View File

@@ -59,6 +59,7 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
@Transactional(readOnly=false)
public void save(Office office) {
if (office.getIsNewRecord()){
// 生成主键,并验证改主键是否存在,如存在则抛出验证信息
genIdAndValid(office, office.getViewCode());
// 当前新数据授权,如果用户有上级数据权限,则当前数据也有相应的数据权限
dataScopeService.insertIfParentExists(office, "Office");