Commit cdf82c88 by tangzhaoqian

登录bug

parent 2c3de20f
......@@ -6,6 +6,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Stream;
import javax.annotation.PostConstruct;
......@@ -565,11 +566,24 @@ public class LoginController {
qyzxEmpLogin1.setQys(qys);
QysDto ctrl = qys.get(0);
if (qyzxEmpLogin1.getOrgId() != null) {
Stream<QysDto> s = qys.stream()
.filter(item -> item.getStatus() == 1 && qyzxEmpLogin1.getOrgId().equals(item.getId()));
if (s != null) {
ctrl = s.findFirst().get();
// for (QysDto qysDto : qys) {
// if (qyzxEmpLogin1.getOrgId().equals(qysDto.getId()) && qysDto.getStatus() == 1) {
// ctrl = qysDto;
// }
// System.out.println(qyzxEmpLogin1.getOrgId());
// System.out.println(qysDto);
// }
Optional<QysDto> s = qys.parallelStream()
.filter(item -> item.getStatus() == 1 && qyzxEmpLogin1.getOrgId().equals(item.getId())).findFirst();
System.out.println(s.isPresent());
if (s != null && s.isPresent()) {
ctrl = s.get();
}
}
if (ctrl.getStatus() == null || ctrl.getStatus().equals(0)) {
return ResultUtil.error("帐号被禁用");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment