Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
civil-bigdata
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
civil
civil-bigdata
Commits
ca9d4983
Commit
ca9d4983
authored
Nov 29, 2021
by
韦华德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
be96a3e0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
8 deletions
+20
-8
sys-server/src/main/java/com/zq/system/modules/system/entity/BindUserInfo.java
+1
-1
sys-server/src/main/java/com/zq/system/modules/system/rest/SystemController.java
+2
-2
sys-server/src/main/java/com/zq/system/modules/system/service/SingleService.java
+7
-2
sys-server/src/main/java/com/zq/system/modules/system/service/SystemService.java
+3
-1
sys-server/src/main/java/com/zq/system/modules/system/service/impl/SystemServiceImpl.java
+7
-2
No files found.
sys-server/src/main/java/com/zq/system/modules/system/entity/BindUserInfo.java
View file @
ca9d4983
...
...
@@ -21,7 +21,7 @@ import java.util.Date;
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName
(
value
=
"t_b
l
ind_user_info"
)
@TableName
(
value
=
"t_bind_user_info"
)
public
class
BindUserInfo
{
/**
...
...
sys-server/src/main/java/com/zq/system/modules/system/rest/SystemController.java
View file @
ca9d4983
...
...
@@ -21,8 +21,8 @@ public class SystemController {
@ApiOperation
(
"获取系统列表"
)
@PostMapping
(
value
=
"/getSysInfoList"
)
public
ResultVo
getSysInfoList
(
@RequestBody
SysInfoFindVo
vo
)
{
return
ResultVo
.
success
(
systemService
.
getSysInfoList
(
vo
));
public
ResultVo
getSysInfoList
()
{
return
ResultVo
.
success
(
systemService
.
getSysInfoList
());
}
}
sys-server/src/main/java/com/zq/system/modules/system/service/SingleService.java
View file @
ca9d4983
...
...
@@ -103,6 +103,11 @@ public class SingleService {
}
public
void
bindSystem
(
SingleLoginVo
vo
)
{
OnlineUserDto
adminContext
=
ContextUtils
.
getAdminContext
();
List
<
BindUserInfo
>
bindUserInfos
=
blindUserInfoDao
.
selectList
(
Wrappers
.
lambdaQuery
(
BindUserInfo
.
builder
().
userId
(
adminContext
.
getUserId
())
.
sysId
(
vo
.
getSystemId
()).
build
()));
AssertUtils
.
isTrue
(
bindUserInfos
.
size
()==
0
,
"用户已绑定该系统"
);
SysInfo
sysInfo
=
sysInfoDao
.
selectById
(
vo
.
getSystemId
());
AssertUtils
.
notNull
(
sysInfo
,
"系统不存在"
);
...
...
@@ -142,10 +147,10 @@ public class SingleService {
String
serviceUrl
=
request
.
getParameter
(
"service"
);
AssertUtils
.
hasText
(
serviceUrl
,
"跳转地址为空"
);
//
String passwd = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, vo.getPasswd());
String
passwd
=
RsaUtils
.
decryptByPrivateKey
(
RsaProperties
.
privateKey
,
vo
.
getPasswd
());
UsernamePasswordAuthenticationToken
authenticationToken
=
new
UsernamePasswordAuthenticationToken
(
vo
.
getUsername
(),
vo
.
getPasswd
()
);
new
UsernamePasswordAuthenticationToken
(
vo
.
getUsername
(),
passwd
);
Authentication
authentication
=
authenticationManagerBuilder
.
getObject
().
authenticate
(
authenticationToken
);
SecurityContextHolder
.
getContext
().
setAuthentication
(
authentication
);
// 生成令牌
...
...
sys-server/src/main/java/com/zq/system/modules/system/service/SystemService.java
View file @
ca9d4983
...
...
@@ -4,8 +4,10 @@ import com.zq.common.vo.PageVo;
import
com.zq.system.modules.system.domain.vo.SysInfoFindVo
;
import
com.zq.system.modules.system.entity.SysInfo
;
import
java.util.List
;
public
interface
SystemService
{
PageVo
<
SysInfo
>
getSysInfoList
(
SysInfoFindVo
vo
);
List
<
SysInfo
>
getSysInfoList
(
);
}
sys-server/src/main/java/com/zq/system/modules/system/service/impl/SystemServiceImpl.java
View file @
ca9d4983
package
com
.
zq
.
system
.
modules
.
system
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.zq.common.utils.PagingUtils
;
import
com.zq.common.vo.PageVo
;
import
com.zq.system.modules.system.dao.SysInfoDao
;
...
...
@@ -9,6 +11,8 @@ import com.zq.system.modules.system.service.SystemService;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
@RequiredArgsConstructor
public
class
SystemServiceImpl
implements
SystemService
{
...
...
@@ -16,7 +20,8 @@ public class SystemServiceImpl implements SystemService {
private
final
SysInfoDao
sysInfoDao
;
@Override
public
PageVo
<
SysInfo
>
getSysInfoList
(
SysInfoFindVo
vo
)
{
return
PagingUtils
.
paging
(
vo
,
sysInfoDao
,
SysInfo
.
class
);
public
List
<
SysInfo
>
getSysInfoList
()
{
return
sysInfoDao
.
selectList
(
Wrappers
.
lambdaQuery
());
}
}
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