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
f9f79002
Commit
f9f79002
authored
May 06, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
明细接口改造
parent
72b47c4b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
263 additions
and
3 deletions
+263
-3
PersonVo.java
.../yifu/cloud/plus/v1/yifu/common/ldap/entity/PersonVo.java
+6
-0
UserController.java
...u/cloud/plus/v1/yifu/admin/controller/UserController.java
+14
-0
SysUserService.java
...yifu/cloud/plus/v1/yifu/admin/service/SysUserService.java
+7
-0
SysUserServiceImpl.java
...d/plus/v1/yifu/admin/service/impl/SysUserServiceImpl.java
+214
-1
application.yml
yifu-upms/yifu-upms-biz/src/main/resources/application.yml
+4
-0
SysUserMapper.xml
...yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
+18
-2
No files found.
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/entity/PersonVo.java
View file @
f9f79002
...
@@ -85,6 +85,12 @@ public class PersonVo {
...
@@ -85,6 +85,12 @@ public class PersonVo {
@Attribute
@Attribute
protected
Date
updateTime
;
protected
Date
updateTime
;
/**
* 部门id
*/
@Attribute
protected
Long
deptId
;
/**
/**
* 状态
* 状态
*/
*/
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/controller/UserController.java
View file @
f9f79002
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
controller
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
...
@@ -45,6 +46,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
...
@@ -45,6 +46,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -493,4 +495,16 @@ public class UserController {
...
@@ -493,4 +495,16 @@ public class UserController {
UserInfo
info
=
userService
.
getUserInfo
(
user
);
UserInfo
info
=
userService
.
getUserInfo
(
user
);
return
info
;
return
info
;
}
}
/**
* 从ldap实时更新用户和部门
*
* @return R
*/
@SysLog
(
"从ldap实时更新用户和部门"
)
@PostMapping
(
"/updateUserAndDept"
)
public
R
updateUserAndDept
(
HttpServletRequest
request
,
@RequestBody
JSONObject
json
)
{
return
R
.
ok
(
userService
.
updateUserAndDept
(
request
,
json
));
}
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/service/SysUserService.java
View file @
f9f79002
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
service
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
...
@@ -29,6 +30,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserVO;
...
@@ -29,6 +30,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserVO;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.BindingResult
;
import
javax.servlet.http.HttpServletRequest
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -178,4 +180,9 @@ public interface SysUserService extends IService<SysUser> {
...
@@ -178,4 +180,9 @@ public interface SysUserService extends IService<SysUser> {
**/
**/
void
ldapLogin
(
String
username
,
String
password
,
SysUser
user
);
void
ldapLogin
(
String
username
,
String
password
,
SysUser
user
);
/**
* 从ldap实时更新用户和部门
* @return R
*/
R
updateUserAndDept
(
HttpServletRequest
request
,
JSONObject
json
);
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/service/impl/SysUserServiceImpl.java
View file @
f9f79002
This diff is collapsed.
Click to expand it.
yifu-upms/yifu-upms-biz/src/main/resources/application.yml
View file @
f9f79002
...
@@ -97,3 +97,7 @@ springdoc:
...
@@ -97,3 +97,7 @@ springdoc:
-
group
:
upms
-
group
:
upms
#按包路径匹配
#按包路径匹配
packagesToScan
:
com.yifu.cloud.plus.v1.yifu.admin.controller
packagesToScan
:
com.yifu.cloud.plus.v1.yifu.admin.controller
hrms
:
id
:
HRBS
secret
:
d8a3649587afe0fc2045741f84cd15221b8404f1ae5c3e9c8c301a4caba07d54
yifu-upms/yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
View file @
f9f79002
...
@@ -214,7 +214,7 @@
...
@@ -214,7 +214,7 @@
<insert
id=
"batchInsertUser"
parameterType=
"java.util.List"
>
<insert
id=
"batchInsertUser"
parameterType=
"java.util.List"
>
insert into sys_user
insert into sys_user
(user_id,username,password,phone,email,nickname,create_time)
(user_id,username,password,phone,email,nickname,create_time
,dept_id,dept_name
)
VALUES
VALUES
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
(
...
@@ -224,7 +224,9 @@
...
@@ -224,7 +224,9 @@
#{item.telephoneNumber},
#{item.telephoneNumber},
#{item.email},
#{item.email},
#{item.personName},
#{item.personName},
now()
now(),
#{item.deptId},
#{item.deptName}
)
)
</foreach>
</foreach>
</insert>
</insert>
...
@@ -265,6 +267,20 @@
...
@@ -265,6 +267,20 @@
when username=#{i.uid} then now()
when username=#{i.uid} then now()
</foreach>
</foreach>
</trim>
</trim>
<trim
prefix=
"dept_id =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
<if
test=
"i.deptId!=null"
>
when username=#{i.userId} then #{i.deptId}
</if>
</foreach>
</trim>
<trim
prefix=
"dept_name =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
<if
test=
"i.deptName!=null"
>
when username=#{i.userId} then #{i.deptName}
</if>
</foreach>
</trim>
</trim>
</trim>
where
where
<foreach
collection=
"list"
separator=
"or"
item=
"i"
index=
"index"
>
<foreach
collection=
"list"
separator=
"or"
item=
"i"
index=
"index"
>
...
...
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