Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
08422e2e
Commit
08422e2e
authored
Apr 29, 2020
by
邓实川
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录bug修改
parent
5e6dd84b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
23 deletions
+18
-23
src/main/java/cn/timer/api/controller/LoginController.java
+18
-23
No files found.
src/main/java/cn/timer/api/controller/LoginController.java
View file @
08422e2e
...
...
@@ -496,8 +496,8 @@ public class LoginController {
return
ResultUtil
.
error
(
"注册企业失败2"
);
}
}
boolean
b4
=
YgglMainEmp
.
builder
().
orgCode
(
qyzxEntInfoM
.
getId
()).
empNum
(
login
.
getId
())
boolean
b4
=
YgglMainEmp
.
builder
().
orgCode
(
qyzxEntInfoM
.
getId
()).
empNum
(
login
.
getId
())
.
rzTime
(
new
Date
())
.
name
(
username
).
build
().
insert
();
if
(!
b4
)
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
...
...
@@ -505,8 +505,8 @@ public class LoginController {
}
// 员工企业关联表
QyzxEmpEntAsso
qyzxEmpEntAsso
=
QyzxEmpEntAsso
.
builder
().
empNum
(
login
.
getId
()).
orgCode
(
qyzxEntInfoM
.
getId
())
.
status
(
1
)
.
userType
(
CommonEnum
.
U_TYPE_ADMIN
.
getType
()).
build
();
QyzxEmpEntAsso
qyzxEmpEntAsso
=
QyzxEmpEntAsso
.
builder
().
empNum
(
login
.
getId
()).
orgCode
(
qyzxEntInfoM
.
getId
())
.
status
(
1
).
userType
(
CommonEnum
.
U_TYPE_ADMIN
.
getType
()).
build
();
boolean
b3
=
qyzxEmpEntAsso
.
insert
();
if
(!
b3
)
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
...
...
@@ -559,31 +559,26 @@ public class LoginController {
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
List
<
QysDto
>
qys
=
qyzxEmpLoginMapper
.
getQys
(
qyzxEmpLogin1
.
getId
()
);
List
<
QysDto
>
qys
=
qyzxEmpLoginMapper
.
getQys
(
qyzxEmpLogin1
.
getId
());
if
(
qys
.
size
()
==
0
)
return
ResultUtil
.
error
(
"没有任何公司可以查看!"
);
qyzxEmpLogin1
.
setQys
(
qys
);
QysDto
ctrl
=
qys
.
get
(
0
);
if
(
qyzxEmpLogin1
.
getOrgId
()
!=
null
)
{
// 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
();
for
(
QysDto
qysDto
:
qys
)
{
if
(
qyzxEmpLogin1
.
getOrgId
().
equals
(
qysDto
.
getId
())
&&
qysDto
.
getStatus
()
==
1
)
{
ctrl
=
qysDto
;
}
}
// Stream<QysDto> s = qys.stream()
// .filter(item -> item.getStatus() == 1 && qyzxEmpLogin1.getOrgId().equals(item.getId()));
//
// if (s != null) {
// ctrl = s.findFirst().get();
// }
}
if
(
ctrl
.
getStatus
()
==
null
||
ctrl
.
getStatus
().
equals
(
0
))
{
return
ResultUtil
.
error
(
"帐号被禁用"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment