Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-enterprise
Commits
b881c6fe
Commit
b881c6fe
authored
Nov 18, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加提示
parent
3aa8c0f8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
9 deletions
+20
-9
AuditLogController.java
...com/gic/enterprise/web/controller/AuditLogController.java
+20
-9
No files found.
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/AuditLogController.java
View file @
b881c6fe
...
...
@@ -14,6 +14,7 @@ import com.gic.enterprise.qo.AuditLogQO;
import
com.gic.enterprise.service.AuditLogApiService
;
import
com.gic.enterprise.service.ProjectItemApiService
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
com.gic.enterprise.utils.UserDetail
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -44,20 +45,30 @@ public class AuditLogController {
auditLogDTO
.
setAuditLogId
(
auditLogQO
.
getAuditLogId
());
auditLogDTO
.
setAuditResult
(
auditLogQO
.
getAuditResult
());
auditLogDTO
.
setAuditReason
(
auditLogQO
.
getAuditReason
());
ServiceResponse
<
AuditorDTO
>
auditorServiceResponse
;
UserDetail
userDetail
=
UserDetailUtils
.
getUserDetail
();
AuditorDTO
auditorDTO
;
if
(
StringUtils
.
isNotBlank
(
auditLogQO
.
getOpenid
()))
{
auditorServiceResponse
=
auditorApiService
.
getAuditorByOpenid
(
auditLogQO
.
getOpenid
());
}
else
if
(
UserDetailUtils
.
getUserDetail
()
!=
null
)
{
auditorServiceResponse
=
auditorApiService
.
getAuditorByUserId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
UserDetailUtils
.
getUserDetail
().
getUserId
());
}
else
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"参数错误"
);
ServiceResponse
<
AuditorDTO
>
auditorServiceResponse
=
auditorApiService
.
getAuditorByOpenid
(
auditLogQO
.
getOpenid
());
if
(!
auditorServiceResponse
.
isSuccess
())
{
return
ResultControllerUtils
.
commonResult
(
auditorServiceResponse
);
}
auditorDTO
=
auditorServiceResponse
.
getResult
();
}
else
if
(
userDetail
!=
null
)
{
if
(
userDetail
.
getUserInfo
().
getSuperAdmin
()
==
0
)
{
ServiceResponse
<
AuditorDTO
>
auditorServiceResponse
=
auditorApiService
.
getAuditorByUserId
(
userDetail
.
getEnterpriseId
(),
userDetail
.
getUserId
());
if
(!
auditorServiceResponse
.
isSuccess
())
{
return
ResultControllerUtils
.
commonResult
(
auditorServiceResponse
);
}
auditLogDTO
.
setAuditorId
(
auditorServiceResponse
.
getResult
().
getAuditorId
());
auditLogDTO
.
setAuditorName
(
auditorServiceResponse
.
getResult
().
getAuditorName
());
auditLogDTO
.
setAuditorPhone
(
auditorServiceResponse
.
getResult
().
getPhone
());
auditorDTO
=
auditorServiceResponse
.
getResult
();
}
else
{
auditorDTO
=
new
AuditorDTO
();
auditorDTO
.
setAuditorId
(
null
);
auditLogDTO
.
setAuditorName
(
userDetail
.
getUserInfo
().
getUserName
());
auditLogDTO
.
setAuditorPhone
(
userDetail
.
getUserInfo
().
getPhoneNumber
());
}
}
else
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"参数错误"
);
}
ServiceResponse
<
AuditLogDTO
>
serviceResponse
=
auditLogApiService
.
audit
(
auditLogDTO
);
if
(
serviceResponse
.
isSuccess
())
{
createLog
(
auditLogDTO
);
...
...
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