|
|
@@ -67,7 +67,17 @@ public class CommonService {
|
|
|
public void checkEntRepeat(String entName, String phone) {
|
|
|
List<KwsEnterprise> list = kwsEnterpriseDao.checkEntRepeat(entName, phone);
|
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
|
- throw new SystemException(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.ENT_EXISTS);
|
|
|
+ for (KwsEnterprise kwsEnterprise : list) {
|
|
|
+ String firmName = kwsEnterprise.getFirmName();
|
|
|
+ String phone1 = kwsEnterprise.getPhone();
|
|
|
+ if (entName.equals(firmName)) {
|
|
|
+ throw new SystemException(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.ENT_EXISTS);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (phone.equals(phone1)) {
|
|
|
+ throw new SystemException(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.ACCOUNT_EXISTS);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|