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
d92e5b84
Commit
d92e5b84
authored
May 21, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
失败原因配置
parent
86ed9134
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
8 deletions
+15
-8
R.java
.../java/com/yifu/cloud/plus/v1/yifu/common/core/util/R.java
+7
-0
UserController.java
...u/cloud/plus/v1/yifu/admin/controller/UserController.java
+2
-2
SysUserService.java
...yifu/cloud/plus/v1/yifu/admin/service/SysUserService.java
+1
-1
SysUserServiceImpl.java
...d/plus/v1/yifu/admin/service/impl/SysUserServiceImpl.java
+5
-5
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/R.java
View file @
d92e5b84
...
@@ -60,6 +60,13 @@ public class R<T> implements Serializable {
...
@@ -60,6 +60,13 @@ public class R<T> implements Serializable {
this
.
msg
=
e
.
getMessage
();
this
.
msg
=
e
.
getMessage
();
this
.
code
=
CommonConstants
.
FAIL
;
this
.
code
=
CommonConstants
.
FAIL
;
}
}
public
R
(
String
msg
,
int
code
)
{
super
();
this
.
msg
=
msg
;
this
.
code
=
code
;
}
public
static
<
T
>
R
<
T
>
ok
()
{
public
static
<
T
>
R
<
T
>
ok
()
{
return
restResult
(
null
,
CommonConstants
.
SUCCESS
,
null
);
return
restResult
(
null
,
CommonConstants
.
SUCCESS
,
null
);
}
}
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/controller/UserController.java
View file @
d92e5b84
...
@@ -504,7 +504,7 @@ public class UserController {
...
@@ -504,7 +504,7 @@ public class UserController {
*/
*/
@SysLog
(
"从ldap实时更新用户和部门"
)
@SysLog
(
"从ldap实时更新用户和部门"
)
@PostMapping
(
"/updateUserAndDept"
)
@PostMapping
(
"/updateUserAndDept"
)
public
R
updateUserAndDept
(
HttpServletRequest
request
,
@RequestBody
JSONObject
json
)
{
public
R
<
String
>
updateUserAndDept
(
HttpServletRequest
request
,
@RequestBody
JSONObject
json
)
{
return
R
.
ok
(
userService
.
updateUserAndDept
(
request
,
json
)
);
return
userService
.
updateUserAndDept
(
request
,
json
);
}
}
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/service/SysUserService.java
View file @
d92e5b84
...
@@ -184,5 +184,5 @@ public interface SysUserService extends IService<SysUser> {
...
@@ -184,5 +184,5 @@ public interface SysUserService extends IService<SysUser> {
* 从ldap实时更新用户和部门
* 从ldap实时更新用户和部门
* @return R
* @return R
*/
*/
R
updateUserAndDept
(
HttpServletRequest
request
,
JSONObject
json
);
R
<
String
>
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 @
d92e5b84
...
@@ -739,18 +739,18 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
...
@@ -739,18 +739,18 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
* @return R
* @return R
*/
*/
@Override
@Override
public
R
updateUserAndDept
(
HttpServletRequest
request
,
JSONObject
json
)
{
public
R
<
String
>
updateUserAndDept
(
HttpServletRequest
request
,
JSONObject
json
)
{
//权限验证
//权限验证
String
appId
=
request
.
getHeader
(
"HRBS-APP-ID"
);
String
appId
=
request
.
getHeader
(
"HRBS-APP-ID"
);
String
appSecret
=
request
.
getHeader
(
"HRBS-APP-SECRET"
);
String
appSecret
=
request
.
getHeader
(
"HRBS-APP-SECRET"
);
if
(
Common
.
isEmpty
(
appId
)
||
Common
.
isEmpty
(
appSecret
)){
if
(
Common
.
isEmpty
(
appId
)
||
Common
.
isEmpty
(
appSecret
)){
return
R
.
failed
(
"操作失败,权限标识错误!"
);
return
new
R
<>(
"操作失败,权限标识错误!"
,
500
);
}
}
if
(!
hcmId
.
equals
(
appId
)
||
!
hcmSecret
.
equals
(
appSecret
)
){
if
(!
hcmId
.
equals
(
appId
)
||
!
hcmSecret
.
equals
(
appSecret
)
){
return
R
.
failed
(
"操作失败,无权限!"
);
return
new
R
<>(
"操作失败,无权限!"
,
500
);
}
}
if
(
Common
.
isEmpty
(
json
))
{
if
(
Common
.
isEmpty
(
json
))
{
return
R
.
failed
(
"传参不能为空"
);
return
new
R
<>(
"传参不能为空"
,
500
);
}
}
boolean
isAll
=
(
boolean
)
json
.
get
(
"isAll"
);
boolean
isAll
=
(
boolean
)
json
.
get
(
"isAll"
);
String
dataType
=
json
.
get
(
"dataType"
).
toString
();
String
dataType
=
json
.
get
(
"dataType"
).
toString
();
...
@@ -767,7 +767,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
...
@@ -767,7 +767,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
//更新或者新增部门信息
//更新或者新增部门信息
updateOrSaveDept
(
updateParamsArr
);
updateOrSaveDept
(
updateParamsArr
);
}
}
return
R
.
ok
(
);
return
new
R
<>(
"同步成功!"
,
200
);
}
}
/**
/**
...
...
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