瀏覽代碼

Merge branch 'dev' of yeshijie/patient-co-management into dev

yeshijie 7 年之前
父節點
當前提交
3d4c411234

+ 3 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/LoginController.java

@ -1,11 +1,9 @@
package com.yihu.wlyy.web.common.account;
import com.yihu.edu.entity.RoleWithAuthorityCheck;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.login.LoginLog;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.security.Token;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.security.TokenDao;
import com.yihu.wlyy.service.app.account.DoctorInfoService;
import com.yihu.wlyy.service.common.SMSService;
@ -158,8 +156,8 @@ public class LoginController extends BaseController {
                if (loginPassword.equals(doctor.getPassword())) {
                    Token token = tokenService.findDoctorToken(doctor.getCode());
                    if (token != null && platform == 4 && getIMEI().equals(token.getImei())) {
                        //pc版本要做单点登陆 所以如果platform =4 并且 token存在直接返回之前的token
                    if (token != null && platform == 4 && getIMEI().equals(token.getImei())&&token.getTimeout().getTime() > System.currentTimeMillis()) {
                        //pc版本要做单点登陆 所以如果platform =4 并且 token存在直接返回之前的token, --2018-08-09新增判断token是否过期
                    }else {
                        // 用户校验通过,生成token
                        token = tokenService.newToken(doctor.getCode(), getIMEI(), platform);
@ -264,7 +262,7 @@ public class LoginController extends BaseController {
                    loginLog.setUserCode(doctor.getCode());
                    // 用户校验通过,生成token
                    Token token = tokenService.findDoctorToken(doctor.getCode());
                    if (token != null && platform == 4 && getIMEI().equals(token.getImei())) {
                    if (token != null && platform == 4 && getIMEI().equals(token.getImei())&&token.getTimeout().getTime() > System.currentTimeMillis()) {
                        //pc版本要做单点登陆 所以如果platform =4 并且 token存在直接返回之前的token
                    } else {