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
c3755f32
Commit
c3755f32
authored
May 25, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
2b2d78db
17a55781
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
142 additions
and
0 deletions
+142
-0
FieldTypeEnum.java
.../main/java/com/gic/enterprise/constant/FieldTypeEnum.java
+31
-0
CustomSettingApiService.java
...a/com/gic/enterprise/service/CustomSettingApiService.java
+52
-0
pom.xml
gic-platform-enterprise-service/pom.xml
+5
-0
CustomSettingApiServiceImpl.java
...prise/service/outer/impl/CustomSettingApiServiceImpl.java
+0
-0
CustomSettingController.java
...gic/operation/web/controller/CustomSettingController.java
+54
-0
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/constant/FieldTypeEnum.java
0 → 100644
View file @
c3755f32
package
com
.
gic
.
enterprise
.
constant
;
public
enum
FieldTypeEnum
{
INT
(
"int"
,
"int"
),
STRING
(
"string"
,
"string"
),
DATE
(
"date"
,
"date"
),
LONG
(
"long"
,
"long"
);
private
String
type
;
private
String
message
;
FieldTypeEnum
(
String
type
,
String
message
){
this
.
type
=
type
;
this
.
message
=
message
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getMessage
()
{
return
message
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/CustomSettingApiService.java
View file @
c3755f32
package
com
.
gic
.
enterprise
.
service
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
java.util.Map
;
public
interface
CustomSettingApiService
{
/**
* save
* @Title: save
* @Description: 保存
* @author taogs
* @param tableName
* @param params
* @return com.gic.api.base.commons.ServiceResponse<java.lang.String>
* @throws
*/
ServiceResponse
<
String
>
save
(
String
tableName
,
String
params
);
/**
* getDetail
* @Title: getDetail
* @Description: 查询详情
* @author taogs
* @param tableName
* @param searchParams
* @return com.gic.api.base.commons.ServiceResponse<java.util.Map<java.lang.String,java.lang.Object>>
* @throws
*/
ServiceResponse
<
Map
<
String
,
Object
>>
getDetail
(
String
tableName
,
String
searchParams
);
/**
* page
* @Title: page
* @Description:
* @author taogs
* @param tableName
* @param searchParams
* @param currentPage
* @param pageSize
* @return com.gic.api.base.commons.ServiceResponse<com.gic.api.base.commons.Page<java.util.Map<java.lang.String,java.lang.Object>>>
* @throws
*/
ServiceResponse
<
Page
<
Map
>>
page
(
String
tableName
,
String
searchParams
,
Integer
currentPage
,
Integer
pageSize
);
/**
* delete
* @Title: delete
* @Description: 删除
* @author taogs
* @param tableName
* @param id
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>
* @throws
*/
ServiceResponse
<
Integer
>
delete
(
String
tableName
,
String
id
);
}
gic-platform-enterprise-service/pom.xml
View file @
c3755f32
...
...
@@ -226,6 +226,11 @@
<artifactId>
gic-member-filter-api
</artifactId>
<version>
${gic-member-filter-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-dubbo-extension
</artifactId>
<version>
4.0-SNAPSHOT
</version>
</dependency>
</dependencies>
<build>
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/CustomSettingApiServiceImpl.java
View file @
c3755f32
This diff is collapsed.
Click to expand it.
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/CustomSettingController.java
View file @
c3755f32
package
com
.
gic
.
operation
.
web
.
controller
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.response.EnterpriseRestResponse
;
...
...
@@ -7,13 +8,26 @@ import com.gic.enterprise.service.CustomSettingApiService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.Map
;
@Controller
public
class
CustomSettingController
{
@Autowired
CustomSettingApiService
customSettingApiService
;
/**
* save
* @Title: save
* @Description:
* @author taogs
* @param tableName
* @param param {"enterpriseId":1166,"ttt":3}
* @return com.gic.commons.webapi.reponse.RestResponse
* @throws
*/
@RequestMapping
(
"save"
)
@ResponseBody
public
RestResponse
save
(
String
tableName
,
String
param
){
...
...
@@ -23,4 +37,44 @@ public class CustomSettingController {
}
return
EnterpriseRestResponse
.
failure
(
save
);
}
/**
* getDetail
* @Title: getDetail
* @Description:
* @author taogs
* @param tableName
* @param searchParams {"id":1}
* @return com.gic.commons.webapi.reponse.RestResponse
* @throws
*/
@RequestMapping
(
"get-detail"
)
@ResponseBody
public
RestResponse
getDetail
(
String
tableName
,
String
searchParams
){
ServiceResponse
<
Map
<
String
,
Object
>>
detail
=
customSettingApiService
.
getDetail
(
tableName
,
searchParams
);
if
(
detail
.
isSuccess
()){
return
RestResponse
.
success
(
detail
.
getResult
());
}
return
EnterpriseRestResponse
.
failure
(
detail
);
}
@RequestMapping
(
"page"
)
@ResponseBody
public
RestResponse
page
(
String
tableName
,
String
searchParams
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
currentPage
,
@RequestParam
(
defaultValue
=
"20"
)
Integer
pageSize
){
ServiceResponse
<
Page
<
Map
>>
page
=
customSettingApiService
.
page
(
tableName
,
searchParams
,
currentPage
,
pageSize
);
if
(
page
.
isSuccess
()){
return
RestResponse
.
success
(
page
.
getResult
());
}
return
EnterpriseRestResponse
.
failure
(
page
);
}
@RequestMapping
(
"delete"
)
@ResponseBody
public
RestResponse
delete
(
String
tableName
,
String
id
){
ServiceResponse
<
Integer
>
delete
=
customSettingApiService
.
delete
(
tableName
,
id
);
if
(
delete
.
isSuccess
()){
return
RestResponse
.
success
();
}
return
EnterpriseRestResponse
.
failure
(
delete
);
}
}
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