Browse Source

特殊的SAAS域名不可用

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@1286 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
suntg 10 years ago
parent
commit
84b58afdff

+ 10 - 0
src/main/java/com/uas/platform/b2b/service/impl/EnterpriseServiceImpl.java

@@ -54,6 +54,11 @@ public class EnterpriseServiceImpl implements EnterpriseService {
 	private RegisterRecordDao registerRecordDao;
 	private RegisterRecordDao registerRecordDao;
 	@Autowired
 	@Autowired
 	private CommonDao commonDao;
 	private CommonDao commonDao;
+	
+	/**
+	 * 不可用的SAAS域名
+	 */
+	private static final String[] UNUSABLE_SAASURL = {"www", "uas", "make", "trade", "usoft", "usoftchina", "usofterp", "report", "", "ubtob", "test"};
 
 
 	@Override
 	@Override
 	public String bussinessCodeEnable(String code) {
 	public String bussinessCodeEnable(String code) {
@@ -419,6 +424,11 @@ public class EnterpriseServiceImpl implements EnterpriseService {
 
 
 	@Override
 	@Override
 	public boolean isSaasUrlUseable(String saasUrl) {
 	public boolean isSaasUrlUseable(String saasUrl) {
+		for(String unusableSaasUrl : UNUSABLE_SAASURL) {
+			if(unusableSaasUrl.equals(saasUrl)) {
+				return false;
+			}
+		}
 		return CollectionUtils.isEmpty(enterpriseDao.findByEnSaasUrl(saasUrl));
 		return CollectionUtils.isEmpty(enterpriseDao.findByEnSaasUrl(saasUrl));
 	}
 	}