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
cd73181e
Commit
cd73181e
authored
Mar 23, 2022
by
龙于生
Committed by
284718418@qq.com
Mar 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改检测用户是否存在接口 状态判断
parent
b6cca82e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
1 deletions
+42
-1
src/main/java/cn/timer/api/controller/LoginController.java
+3
-0
src/main/java/cn/timer/api/controller/check/CheckController.java
+39
-1
No files found.
src/main/java/cn/timer/api/controller/LoginController.java
View file @
cd73181e
...
@@ -720,6 +720,9 @@ public class LoginController {
...
@@ -720,6 +720,9 @@ public class LoginController {
private
Result
<
QyzxEmpLogin
>
loginhan
(
QyzxEmpLogin
qyzxEmpLogin1
,
HttpServletRequest
request
)
{
private
Result
<
QyzxEmpLogin
>
loginhan
(
QyzxEmpLogin
qyzxEmpLogin1
,
HttpServletRequest
request
)
{
if
(
qyzxEmpLogin1
==
null
)
if
(
qyzxEmpLogin1
==
null
)
return
ResultUtil
.
error
(
"帐号不存在!"
);
return
ResultUtil
.
error
(
"帐号不存在!"
);
if
(
qyzxEmpLogin1
.
getSts
().
equals
(
9
))
{
return
ResultUtil
.
error
(
"9"
,
"服务器变更"
);
}
String
ip
;
String
ip
;
try
{
try
{
ip
=
UserIp
.
getIpAddr
(
request
);
ip
=
UserIp
.
getIpAddr
(
request
);
...
...
src/main/java/cn/timer/api/controller/check/CheckController.java
View file @
cd73181e
...
@@ -2,10 +2,15 @@ package cn.timer.api.controller.check;
...
@@ -2,10 +2,15 @@ package cn.timer.api.controller.check;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.serverurl.CompanyServerUrl
;
import
cn.timer.api.bean.serverurl.CompanyServerUrl
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dto.login.QysDto
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.ResultUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -20,6 +25,11 @@ import java.util.List;
...
@@ -20,6 +25,11 @@ import java.util.List;
@RequestMapping
(
value
=
"/check"
,
produces
=
{
"application/json"
})
@RequestMapping
(
value
=
"/check"
,
produces
=
{
"application/json"
})
public
class
CheckController
{
public
class
CheckController
{
@Autowired
private
YgglMainEmpMapper
ygglMainEmpMapper
;
@Autowired
private
QyzxEmpLoginMapper
qyzxEmpLoginMapper
;
@GetMapping
(
value
=
"/company_server_url_list"
)
@GetMapping
(
value
=
"/company_server_url_list"
)
@ApiOperation
(
value
=
"公司服务端地址列表"
,
httpMethod
=
"GET"
,
notes
=
"公司服务端地址列表"
)
@ApiOperation
(
value
=
"公司服务端地址列表"
,
httpMethod
=
"GET"
,
notes
=
"公司服务端地址列表"
)
...
@@ -42,10 +52,38 @@ public class CheckController {
...
@@ -42,10 +52,38 @@ public class CheckController {
List
<
QyzxEmpLogin
>
qyzxEmpLogins
=
QyzxEmpLogin
.
builder
().
build
()
List
<
QyzxEmpLogin
>
qyzxEmpLogins
=
QyzxEmpLogin
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
QyzxEmpLogin
>()
.
selectList
(
new
QueryWrapper
<
QyzxEmpLogin
>()
.
lambda
().
eq
(
QyzxEmpLogin:
:
getPhone
,
account
).
eq
(
QyzxEmpLogin:
:
getSts
,
1
));
.
lambda
().
eq
(
QyzxEmpLogin:
:
getPhone
,
account
).
eq
(
QyzxEmpLogin:
:
getSts
,
1
));
//System.out.println(qyzxEmpLogins);
//System.out.println(qyzxEmpLogins);
if
(
qyzxEmpLogins
.
size
()==
0
){
if
(
qyzxEmpLogins
.
size
()
>
0
){
YgglMainEmp
userInfo
=
ygglMainEmpMapper
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
select
(
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getPhone
,
YgglMainEmp:
:
getBmgwId
,
YgglMainEmp:
:
getOrgCode
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
qyzxEmpLogins
.
get
(
0
).
getId
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
qyzxEmpLogins
.
get
(
0
).
getOrgId
()));
List
<
QysDto
>
qys
=
qyzxEmpLoginMapper
.
getQys
(
qyzxEmpLogins
.
get
(
0
).
getId
());
QysDto
ctrl
=
qys
.
get
(
0
);
if
(
userInfo
==
null
)
{
return
ResultUtil
.
error
(
"账户不存在"
);
}
if
(
ctrl
.
getStatus
()
==
null
||
ctrl
.
getStatus
().
equals
(
0
))
{
//return ResultUtil.error("帐号被禁用");
return
ResultUtil
.
error
(
"账户不存在"
);
}
if
(
ctrl
.
getStatus
().
equals
(
9
))
{
//return ResultUtil.error("9","服务器变更");
return
ResultUtil
.
error
(
"账户不存在"
);
}
}
else
{
return
ResultUtil
.
error
(
"账户不存在"
);
return
ResultUtil
.
error
(
"账户不存在"
);
}
}
return
ResultUtil
.
success
(
"OK"
);
return
ResultUtil
.
success
(
"OK"
);
}
}
...
...
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