Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-data-cloud
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-data-cloud
Commits
f0edbc0a
Commit
f0edbc0a
authored
Jul 16, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发布更新加上原因
parent
defd7618
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
8 deletions
+44
-8
DataExplainApiService.java
...ain/java/com/gic/cloud/service/DataExplainApiService.java
+5
-1
IndexApiService.java
.../src/main/java/com/gic/cloud/service/IndexApiService.java
+5
-1
DataExplainController.java
...cloud/operation/web/controller/DataExplainController.java
+12
-2
IndexController.java
...m/gic/cloud/operation/web/controller/IndexController.java
+9
-2
DataExplainApiServiceImpl.java
...c/cloud/service/outer/impl/DataExplainApiServiceImpl.java
+7
-1
IndexApiServiceImpl.java
...com/gic/cloud/service/outer/impl/IndexApiServiceImpl.java
+6
-1
No files found.
gic-data-cloud-api/src/main/java/com/gic/cloud/service/DataExplainApiService.java
View file @
f0edbc0a
...
@@ -68,10 +68,14 @@ public interface DataExplainApiService {
...
@@ -68,10 +68,14 @@ public interface DataExplainApiService {
* @Description:
* @Description:
* @author zhiwj
* @author zhiwj
* @param dataExplainIdList
* @param dataExplainIdList
* @param updateType
* @param reason
* @param optUserId
* @param optUserName
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
* @throws
*/
*/
ServiceResponse
<
Void
>
publish
(
List
<
Integer
>
dataExplainIdList
);
ServiceResponse
<
Void
>
publish
(
List
<
Integer
>
dataExplainIdList
,
Integer
updateType
,
String
reason
,
Integer
optUserId
,
String
optUserName
);
/**
/**
* @Title: listByModule
* @Title: listByModule
...
...
gic-data-cloud-api/src/main/java/com/gic/cloud/service/IndexApiService.java
View file @
f0edbc0a
...
@@ -69,10 +69,14 @@ public interface IndexApiService {
...
@@ -69,10 +69,14 @@ public interface IndexApiService {
* @Description:
* @Description:
* @author zhiwj
* @author zhiwj
* @param indexIdList
* @param indexIdList
* @param updateType
* @param reason
* @param optUserId
* @param optUserName
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
* @throws
*/
*/
ServiceResponse
<
Void
>
publish
(
List
<
Integer
>
indexIdList
);
ServiceResponse
<
Void
>
publish
(
List
<
Integer
>
indexIdList
,
Integer
updateType
,
String
reason
,
Integer
optUserId
,
String
optUserName
);
/**
/**
* @Title: listByModule
* @Title: listByModule
...
...
gic-data-cloud-operation-web/src/main/java/com/gic/cloud/operation/web/controller/DataExplainController.java
View file @
f0edbc0a
...
@@ -2,6 +2,7 @@ package com.gic.cloud.operation.web.controller;
...
@@ -2,6 +2,7 @@ package com.gic.cloud.operation.web.controller;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.authcenter.security.core.util.UserUtils
;
import
com.gic.cloud.dto.DataExplainDTO
;
import
com.gic.cloud.dto.DataExplainDTO
;
import
com.gic.cloud.dto.IndexLogDTO
;
import
com.gic.cloud.dto.IndexLogDTO
;
import
com.gic.cloud.qo.DataExplainQO
;
import
com.gic.cloud.qo.DataExplainQO
;
...
@@ -37,12 +38,20 @@ public class DataExplainController {
...
@@ -37,12 +38,20 @@ public class DataExplainController {
if
(
StringUtils
.
isBlank
(
dataExplainDTO
.
getDataName
())
||
StringUtils
.
isBlank
(
dataExplainDTO
.
getIndexRemark
()))
{
if
(
StringUtils
.
isBlank
(
dataExplainDTO
.
getDataName
())
||
StringUtils
.
isBlank
(
dataExplainDTO
.
getIndexRemark
()))
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
ErrorCode
.
PARAMETER_ERROR
.
getMsg
());
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
ErrorCode
.
PARAMETER_ERROR
.
getMsg
());
}
}
Integer
id
=
UserUtils
.
getUser
().
getId
();
String
realName
=
UserUtils
.
getUser
().
getRealName
();
dataExplainDTO
.
setOptUserId
(
id
);
dataExplainDTO
.
setOptUserName
(
realName
);
ServiceResponse
<
Void
>
serviceResponse
=
dataExplainApiService
.
saveDataExplain
(
dataExplainDTO
);
ServiceResponse
<
Void
>
serviceResponse
=
dataExplainApiService
.
saveDataExplain
(
dataExplainDTO
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
}
@RequestMapping
(
"/update-data-explain"
)
@RequestMapping
(
"/update-data-explain"
)
public
RestResponse
updateDataExplain
(
DataExplainDTO
dataExplainDTO
,
Integer
updateType
,
String
reason
)
{
public
RestResponse
updateDataExplain
(
DataExplainDTO
dataExplainDTO
,
Integer
updateType
,
String
reason
)
{
Integer
id
=
UserUtils
.
getUser
().
getId
();
String
realName
=
UserUtils
.
getUser
().
getRealName
();
dataExplainDTO
.
setOptUserId
(
id
);
dataExplainDTO
.
setOptUserName
(
realName
);
ServiceResponse
<
Void
>
serviceResponse
=
dataExplainApiService
.
updateDataExplain
(
dataExplainDTO
,
updateType
,
reason
);
ServiceResponse
<
Void
>
serviceResponse
=
dataExplainApiService
.
updateDataExplain
(
dataExplainDTO
,
updateType
,
reason
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
}
...
@@ -72,11 +81,12 @@ public class DataExplainController {
...
@@ -72,11 +81,12 @@ public class DataExplainController {
}
}
@RequestMapping
(
"/publish-data-explain"
)
@RequestMapping
(
"/publish-data-explain"
)
public
RestResponse
publishIndex
(
String
dataExplainIds
)
{
public
RestResponse
publishIndex
(
String
dataExplainIds
,
Integer
updateType
,
String
reason
)
{
if
(
StringUtils
.
isBlank
(
dataExplainIds
))
{
if
(
StringUtils
.
isBlank
(
dataExplainIds
))
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
ErrorCode
.
PARAMETER_ERROR
.
getMsg
());
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
ErrorCode
.
PARAMETER_ERROR
.
getMsg
());
}
}
ServiceResponse
<
Void
>
serviceResponse
=
dataExplainApiService
.
publish
(
Stream
.
of
(
dataExplainIds
.
split
(
","
)).
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
()));
List
<
Integer
>
dataExplainIdList
=
Stream
.
of
(
dataExplainIds
.
split
(
","
)).
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
ServiceResponse
<
Void
>
serviceResponse
=
dataExplainApiService
.
publish
(
dataExplainIdList
,
updateType
,
reason
,
UserUtils
.
getUser
().
getId
(),
UserUtils
.
getUser
().
getRealName
());
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
}
...
...
gic-data-cloud-operation-web/src/main/java/com/gic/cloud/operation/web/controller/IndexController.java
View file @
f0edbc0a
...
@@ -63,6 +63,10 @@ public class IndexController {
...
@@ -63,6 +63,10 @@ public class IndexController {
if
(
indexDTO
.
getIndexId
()
==
null
||
updateType
==
null
)
{
if
(
indexDTO
.
getIndexId
()
==
null
||
updateType
==
null
)
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
ErrorCode
.
PARAMETER_ERROR
.
getMsg
());
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
ErrorCode
.
PARAMETER_ERROR
.
getMsg
());
}
}
Integer
id
=
UserUtils
.
getUser
().
getId
();
String
realName
=
UserUtils
.
getUser
().
getRealName
();
indexDTO
.
setOptUserId
(
id
);
indexDTO
.
setOptUserName
(
realName
);
ServiceResponse
<
Void
>
serviceResponse
=
indexApiService
.
updateIndex
(
indexDTO
,
updateType
,
reason
);
ServiceResponse
<
Void
>
serviceResponse
=
indexApiService
.
updateIndex
(
indexDTO
,
updateType
,
reason
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
}
...
@@ -92,11 +96,14 @@ public class IndexController {
...
@@ -92,11 +96,14 @@ public class IndexController {
}
}
@RequestMapping
(
"/publish-index"
)
@RequestMapping
(
"/publish-index"
)
public
RestResponse
publishIndex
(
String
indexIds
)
{
public
RestResponse
publishIndex
(
String
indexIds
,
Integer
updateType
,
String
reason
)
{
if
(
StringUtils
.
isBlank
(
indexIds
))
{
if
(
StringUtils
.
isBlank
(
indexIds
))
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
ErrorCode
.
PARAMETER_ERROR
.
getMsg
());
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
ErrorCode
.
PARAMETER_ERROR
.
getMsg
());
}
}
ServiceResponse
<
Void
>
serviceResponse
=
indexApiService
.
publish
(
Stream
.
of
(
indexIds
.
split
(
","
)).
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
()));
Integer
id
=
UserUtils
.
getUser
().
getId
();
String
realName
=
UserUtils
.
getUser
().
getRealName
();
List
<
Integer
>
indexIdList
=
Stream
.
of
(
indexIds
.
split
(
","
)).
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
ServiceResponse
<
Void
>
serviceResponse
=
indexApiService
.
publish
(
indexIdList
,
updateType
,
reason
,
id
,
realName
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
}
...
...
gic-data-cloud-service/src/main/java/com/gic/cloud/service/outer/impl/DataExplainApiServiceImpl.java
View file @
f0edbc0a
...
@@ -98,10 +98,16 @@ public class DataExplainApiServiceImpl implements DataExplainApiService {
...
@@ -98,10 +98,16 @@ public class DataExplainApiServiceImpl implements DataExplainApiService {
}
}
@Override
@Override
public
ServiceResponse
<
Void
>
publish
(
List
<
Integer
>
dataExplainIdList
)
{
public
ServiceResponse
<
Void
>
publish
(
List
<
Integer
>
dataExplainIdList
,
Integer
updateType
,
String
reason
,
Integer
optUserId
,
String
optUserName
)
{
for
(
Integer
dataExplainId
:
dataExplainIdList
)
{
for
(
Integer
dataExplainId
:
dataExplainIdList
)
{
this
.
updateTipService
.
publish
(
dataExplainId
,
LogAndUpdateTipsTypeEnum
.
DATA_EXPLAIN
.
getCode
());
this
.
updateTipService
.
publish
(
dataExplainId
,
LogAndUpdateTipsTypeEnum
.
DATA_EXPLAIN
.
getCode
());
DataExplainDTO
dataExplainDTO
=
new
DataExplainDTO
();
dataExplainDTO
.
setDataExplainId
(
dataExplainId
);
dataExplainDTO
.
setOptUserId
(
optUserId
);
dataExplainDTO
.
setOptUserName
(
optUserName
);
indexLogService
.
saveDataExplainUpdateLog
(
dataExplainDTO
,
reason
);
}
}
return
EnterpriseServiceResponse
.
success
();
return
EnterpriseServiceResponse
.
success
();
}
}
...
...
gic-data-cloud-service/src/main/java/com/gic/cloud/service/outer/impl/IndexApiServiceImpl.java
View file @
f0edbc0a
...
@@ -125,9 +125,14 @@ public class IndexApiServiceImpl implements IndexApiService {
...
@@ -125,9 +125,14 @@ public class IndexApiServiceImpl implements IndexApiService {
}
}
@Override
@Override
public
ServiceResponse
<
Void
>
publish
(
List
<
Integer
>
indexIdList
)
{
public
ServiceResponse
<
Void
>
publish
(
List
<
Integer
>
indexIdList
,
Integer
updateType
,
String
reason
,
Integer
optUserId
,
String
optUserName
)
{
for
(
Integer
indexId
:
indexIdList
)
{
for
(
Integer
indexId
:
indexIdList
)
{
this
.
updateTipService
.
publish
(
indexId
,
LogAndUpdateTipsTypeEnum
.
INDEX
.
getCode
());
this
.
updateTipService
.
publish
(
indexId
,
LogAndUpdateTipsTypeEnum
.
INDEX
.
getCode
());
IndexDTO
indexDTO
=
new
IndexDTO
();
indexDTO
.
setIndexId
(
indexId
);
indexDTO
.
setOptUserId
(
optUserId
);
indexDTO
.
setOptUserName
(
optUserName
);
indexLogService
.
saveIndexUpdateLog
(
indexDTO
,
reason
);
}
}
return
EnterpriseServiceResponse
.
success
();
return
EnterpriseServiceResponse
.
success
();
}
}
...
...
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