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
1dce13ed
Commit
1dce13ed
authored
Jul 09, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据字典
parent
e1eafb2b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
0 deletions
+78
-0
pom.xml
gic-data-cloud-operation-web/pom.xml
+6
-0
IndexController.java
...m/gic/cloud/operation/web/controller/IndexController.java
+68
-0
dubbo-gic-data-cloud-web.xml
...ation-web/src/main/resources/dubbo-gic-data-cloud-web.xml
+4
-0
No files found.
gic-data-cloud-operation-web/pom.xml
View file @
1dce13ed
...
...
@@ -19,6 +19,7 @@
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.target>
1.8
</maven.compiler.target>
<libraryVersion>
4.0-SNAPSHOT
</libraryVersion>
<gic-data-cloud-api>
4.0-SNAPSHOT
</gic-data-cloud-api>
<!-- api依赖,正式版会在 gic-pom-base 里生成 -->
</properties>
...
...
@@ -88,6 +89,11 @@
<artifactId>
gic-platform-enterprise-api
</artifactId>
<version>
${gic-platform-enterprise-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-data-cloud-api
</artifactId>
<version>
${gic-data-cloud-api}
</version>
</dependency>
<!--<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
...
...
gic-data-cloud-operation-web/src/main/java/com/gic/cloud/operation/web/controller/IndexController.java
0 → 100644
View file @
1dce13ed
package
com
.
gic
.
cloud
.
operation
.
web
.
controller
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.authcenter.security.core.dto.UserDetailsVO
;
import
com.gic.authcenter.security.core.util.UserUtils
;
import
com.gic.cloud.dto.IndexDTO
;
import
com.gic.cloud.qo.IndexQO
;
import
com.gic.cloud.service.DataExplainApiService
;
import
com.gic.cloud.service.IndexApiService
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-09 14:22
*/
@RestController
public
class
IndexController
{
@Autowired
private
IndexApiService
indexApiService
;
@Autowired
private
DataExplainApiService
dataExplainApiService
;
@RequestMapping
(
"/saveIndex"
)
public
RestResponse
saveIndex
(
IndexDTO
indexDTO
)
{
if
(
indexDTO
.
getIsAppIndex
()
==
null
||
StringUtils
.
isBlank
(
indexDTO
.
getCode
())
||
StringUtils
.
isBlank
(
indexDTO
.
getName
())
||
StringUtils
.
isBlank
(
indexDTO
.
getIndexRemark
()))
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
ErrorCode
.
PARAMETER_ERROR
.
getMsg
());
}
UserDetailsVO
user
=
UserUtils
.
getUser
();
indexDTO
.
setOptUserId
(
user
.
getId
());
indexDTO
.
setOptUserName
(
user
.
getRealName
());
ServiceResponse
<
Void
>
serviceResponse
=
indexApiService
.
saveIndex
(
indexDTO
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
@RequestMapping
(
"/updateIndex"
)
public
RestResponse
updateIndex
(
IndexDTO
indexDTO
,
Integer
updateType
,
String
reason
)
{
if
(
indexDTO
.
getIndexId
()
==
null
||
updateType
==
null
)
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
ErrorCode
.
PARAMETER_ERROR
.
getMsg
());
}
ServiceResponse
<
Void
>
serviceResponse
=
indexApiService
.
updateIndex
(
indexDTO
,
updateType
,
reason
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
@RequestMapping
(
"/getByIndexId"
)
public
RestResponse
getByIndexId
(
Integer
indexId
)
{
ServiceResponse
<
IndexDTO
>
serviceResponse
=
indexApiService
.
getByIndexId
(
indexId
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
@RequestMapping
(
"/listIndex"
)
public
RestResponse
listIndex
(
IndexQO
indexQO
)
{
ServiceResponse
<
Page
<
IndexDTO
>>
serviceResponse
=
indexApiService
.
listIndex
(
indexQO
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
}
\ No newline at end of file
gic-data-cloud-operation-web/src/main/resources/dubbo-gic-data-cloud-web.xml
View file @
1dce13ed
...
...
@@ -92,4 +92,7 @@
<dubbo:reference
interface=
"com.gic.authcenter.api.service.GicDepartmentService"
id=
"gicDepartmentService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.member.config.api.service.MemberCardApiService"
id=
"memberCardApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.cloud.service.IndexApiService"
id=
"indexApiService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.cloud.service.DataExplainApiService"
id=
"dataExplainApiService"
timeout=
"6000"
retries=
"0"
/>
</beans>
\ No newline at end of file
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