|
|
@@ -53,7 +53,7 @@ import com.uas.platform.core.util.encry.Md5Utils;
|
|
|
/**
|
|
|
* @since 2016-9-26 21:18:35 账户中心统一管理;部分功能保留,但转移到v2目录
|
|
|
* @see com.uas.platform.b2b.v2.service.impl.EnterpriseServiceImpl
|
|
|
- *
|
|
|
+ *
|
|
|
*/
|
|
|
@Deprecated
|
|
|
@Service
|
|
|
@@ -81,7 +81,7 @@ public class EnterpriseServiceImpl implements EnterpriseService {
|
|
|
static final String ENUU_REGEXP = "^\\d{6,}$";
|
|
|
|
|
|
/**
|
|
|
- * 不可用的SAAS域名
|
|
|
+ * 不可用的优企云服域名
|
|
|
*/
|
|
|
private static final String[] UNUSABLE_SAASURL = { "www", "uas", "make", "trade", "usoft", "usoftchina", "usofterp", "report", "",
|
|
|
"ubtob", "ubtoc", "test", "static", "saas", "saas-static", "admin", "administrator", "manage", "manager" };
|
|
|
@@ -110,7 +110,7 @@ public class EnterpriseServiceImpl implements EnterpriseService {
|
|
|
if (en == null) {
|
|
|
enterprise.setEnDate(new Date());
|
|
|
enterprise.setEnable(Constant.NO);
|
|
|
- if (isSaas != null && isSaas) {// 申请SAAS
|
|
|
+ if (isSaas != null && isSaas) {// 申请优企云服
|
|
|
enterprise.setEnStatus((short) Status.UNAUDIT.value());
|
|
|
enterprise.setEnSaasStatus((short) Status.UNAUDIT.value());
|
|
|
enterprise.setEnSaasSendStatus((short) Status.NOT_UPLOAD.value());
|
|
|
@@ -143,7 +143,7 @@ public class EnterpriseServiceImpl implements EnterpriseService {
|
|
|
newEnterprise.setEnAdminuu(newUser.getUserUU());// 设置管理员UU号
|
|
|
newEnterprise = enterpriseDao.save(newEnterprise);// 再次保存enterprise
|
|
|
if (isSaas != null && isSaas) {
|
|
|
- registeRecord(newEnterprise, "注册并申请SAAS", "成功");
|
|
|
+ registeRecord(newEnterprise, "注册并申请优企云服", "成功");
|
|
|
} else {
|
|
|
registeRecord(newEnterprise, "注册", "成功");
|
|
|
}
|
|
|
@@ -164,7 +164,7 @@ public class EnterpriseServiceImpl implements EnterpriseService {
|
|
|
admin.setIssys(Constant.YES);
|
|
|
enterprise.setEnStatus((short) Status.ENABLED.value());
|
|
|
enterprise.setEnSendStatus((short) Status.NOT_UPLOAD.value());
|
|
|
- // 激活saas状态,开账套已经在管理平台审核时完成
|
|
|
+ // 激活优企云服状态,开账套已经在管理平台审核时完成
|
|
|
if (enterprise.getEnSaasStatus() != null && enterprise.getEnSaasStatus() == Status.UNACT.value()) {
|
|
|
enterprise.setEnSaasStatus((short) Status.ENABLED.value());
|
|
|
}
|
|
|
@@ -230,7 +230,7 @@ public class EnterpriseServiceImpl implements EnterpriseService {
|
|
|
registeRecord(enterprise, "设置管理员密码", "成功");
|
|
|
if (enterprise.getEnSaasStatus() != null && enterprise.getEnSaasStatus() == Status.ENABLED.value()
|
|
|
&& enterprise.getEnSaasUrl() != null) {
|
|
|
- // 申请Saas 跳转至SAAS初始化界面
|
|
|
+ // 申请优企云服 跳转至优企云服初始化界面
|
|
|
return enterprise.getEnSaasUrl();
|
|
|
}
|
|
|
return null;
|
|
|
@@ -261,9 +261,9 @@ public class EnterpriseServiceImpl implements EnterpriseService {
|
|
|
@Override
|
|
|
public List<Enterprise> getUnauditedEnterprises() {
|
|
|
List<Enterprise> enterprises = enterpriseDao.findByEnStatusAndEnSendStatus((short) Status.UNAUDIT.value(),
|
|
|
- (short) Status.NOT_UPLOAD.value());// B2b待审核
|
|
|
+ (short) Status.NOT_UPLOAD.value());// B2b商务待审核
|
|
|
enterprises.addAll(enterpriseDao.findByEnSaasStatusAndEnSaasSendStatus((short) Status.UNAUDIT.value(),
|
|
|
- (short) Status.NOT_UPLOAD.value()));// Saas待审核
|
|
|
+ (short) Status.NOT_UPLOAD.value()));// 优企云服待审核
|
|
|
if (!CollectionUtils.isEmpty(enterprises)) {
|
|
|
for (Enterprise enterprise : enterprises) {
|
|
|
User adminUser = userDao.findOne(enterprise.getEnAdminuu());
|
|
|
@@ -351,10 +351,9 @@ public class EnterpriseServiceImpl implements EnterpriseService {
|
|
|
model.put("saasUrl", enter.getEnSaasUrl());
|
|
|
try {
|
|
|
if (enter.getEnSaasStatus() != null && enter.getEnSaasStatus() == Status.UNACT.value()) {
|
|
|
- sendMailService.sendTemplateMail(admin.getUserEmail(), "欢迎注册优软商务平台账号和SAAS服务", model,
|
|
|
- "velocity/registerActivateSaas.vm");
|
|
|
+ sendMailService.sendTemplateMail(admin.getUserEmail(), "欢迎注册优软云服务", model, "velocity/registerActivateSaas.vm");
|
|
|
} else {
|
|
|
- sendMailService.sendTemplateMail(admin.getUserEmail(), "欢迎注册优软商务平台账号", model, "velocity/registerActivate.vm");
|
|
|
+ sendMailService.sendTemplateMail(admin.getUserEmail(), "欢迎注册优软云服务", model, "velocity/registerActivate.vm");
|
|
|
}
|
|
|
registeRecord(enter, "发送审核通过邮件", "成功");
|
|
|
} catch (Exception e) {
|
|
|
@@ -454,9 +453,9 @@ public class EnterpriseServiceImpl implements EnterpriseService {
|
|
|
model.put("saasUrl", enterprise.getEnSaasUrl());
|
|
|
try {
|
|
|
if (enterprise.getEnSaasStatus() != null && enterprise.getEnSaasStatus() == Status.UNACT.value()) {
|
|
|
- sendMailService.sendTemplateMail(admin.getUserEmail(), "欢迎注册优软商务平台账号和SAAS服务", model, "velocity/registerActivateSaas.vm");
|
|
|
+ sendMailService.sendTemplateMail(admin.getUserEmail(), "欢迎注册优软云服务", model, "velocity/registerActivateSaas.vm");
|
|
|
} else {
|
|
|
- sendMailService.sendTemplateMail(admin.getUserEmail(), "欢迎注册优软商务平台账号", model, "velocity/registerActivate.vm");
|
|
|
+ sendMailService.sendTemplateMail(admin.getUserEmail(), "欢迎注册优软云服务", model, "velocity/registerActivate.vm");
|
|
|
}
|
|
|
enterprise.setEnable(Constant.NO);
|
|
|
admin.setEnable(Constant.NO);
|
|
|
@@ -545,7 +544,7 @@ public class EnterpriseServiceImpl implements EnterpriseService {
|
|
|
if (enterprise == null)
|
|
|
throw new IllegalArgumentException();
|
|
|
if (enterprise.getEnSaasStatus() != null && enterprise.getEnSaasStatus() != Status.UNAPPLY.value())
|
|
|
- throw new IllegalOperatorException("您的企业已申请SAAS服务");
|
|
|
+ throw new IllegalOperatorException("您的企业已申请优企云服");
|
|
|
User admin = userDao.findOne(enterprise.getEnAdminuu());
|
|
|
boolean result = admin.getUserPwd().equals(Md5Utils.encode(enAdminPassword, admin.getUserUU()));
|
|
|
if (result) {
|
|
|
@@ -555,7 +554,7 @@ public class EnterpriseServiceImpl implements EnterpriseService {
|
|
|
enterprise.setEnSaasStatus((short) Status.UNAUDIT.value());
|
|
|
enterprise.setEnSaasSendStatus((short) Status.NOT_UPLOAD.value());
|
|
|
enterprise = enterpriseDao.save(enterprise);
|
|
|
- registeRecord(enterprise, "申请开通SAAS服务", "成功");
|
|
|
+ registeRecord(enterprise, "申请开通优企云服", "成功");
|
|
|
} else {
|
|
|
throw new IllegalOperatorException("管理员账号的密码错误");
|
|
|
}
|
|
|
@@ -569,7 +568,7 @@ public class EnterpriseServiceImpl implements EnterpriseService {
|
|
|
Enterprise enter = enterpriseDao.findEnterpriseByUu(enterprise.getUu());
|
|
|
if (enter != null && enter.getEnSaasStatus() != null && enter.getEnSaasStatus() == Status.UNAUDIT.value()) {
|
|
|
User admin = userDao.findOne(enter.getEnAdminuu());
|
|
|
- registeRecord(enter, "创建SAAS账套", "成功");
|
|
|
+ registeRecord(enter, "创建优企云服", "成功");
|
|
|
enter.setEnSaasStatus((short) Status.ENABLED.value());
|
|
|
enterpriseDao.save(enter);
|
|
|
if (admin != null) {
|
|
|
@@ -580,10 +579,10 @@ public class EnterpriseServiceImpl implements EnterpriseService {
|
|
|
model.put("rootpath", AgentUtils.getHost(request));
|
|
|
model.put("uu", enter.getUu());
|
|
|
try {
|
|
|
- sendMailService.sendTemplateMail(admin.getUserEmail(), "成功开通优软SAAS服务系统", model, "velocity/createdSaas.vm");
|
|
|
- registeRecord(enter, "发送SAAS开通提醒邮件", "成功");
|
|
|
+ sendMailService.sendTemplateMail(admin.getUserEmail(), "成功开通优软优企云服", model, "velocity/createdSaas.vm");
|
|
|
+ registeRecord(enter, "发送优企云服开通提醒邮件", "成功");
|
|
|
} catch (Exception e) {
|
|
|
- registeRecord(enter, "发送SAAS开通提醒邮件", "失败");
|
|
|
+ registeRecord(enter, "发送优企云服开通提醒邮件", "失败");
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|