|
@@ -185,7 +185,7 @@ public class BizCompanyServiceImpl extends ServiceImpl<BizCompanyMapper, BizCom
|
|
|
@Override
|
|
|
public boolean save(BizCompany company) {
|
|
|
// 判断客户名是否重复
|
|
|
- if(this.query().eq("name", company.getName()).ne("id", company.getId() == null ? 0L :company.getId()).count() > 0) throw new ServiceException("客户名称重复", HttpStatus.ERROR);
|
|
|
+ if(this.query().eq("name", company.getName()).eq("tenant_id",company.getTenantId()).ne("id", company.getId() == null ? 0L :company.getId()).count() > 0) throw new ServiceException("客户名称重复", HttpStatus.ERROR);
|
|
|
AtomicBoolean res = new AtomicBoolean(super.save(company));
|
|
|
List<BizCompanyContactor> contactors = company.getContactors();
|
|
|
if (contactors != null && contactors.size() > 0) {
|