Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
d3f6089d
Commit
d3f6089d
authored
May 29, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备赋码弹窗仅使用单位弹窗
parent
7202f54f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
14 deletions
+36
-14
IUserCheckStatusService.java
.../boot/module/tzs/api/service/IUserCheckStatusService.java
+2
-1
UserCheckStatusController.java
.../module/tzs/biz/controller/UserCheckStatusController.java
+1
-2
UserCheckStatusServiceImpl.java
...dule/tzs/biz/service/impl/UserCheckStatusServiceImpl.java
+33
-11
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/service/IUserCheckStatusService.java
View file @
d3f6089d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
service
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.UserCheckStatus
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.UserCheckStatus
;
/**
/**
...
@@ -8,7 +9,7 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.UserCheckStatus;
...
@@ -8,7 +9,7 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.UserCheckStatus;
*/
*/
public
interface
IUserCheckStatusService
{
public
interface
IUserCheckStatusService
{
UserCheckStatus
getUserCheckStatus
(
String
useName
);
UserCheckStatus
getUserCheckStatus
(
ReginParams
reginParams
);
UserCheckStatus
updateUserCheckStatus
(
String
useName
,
String
status
);
UserCheckStatus
updateUserCheckStatus
(
String
useName
,
String
status
);
}
}
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/UserCheckStatusController.java
View file @
d3f6089d
...
@@ -46,8 +46,7 @@ public class UserCheckStatusController extends BaseController {
...
@@ -46,8 +46,7 @@ public class UserCheckStatusController extends BaseController {
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
null
;
return
null
;
}
}
String
useName
=
reginParams
.
getUserModel
().
getUserName
();
return
ResponseHelper
.
buildResponse
(
userCheckStatusService
.
getUserCheckStatus
(
reginParams
));
return
ResponseHelper
.
buildResponse
(
userCheckStatusService
.
getUserCheckStatus
(
useName
));
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/UserCheckStatusServiceImpl.java
View file @
d3f6089d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.UserCheckStatusDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.UserCheckStatusDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.UserCheckStatus
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.UserCheckStatus
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.UserCheckStatusMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.UserCheckStatusMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IUserCheckStatusService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IUserCheckStatusService
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
/**
/**
* 装备分类服务实现类
* 装备分类服务实现类
*
*
...
@@ -24,18 +30,34 @@ public class UserCheckStatusServiceImpl extends BaseService<UserCheckStatusDto,
...
@@ -24,18 +30,34 @@ public class UserCheckStatusServiceImpl extends BaseService<UserCheckStatusDto,
@Autowired
@Autowired
UserCheckStatusMapper
userCheckStatusMapper
;
UserCheckStatusMapper
userCheckStatusMapper
;
//使用单位sequence_nbr
private
final
Long
USEUNITID
=
1460532889249755137L
;
@Override
@Override
public
UserCheckStatus
getUserCheckStatus
(
String
useName
)
{
public
UserCheckStatus
getUserCheckStatus
(
ReginParams
reginParams
)
{
UserCheckStatus
userCheckStatus
=
userCheckStatusMapper
.
selectOne
(
new
QueryWrapper
<
UserCheckStatus
>().
eq
(
"use_name"
,
useName
));
UserCheckStatus
userCheckStatus
=
new
UserCheckStatus
();
if
(
ObjectUtils
.
isEmpty
(
userCheckStatus
))
{
userCheckStatus
.
setStatus
(
"1"
);
UserCheckStatus
checkStatus
=
new
UserCheckStatus
();
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
reginParams
.
getUserModel
().
getOrgRoles
();
checkStatus
.
setUseName
(
useName
);
if
(!
ObjectUtils
.
isEmpty
(
orgRoles
)){
checkStatus
.
setStatus
(
"0"
);
Set
<
Long
>
longs
=
orgRoles
.
keySet
();
int
result
=
userCheckStatusMapper
.
insert
(
checkStatus
);
for
(
Long
aLong
:
longs
)
{
if
(
result
==
1
)
{
for
(
RoleModel
roleModel
:
orgRoles
.
get
(
aLong
))
{
return
userCheckStatus
;
if
(
USEUNITID
.
equals
(
roleModel
.
getSequenceNbr
())){
}
else
{
String
useName
=
reginParams
.
getUserModel
().
getUserName
();
return
null
;
userCheckStatus
=
userCheckStatusMapper
.
selectOne
(
new
QueryWrapper
<
UserCheckStatus
>().
eq
(
"use_name"
,
useName
));
if
(
ObjectUtils
.
isEmpty
(
userCheckStatus
))
{
UserCheckStatus
checkStatus
=
new
UserCheckStatus
();
checkStatus
.
setUseName
(
useName
);
checkStatus
.
setStatus
(
"0"
);
int
result
=
userCheckStatusMapper
.
insert
(
checkStatus
);
if
(
result
==
1
)
{
return
userCheckStatus
;
}
else
{
return
null
;
}
}
}
}
}
}
}
}
return
userCheckStatus
;
return
userCheckStatus
;
...
...
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