|
|
@@ -16,6 +16,7 @@ import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
import com.uas.platform.b2b.core.util.SearchKeyUtils;
|
|
|
+import com.uas.platform.b2b.dao.CommonDao;
|
|
|
import com.uas.platform.b2b.dao.EnterpriseDao;
|
|
|
import com.uas.platform.b2b.dao.RegisterRecordDao;
|
|
|
import com.uas.platform.b2b.dao.UserDao;
|
|
|
@@ -47,6 +48,8 @@ public class EnterpriseServiceImpl implements EnterpriseService {
|
|
|
private SendMailService sendMailService;
|
|
|
@Autowired
|
|
|
private RegisterRecordDao registerRecordDao;
|
|
|
+ @Autowired
|
|
|
+ private CommonDao commonDao;
|
|
|
|
|
|
@Override
|
|
|
public String bussinessCodeEnable(String code) {
|
|
|
@@ -317,12 +320,12 @@ public class EnterpriseServiceImpl implements EnterpriseService {
|
|
|
@Override
|
|
|
public String reSendActivateEmail(Long enUU, String email, HttpServletRequest request) {
|
|
|
Enterprise enterprise = enterpriseDao.findEnterpriseByUu(enUU);
|
|
|
- if(enterprise == null)
|
|
|
+ if (enterprise == null)
|
|
|
throw new IllegalOperatorException("不存在的企业UU号");
|
|
|
String encodeString = tokenService.getEncodeToken("enterprise", enUU);
|
|
|
User admin = userDao.findOne(enterprise.getEnAdminuu());
|
|
|
- if(StringUtils.hasText(email) && !"null".equals(email) && email != null) {//修改管理员Email
|
|
|
- if(userService.isEmailUseable(email)) {
|
|
|
+ if (StringUtils.hasText(email) && !"null".equals(email) && email != null) {// 修改管理员Email
|
|
|
+ if (userService.isEmailUseable(email)) {
|
|
|
admin.setUserEmail(email);
|
|
|
} else {
|
|
|
throw new IllegalOperatorException("邮箱地址重复,不可用");
|
|
|
@@ -352,4 +355,9 @@ public class EnterpriseServiceImpl implements EnterpriseService {
|
|
|
return admin.getUserEmail();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public long getSequence() {
|
|
|
+ return commonDao.generateSequence("enterprises_seq");
|
|
|
+ }
|
|
|
+
|
|
|
}
|