Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
base-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
base-platform
Commits
463299f6
Commit
463299f6
authored
Apr 18, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改构建api文档
parent
7d08bfd6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
9 deletions
+45
-9
base-manager/src/main/java/com/mortals/xhx/base/framework/security/AuthTokenService.java
...mortals/xhx/base/framework/security/AuthTokenService.java
+1
-1
base-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntityExt.java
...com/mortals/xhx/base/system/user/model/UserEntityExt.java
+8
-0
base-manager/src/main/java/com/mortals/xhx/base/system/user/service/UserService.java
...com/mortals/xhx/base/system/user/service/UserService.java
+13
-8
base-manager/src/main/java/com/mortals/xhx/base/system/user/service/impl/UserServiceImpl.java
...ls/xhx/base/system/user/service/impl/UserServiceImpl.java
+23
-0
No files found.
base-manager/src/main/java/com/mortals/xhx/base/framework/security/AuthTokenService.java
View file @
463299f6
...
...
@@ -96,7 +96,7 @@ public class AuthTokenService {
* @return 令牌
*/
public
String
createToken
(
UserEntity
user
)
{
String
token
=
IdUtil
.
fastUUID
();
String
token
=
IdUtil
.
fast
Simple
UUID
();
user
.
setToken
(
token
);
refreshToken
(
user
);
Map
<
String
,
Object
>
claims
=
new
HashMap
<>();
...
...
base-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntityExt.java
View file @
463299f6
package
com.mortals.xhx.base.system.user.model
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.model.model.ModelEntity
;
import
lombok.Data
;
import
java.util.List
;
/**
*
* Description:User
...
...
@@ -28,4 +31,9 @@ public class UserEntityExt extends BaseEntityLong {
* 过期时间
*/
private
Long
expireTime
;
private
List
<
ModelEntity
>
modleList
;
}
\ No newline at end of file
base-manager/src/main/java/com/mortals/xhx/base/system/user/service/UserService.java
View file @
463299f6
...
...
@@ -37,7 +37,7 @@ public interface UserService extends ICRUDService<UserEntity,Long> {
* @return
* @throws AppException
*/
public
UserEntity
doLogin
(
String
loginName
,
String
password
,
String
loginIp
)
throws
AppException
;
UserEntity
doLogin
(
String
loginName
,
String
password
,
String
loginIp
)
throws
AppException
;
/**
* 校验用户名与密码是否正确
...
...
@@ -47,7 +47,7 @@ public interface UserService extends ICRUDService<UserEntity,Long> {
* @return
* @throws AppException
*/
public
UserEntity
doCheckUser
(
String
loginName
,
String
password
)
throws
AppException
;
UserEntity
doCheckUser
(
String
loginName
,
String
password
)
throws
AppException
;
/**
* 检查用户是否存在
...
...
@@ -56,7 +56,7 @@ public interface UserService extends ICRUDService<UserEntity,Long> {
* @param userId 密码
* @return
*/
public
boolean
existUser
(
String
loginName
,
Long
userId
)
throws
AppException
;
boolean
existUser
(
String
loginName
,
Long
userId
)
throws
AppException
;
/**
* 通过登录用户获取菜单功能权限
...
...
@@ -64,7 +64,7 @@ public interface UserService extends ICRUDService<UserEntity,Long> {
* @param user
* @return
*/
public
List
<
MenuEntity
>
findOutlookBarList
(
IUser
user
);
List
<
MenuEntity
>
findOutlookBarList
(
IUser
user
);
/**
* 查询用户所有有权限的菜单ID
...
...
@@ -72,7 +72,7 @@ public interface UserService extends ICRUDService<UserEntity,Long> {
* @param userEntity
* @return
*/
public
Set
<
Long
>
findAllAuthIds
(
UserEntity
userEntity
)
throws
AppException
;
Set
<
Long
>
findAllAuthIds
(
UserEntity
userEntity
)
throws
AppException
;
/**
* 查询用户记录
...
...
@@ -84,7 +84,7 @@ public interface UserService extends ICRUDService<UserEntity,Long> {
* @return
* @throws AppException
*/
public
Result
<
UserEntity
>
find
(
Long
platformId
,
UserEntity
params
,
int
currPage
,
int
prePageResult
)
throws
AppException
;
Result
<
UserEntity
>
find
(
Long
platformId
,
UserEntity
params
,
int
currPage
,
int
prePageResult
)
throws
AppException
;
/**
* 为客户创建用户
...
...
@@ -99,7 +99,7 @@ public interface UserService extends ICRUDService<UserEntity,Long> {
* @return
* @throws AppException
*/
public
UserEntity
createUser
(
IUser
currUser
,
Long
customerId
,
String
customerName
,
String
loginName
,
String
password
,
UserEntity
createUser
(
IUser
currUser
,
Long
customerId
,
String
customerName
,
String
loginName
,
String
password
,
String
userName
,
String
mobile
)
throws
AppException
;
/**
...
...
@@ -111,5 +111,10 @@ public interface UserService extends ICRUDService<UserEntity,Long> {
* @return
* @throws AppException
*/
public
boolean
updateUserPwd
(
String
loginName
,
String
oldPwd
,
String
newPwd
)
throws
AppException
;
boolean
updateUserPwd
(
String
loginName
,
String
oldPwd
,
String
newPwd
)
throws
AppException
;
}
\ No newline at end of file
base-manager/src/main/java/com/mortals/xhx/base/system/user/service/impl/UserServiceImpl.java
View file @
463299f6
...
...
@@ -27,17 +27,25 @@ import com.mortals.xhx.base.system.user.model.UserEntity;
import
com.mortals.xhx.base.system.user.model.UserQuery
;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
com.mortals.xhx.module.model.model.ModelEntity
;
import
com.mortals.xhx.module.model.model.ModelQuery
;
import
com.mortals.xhx.module.model.service.ModelService
;
import
com.mortals.xhx.module.workman.model.WorkmanEntity
;
import
com.mortals.xhx.module.workman.model.WorkmanQuery
;
import
com.mortals.xhx.module.workman.service.WorkmanService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* <p>Title: 用户信息</p>
* <p>Description: UserServiceImpl service接口 </p>
* <p>Copyright: Copyright ® </p>
* <p>Company: </p>
*
* @author
* @version 1.0.0
*/
...
...
@@ -49,6 +57,11 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
private
MenuService
menuService
;
@Autowired
private
ResourceService
resourceService
;
@Autowired
private
WorkmanService
workmanServicel
;
@Autowired
private
ModelService
modelService
;
private
void
doHandlerUser
(
UserEntity
entity
)
throws
AppException
{
if
(
StringUtils
.
isNotEmpty
(
entity
.
getLoginPwd
()))
{
...
...
@@ -119,6 +132,16 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
}
catch
(
Exception
e
)
{
throw
new
AppException
(
"密码验认出错!"
,
e
);
}
//查询是否关联了工作人员,并且关联的模块
WorkmanEntity
workmanEntity
=
workmanServicel
.
selectOne
(
new
WorkmanQuery
().
systemUserId
(
sysUser
.
getId
()));
if
(!
ObjectUtils
.
isEmpty
(
workmanEntity
))
{
List
<
Long
>
modleIdList
=
Arrays
.
asList
(
workmanEntity
.
getMobile
().
split
(
","
)).
stream
().
map
(
Long:
:
parseLong
).
collect
(
Collectors
.
toList
());
ModelQuery
modelQuery
=
new
ModelQuery
();
modelQuery
.
setIdList
(
modleIdList
);
List
<
ModelEntity
>
modelEntities
=
modelService
.
find
(
modelQuery
);
sysUser
.
setModleList
(
modelEntities
);
}
return
sysUser
;
}
...
...
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