|
@@ -1,9 +1,5 @@
|
|
|
package com.yonge.cooleshow.biz.dal.service.impl;
|
|
|
|
|
|
-import com.yonge.cooleshow.api.feign.dto.EmployeeApi;
|
|
|
-import com.yonge.cooleshow.api.feign.dto.StudentApi;
|
|
|
-import com.yonge.cooleshow.api.feign.dto.TeacherApi;
|
|
|
-import com.yonge.cooleshow.api.feign.dto.TenantWrapper;
|
|
|
import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
|
import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.*;
|
|
@@ -12,9 +8,7 @@ import com.yonge.cooleshow.biz.dal.enums.MessageSendMode;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.MessageTypeEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.service.*;
|
|
|
import com.yonge.cooleshow.common.constant.SysConfigConstant;
|
|
|
-import com.yonge.cooleshow.common.enums.SysUserType;
|
|
|
import com.yonge.cooleshow.common.enums.UserLockFlag;
|
|
|
-import com.yonge.cooleshow.common.security.SecurityConstants;
|
|
|
import com.yonge.toolset.base.exception.BizException;
|
|
|
import com.yonge.toolset.thirdparty.message.MessageSenderPluginContext;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -77,8 +71,13 @@ public class SmsCodeServiceImpl implements SmsCodeService {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public boolean sendValidCode(String mobile, String type, ClientEnum platform, String code) {
|
|
|
+ return sendValidCode(mobile, type, platform, code, null);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
- public boolean sendValidCode(String mobile, String type, ClientEnum platform, String code) {
|
|
|
+ public boolean sendValidCode(String mobile, String type, ClientEnum platform, String code, String client) {
|
|
|
|
|
|
String configValue = sysConfigService.findConfigValue(SysConfigConstant.SMS_SEND_VERIFY);
|
|
|
if((StringUtils.isNotEmpty(configValue) && "1".equals(configValue)) || StringUtils.isNotBlank(code)) {
|
|
@@ -145,6 +144,18 @@ public class SmsCodeServiceImpl implements SmsCodeService {
|
|
|
throw new LockedException("账号已冻结,请联系管理员");
|
|
|
}
|
|
|
}
|
|
|
+ } else if (ClientEnum.WEBSITE == platform && StringUtils.isNotBlank(client)) {
|
|
|
+ if (client.equals(ClientEnum.STUDENT.name())) {
|
|
|
+ Student student = studentService.getById(userId);
|
|
|
+ if (student != null && UserLockFlag.LOCKED.equals(student.getLockFlag())) {
|
|
|
+ throw new LockedException("账号已冻结,请联系管理员");
|
|
|
+ }
|
|
|
+ } else if (client.equals(ClientEnum.TEACHER.name())) {
|
|
|
+ Teacher teacher = teacherService.getById(userId);
|
|
|
+ if (teacher !=null && UserLockFlag.LOCKED.equals(teacher.getLockFlag())) {
|
|
|
+ throw new LockedException("账号已冻结,请联系管理员");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} else {
|