Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
05b03632
Commit
05b03632
authored
Sep 05, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户信息新增 ldap 机构信息
parent
f52d19d1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
13 deletions
+42
-13
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+1
-0
YifuUser.java
.../com/yifu/cloud/plus/v1/yifu/common/core/vo/YifuUser.java
+11
-3
YifuUserDetailsService.java
.../yifu/common/security/service/YifuUserDetailsService.java
+5
-3
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+6
-6
SysUser.java
...com/yifu.cloud.plus.v1/yifu/admin/api/entity/SysUser.java
+6
-0
UserVO.java
...java/com/yifu.cloud.plus.v1/yifu/admin/api/vo/UserVO.java
+7
-0
SysUserMapper.xml
...yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
+6
-1
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
05b03632
...
@@ -476,4 +476,5 @@ public interface CommonConstants {
...
@@ -476,4 +476,5 @@ public interface CommonConstants {
public
static
final
String
XLSX
=
".xlsx"
;
public
static
final
String
XLSX
=
".xlsx"
;
public
static
final
String
ERROR_IMPORT
=
"执行异常"
;
}
}
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/vo/YifuUser.java
View file @
05b03632
...
@@ -70,9 +70,16 @@ public class YifuUser extends User {
...
@@ -70,9 +70,16 @@ public class YifuUser extends User {
@Getter
@Getter
private
final
String
userGroup
;
private
final
String
userGroup
;
public
YifuUser
(
String
id
,
Long
deptId
,
String
deptName
,
String
username
,
String
nickname
,
String
systemFlag
,
String
password
,
String
phone
,
boolean
enabled
,
/**
boolean
accountNonExpired
,
boolean
credentialsNonExpired
,
boolean
accountNonLocked
,
String
userGroup
,
* LDAP_DN
Collection
<?
extends
GrantedAuthority
>
authorities
)
{
*/
@Getter
private
String
ldapDn
;
public
YifuUser
(
String
id
,
Long
deptId
,
String
deptName
,
String
username
,
String
nickname
,
String
systemFlag
,
String
password
,
String
phone
,
boolean
enabled
,
boolean
accountNonExpired
,
boolean
credentialsNonExpired
,
String
ldapDn
,
boolean
accountNonLocked
,
String
userGroup
,
Collection
<?
extends
GrantedAuthority
>
authorities
)
{
super
(
username
,
password
,
enabled
,
accountNonExpired
,
credentialsNonExpired
,
accountNonLocked
,
authorities
);
super
(
username
,
password
,
enabled
,
accountNonExpired
,
credentialsNonExpired
,
accountNonLocked
,
authorities
);
this
.
id
=
id
;
this
.
id
=
id
;
this
.
deptId
=
deptId
;
this
.
deptId
=
deptId
;
...
@@ -81,6 +88,7 @@ public class YifuUser extends User {
...
@@ -81,6 +88,7 @@ public class YifuUser extends User {
this
.
nickname
=
nickname
;
this
.
nickname
=
nickname
;
this
.
systemFlag
=
systemFlag
;
this
.
systemFlag
=
systemFlag
;
this
.
userGroup
=
userGroup
;
this
.
userGroup
=
userGroup
;
this
.
ldapDn
=
ldapDn
;
}
}
}
}
yifu-common/yifu-common-security/src/main/java/com/yifu.cloud.plus.v1/yifu/common/security/service/YifuUserDetailsService.java
View file @
05b03632
...
@@ -69,9 +69,11 @@ public interface YifuUserDetailsService extends UserDetailsService, Ordered {
...
@@ -69,9 +69,11 @@ public interface YifuUserDetailsService extends UserDetailsService, Ordered {
SysUser
user
=
info
.
getSysUser
();
SysUser
user
=
info
.
getSysUser
();
// 构造security用户
// 构造security用户
return
new
YifuUser
(
user
.
getUserId
(),
user
.
getDeptId
(),
user
.
getDeptName
(),
user
.
getUsername
(),
user
.
getNickname
(),
user
.
getSystemFlag
(),
return
new
YifuUser
(
user
.
getUserId
(),
user
.
getDeptId
(),
user
.
getDeptName
(),
user
.
getUsername
(),
user
.
getNickname
()
SecurityConstants
.
BCRYPT
+
user
.
getPassword
(),
user
.
getPhone
(),
true
,
true
,
,
user
.
getSystemFlag
(),
SecurityConstants
.
BCRYPT
+
user
.
getPassword
(),
user
.
getPhone
(),
true
,
StrUtil
.
equals
(
user
.
getLockFlag
(),
CommonConstants
.
STATUS_NORMAL
),
user
.
getUserGroup
(),
authorities
);
true
,
true
,
true
,
StrUtil
.
equals
(
user
.
getLockFlag
(),
CommonConstants
.
STATUS_NORMAL
),
user
.
getLdapDn
(),
user
.
getUserGroup
(),
authorities
);
}
}
/**
/**
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
05b03632
...
@@ -86,9 +86,9 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -86,9 +86,9 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
ServletOutputStream
out
=
null
;
ServletOutputStream
out
=
null
;
try
{
try
{
out
=
response
.
getOutputStream
();
out
=
response
.
getOutputStream
();
response
.
setContentType
(
"multipart/form-data"
);
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setCharacterEncoding
(
CommonConstants
.
UTF8
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
IncomeExportVo
.
class
).
build
();
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
IncomeExportVo
.
class
).
build
();
int
index
=
0
;
int
index
=
0
;
...
@@ -97,7 +97,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -97,7 +97,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
// 获取实际记录
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
,
null
,
Common
.
getList
(
searchVo
.
getIds
()),
""
);
list
=
noPageDiy
(
searchVo
,
null
,
Common
.
getList
(
searchVo
.
getIds
()),
CommonConstants
.
EMPTY_STRING
);
if
(
Common
.
isNotNull
(
list
))
{
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
IncomeExportVo
>
util
=
new
ExcelUtil
<>(
IncomeExportVo
.
class
);
ExcelUtil
<
IncomeExportVo
>
util
=
new
ExcelUtil
<>(
IncomeExportVo
.
class
);
for
(
IncomeExportVo
vo
:
list
)
{
for
(
IncomeExportVo
vo
:
list
)
{
...
@@ -124,14 +124,14 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -124,14 +124,14 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
out
.
flush
();
out
.
flush
();
excelWriter
.
finish
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
log
.
error
(
CommonConstants
.
ERROR_IMPORT
,
e
);
}
finally
{
}
finally
{
try
{
try
{
if
(
null
!=
out
)
{
if
(
null
!=
out
)
{
out
.
close
();
out
.
close
();
}
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
log
.
error
(
CommonConstants
.
ERROR_IMPORT
,
e
);
}
}
}
}
}
}
...
...
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/entity/SysUser.java
View file @
05b03632
...
@@ -132,4 +132,10 @@ public class SysUser extends BaseEntity {
...
@@ -132,4 +132,10 @@ public class SysUser extends BaseEntity {
@TableLogic
@TableLogic
private
String
delFlag
;
private
String
delFlag
;
/**
* LDAP_DN
*/
@Schema
(
description
=
"LDAP_DN"
)
private
String
ldapDn
;
}
}
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/vo/UserVO.java
View file @
05b03632
...
@@ -18,6 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.admin.api.vo;
...
@@ -18,6 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.admin.api.vo;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysPost
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysPost
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRole
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRole
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
@@ -127,4 +128,10 @@ public class UserVO implements Serializable {
...
@@ -127,4 +128,10 @@ public class UserVO implements Serializable {
* 是否是系统内置
* 是否是系统内置
*/
*/
private
String
systemFlag
;
private
String
systemFlag
;
/**
* LDAP_DN
*/
@Schema
(
description
=
"LDAP_DN"
)
private
String
ldapDn
;
}
}
yifu-upms/yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
View file @
05b03632
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
<result
column=
"post"
property=
"post"
/>
<result
column=
"post"
property=
"post"
/>
<result
column=
"email"
property=
"email"
/>
<result
column=
"email"
property=
"email"
/>
<result
column=
"system_flag"
property=
"systemFlag"
/>
<result
column=
"system_flag"
property=
"systemFlag"
/>
<result
column=
"dept_dn"
property=
"ldapDn"
/>
<collection
property=
"roleList"
ofType=
"com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRole"
<collection
property=
"roleList"
ofType=
"com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRole"
select=
"com.yifu.cloud.plus.v1.yifu.admin.mapper.SysRoleMapper.listRolesByUserId"
column=
"user_id"
>
select=
"com.yifu.cloud.plus.v1.yifu.admin.mapper.SysRoleMapper.listRolesByUserId"
column=
"user_id"
>
</collection>
</collection>
...
@@ -60,6 +61,7 @@
...
@@ -60,6 +61,7 @@
<result
column=
"post"
property=
"post"
/>
<result
column=
"post"
property=
"post"
/>
<result
column=
"email"
property=
"email"
/>
<result
column=
"email"
property=
"email"
/>
<result
column=
"system_flag"
property=
"systemFlag"
/>
<result
column=
"system_flag"
property=
"systemFlag"
/>
<result
column=
"dept_dn"
property=
"ldapDn"
/>
<collection
property=
"roleList"
ofType=
"com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRole"
>
<collection
property=
"roleList"
ofType=
"com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRole"
>
<id
column=
"role_id"
property=
"roleId"
/>
<id
column=
"role_id"
property=
"roleId"
/>
<result
column=
"role_name"
property=
"roleName"
/>
<result
column=
"role_name"
property=
"roleName"
/>
...
@@ -88,6 +90,7 @@
...
@@ -88,6 +90,7 @@
sys_user.post,
sys_user.post,
sys_user.email,
sys_user.email,
sys_user.system_flag,
sys_user.system_flag,
sys_user.dept_dn,
r.role_id,
r.role_id,
r.role_name,
r.role_name,
r.role_code,
r.role_code,
...
@@ -112,6 +115,7 @@
...
@@ -112,6 +115,7 @@
sys_user.post,
sys_user.post,
sys_user.email,
sys_user.email,
sys_user.system_flag,
sys_user.system_flag,
sys_user.dept_dn,
r.role_id,
r.role_id,
r.role_name,
r.role_name,
r.role_code,
r.role_code,
...
@@ -192,7 +196,8 @@
...
@@ -192,7 +196,8 @@
u.user_group,
u.user_group,
u.email,
u.email,
u.system_flag,
u.system_flag,
d.name AS deptName
d.name AS deptName,
u.dept_dn
FROM sys_user u
FROM sys_user u
LEFT JOIN sys_dept d ON d.dept_id = u.dept_id
LEFT JOIN sys_dept d ON d.dept_id = u.dept_id
<where>
<where>
...
...
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