Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
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-auth
Commits
4fbe66f9
Commit
4fbe66f9
authored
Nov 07, 2019
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加日志
parent
99e012ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
AuditedGroupController.java
...a/com/gic/auth/web/controller/AuditedGroupController.java
+8
-0
AuditorController.java
...n/java/com/gic/auth/web/controller/AuditorController.java
+8
-0
ResourceController.java
.../java/com/gic/auth/web/controller/ResourceController.java
+6
-0
No files found.
gic-platform-auth-web/src/main/java/com/gic/auth/web/controller/AuditedGroupController.java
View file @
4fbe66f9
...
...
@@ -8,6 +8,7 @@ import com.gic.auth.service.AuditedGroupApiService;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.GlobalInfo
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.download.utils.log.LogUtils
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -39,12 +40,19 @@ public class AuditedGroupController {
List
<
Integer
>
ids
=
list
.
stream
().
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
auditedGroupDTO
.
setUserIdList
(
ids
);
ServiceResponse
<
Integer
>
response
=
auditedGroupApiService
.
saveOrUpdateAuditedGroup
(
auditedGroupDTO
);
if
(
response
.
isSuccess
())
{
LogUtils
.
createLog
((
auditedGroupQO
.
getAuditedGroupId
()
==
null
?
"新增"
:
"修改"
)
+
"受审组"
,
auditedGroupQO
.
getAuditedGroupName
());
}
return
ResultControllerUtils
.
commonResult
(
response
);
}
@RequestMapping
(
"/del-audited-group"
)
public
RestResponse
delAuditedGroup
(
@Validated
(
AuditedGroupQO
.
DelValid
.
class
)
AuditedGroupQO
auditedGroupQO
)
{
ServiceResponse
<
AuditedGroupDTO
>
auditedGroup
=
auditedGroupApiService
.
getAuditedGroup
(
auditedGroupQO
.
getAuditedGroupId
());
ServiceResponse
<
Integer
>
response
=
auditedGroupApiService
.
delAuditedGroup
(
auditedGroupQO
.
getAuditedGroupId
());
if
(
response
.
isSuccess
())
{
LogUtils
.
createLog
(
"删除受审组"
,
auditedGroup
.
getResult
().
getAuditedGroupName
());
}
return
ResultControllerUtils
.
commonResult
(
response
);
}
...
...
gic-platform-auth-web/src/main/java/com/gic/auth/web/controller/AuditorController.java
View file @
4fbe66f9
...
...
@@ -9,6 +9,7 @@ import com.gic.auth.web.qo.AuditorQO;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.GlobalInfo
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.download.utils.log.LogUtils
;
import
com.gic.enterprise.dto.ProjectDTO
;
import
com.gic.enterprise.service.ProjectApiService
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
...
...
@@ -49,12 +50,19 @@ public class AuditorController {
List
<
Integer
>
auditedGroupIdList
=
Stream
.
of
(
auditorQO
.
getAuditedGroupIds
().
split
(
GlobalInfo
.
FLAG_COMMA
)).
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
auditorDTO
.
setAuditedGroupIdList
(
auditedGroupIdList
);
ServiceResponse
<
String
>
response
=
auditorApiService
.
saveOrUpdateAuditor
(
auditorDTO
);
if
(
response
.
isSuccess
())
{
LogUtils
.
createLog
((
auditorQO
.
getAuditorId
()
==
null
?
"新增"
:
"修改"
)
+
"审核员"
,
auditorQO
.
getAuditorName
());
}
return
ResultControllerUtils
.
commonResult
(
response
);
}
@RequestMapping
(
"/del-auditor"
)
public
RestResponse
delAuditor
(
Integer
auditorId
)
{
ServiceResponse
<
AuditorDTO
>
auditor
=
auditorApiService
.
getAuditor
(
auditorId
);
ServiceResponse
<
Void
>
response
=
auditorApiService
.
delAuditor
(
auditorId
);
if
(
response
.
isSuccess
())
{
LogUtils
.
createLog
(
"删除审核员"
,
auditor
.
getResult
().
getAuditorName
());
}
return
ResultControllerUtils
.
commonResult
(
response
);
}
...
...
gic-platform-auth-web/src/main/java/com/gic/auth/web/controller/ResourceController.java
View file @
4fbe66f9
...
...
@@ -15,6 +15,7 @@ import com.gic.auth.web.qo.StoreResouceQO;
import
com.gic.auth.web.vo.*
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.download.utils.log.LogUtils
;
import
com.gic.enterprise.response.EnterpriseRestResponse
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
com.gic.enterprise.utils.UserDetailUtils
;
...
...
@@ -136,6 +137,7 @@ public class ResourceController {
ServiceResponse
<
Integer
>
response
=
resourceApiService
.
saveOrUpdateResource
(
resourceDTO
);
if
(
response
.
isSuccess
()){
LogUtils
.
createLog
((
resourceQO
.
getResourceId
()
==
null
?
"新增"
:
"修改"
)
+
"资源组"
,
resourceQO
.
getResourceName
());
return
RestResponse
.
success
(
response
.
getResult
());
}
return
EnterpriseRestResponse
.
failure
(
response
);
...
...
@@ -143,7 +145,11 @@ public class ResourceController {
@RequestMapping
(
"/del-resource"
)
public
RestResponse
delResource
(
Integer
resourceId
)
{
ServiceResponse
<
ResourceDTO
>
resource
=
resourceApiService
.
getResource
(
resourceId
);
ServiceResponse
<
Integer
>
serviceResponse
=
resourceApiService
.
delResource
(
resourceId
);
if
(
resource
.
isSuccess
())
{
LogUtils
.
createLog
(
"删除资源组"
,
resource
.
getResult
().
getResourceName
());
}
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
...
...
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