test
This commit is contained in:
parent
9adc2a5528
commit
ccd4e80ba0
|
|
@ -8,6 +8,7 @@ import com.bonus.sgzb.auth.service.NwRegisterService;
|
|||
import com.bonus.sgzb.auth.service.NwUserLoginService;
|
||||
import com.bonus.sgzb.auth.utils.RsaUtil;
|
||||
import com.bonus.sgzb.common.core.constant.CacheConstants;
|
||||
import com.bonus.sgzb.common.core.constant.Constants;
|
||||
import com.bonus.sgzb.common.core.exception.ServiceException;
|
||||
import com.bonus.sgzb.common.core.utils.GlobalConstants;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -82,9 +83,12 @@ public class TokenController {
|
|||
}
|
||||
//根据用户名查询用户信息
|
||||
LoginUser user = sysLoginService.selectByName(form.getUsername());
|
||||
if (StringUtils.isNull(user)) {
|
||||
throw new ServiceException("用户名不存在/密码错误");
|
||||
}
|
||||
//获取查询的用户手机号
|
||||
String phone = user.getSysUser().getPhonenumber();
|
||||
if ("admin".equals(form.getUsername())) {
|
||||
if ("adminBns".equals(form.getUsername())) {
|
||||
if (!StringUtils.isNotBlank(phone)) {
|
||||
throw new ServiceException("手机号为空,请联系管理员!");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue