|
@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import cn.com.qmth.examcloud.common.uac.AccessCtrlUtil;
|
|
|
import cn.com.qmth.examcloud.common.uac.entity.AccessUser;
|
|
|
+import cn.com.qmth.examcloud.common.util.ErrorMsg;
|
|
|
import cn.com.qmth.examcloud.common.util.RedisUtil;
|
|
|
import cn.com.qmth.examcloud.service.core.dto.UserInfo;
|
|
|
import cn.com.qmth.examcloud.service.core.entity.Org;
|
|
@@ -100,9 +101,9 @@ public class UserService {
|
|
|
public ResponseEntity loginProcess(User user,
|
|
|
String password){
|
|
|
if(user == null){
|
|
|
- return new ResponseEntity("该用户不存在",HttpStatus.NOT_FOUND);
|
|
|
+ return new ResponseEntity(new ErrorMsg("该用户不存在"),HttpStatus.NOT_FOUND);
|
|
|
}else if(!user.getPassword().equals(password)){
|
|
|
- return new ResponseEntity("密码错误",HttpStatus.EXPECTATION_FAILED);
|
|
|
+ return new ResponseEntity(new ErrorMsg("密码错误"),HttpStatus.EXPECTATION_FAILED);
|
|
|
}else{
|
|
|
String token = AccessCtrlUtil.buildToken();
|
|
|
createAccessUser(token,user);
|