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
303f0d78
Commit
303f0d78
authored
May 18, 2021
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置表
parent
58022c43
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
8 deletions
+34
-8
TableSettingApiService.java
...va/com/gic/enterprise/service/TableSettingApiService.java
+1
-1
TabTableSettingMapper.java
.../com/gic/enterprise/dao/mapper/TabTableSettingMapper.java
+3
-0
TableSettingService.java
.../java/com/gic/enterprise/service/TableSettingService.java
+1
-1
TableSettingServiceImpl.java
.../gic/enterprise/service/impl/TableSettingServiceImpl.java
+7
-1
TableSettingApiServiceImpl.java
...rprise/service/outer/impl/TableSettingApiServiceImpl.java
+8
-3
TabTableSettingMapper.xml
...rvice/src/main/resources/mapper/TabTableSettingMapper.xml
+8
-0
TableSettingController.java
.../gic/operation/web/controller/TableSettingController.java
+6
-2
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/TableSettingApiService.java
View file @
303f0d78
...
...
@@ -17,7 +17,7 @@ public interface TableSettingApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
*/
ServiceResponse
<
Void
>
saveTableSetting
(
TableSettingDTO
tableSettingDTO
);
ServiceResponse
<
String
>
saveTableSetting
(
TableSettingDTO
tableSettingDTO
);
/**
* pageTableSetting
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/dao/mapper/TabTableSettingMapper.java
View file @
303f0d78
...
...
@@ -63,4 +63,6 @@ public interface TabTableSettingMapper {
Page
<
TabTableSetting
>
pageTableSetting
(
@Param
(
"search"
)
String
search
);
TabTableSetting
getTableSettingByTableName
(
@Param
(
"tableName"
)
String
tableName
);
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/TableSettingService.java
View file @
303f0d78
...
...
@@ -4,7 +4,7 @@ import com.gic.enterprise.entity.TabTableSetting;
import
com.github.pagehelper.Page
;
public
interface
TableSettingService
{
void
saveTableSetting
(
TabTableSetting
tabTableSetting
);
String
saveTableSetting
(
TabTableSetting
tabTableSetting
);
Page
<
TabTableSetting
>
pageTableSetting
(
String
search
);
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/TableSettingServiceImpl.java
View file @
303f0d78
...
...
@@ -18,14 +18,20 @@ public class TableSettingServiceImpl implements TableSettingService {
private
TabTableSettingMapper
tabTableSettingMapper
;
@Override
public
void
saveTableSetting
(
TabTableSetting
tabTableSetting
)
{
public
String
saveTableSetting
(
TabTableSetting
tabTableSetting
)
{
tabTableSetting
.
setUpdateTime
(
new
Date
());
if
(
tabTableSetting
.
getTableId
()
==
null
){
//校验是否重复
TabTableSetting
existTable
=
tabTableSettingMapper
.
getTableSettingByTableName
(
tabTableSetting
.
getTableName
());
if
(
existTable
!=
null
){
return
"表名已经存在"
;
}
tabTableSetting
.
setCreateTime
(
new
Date
());
tabTableSettingMapper
.
insertSelective
(
tabTableSetting
);
}
else
{
tabTableSettingMapper
.
updateByPrimaryKeySelective
(
tabTableSetting
);
}
return
null
;
}
@Override
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/TableSettingApiServiceImpl.java
View file @
303f0d78
...
...
@@ -7,10 +7,12 @@ import com.gic.commons.util.PageHelperUtils;
import
com.gic.enterprise.dto.TableSettingDTO
;
import
com.gic.enterprise.dto.TableSettingFieldDTO
;
import
com.gic.enterprise.entity.TabTableSetting
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.service.TableSettingApiService
;
import
com.gic.enterprise.service.TableSettingFieldService
;
import
com.gic.enterprise.service.TableSettingService
;
import
com.github.pagehelper.PageHelper
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -24,9 +26,12 @@ public class TableSettingApiServiceImpl implements TableSettingApiService {
private
TableSettingFieldService
tableSettingFieldService
;
@Override
public
ServiceResponse
<
Void
>
saveTableSetting
(
TableSettingDTO
tableSettingDTO
)
{
tableSettingService
.
saveTableSetting
(
EntityUtil
.
changeEntityByJSON
(
TabTableSetting
.
class
,
tableSettingDTO
));
return
ServiceResponse
.
success
();
public
ServiceResponse
<
String
>
saveTableSetting
(
TableSettingDTO
tableSettingDTO
)
{
String
result
=
tableSettingService
.
saveTableSetting
(
EntityUtil
.
changeEntityByJSON
(
TabTableSetting
.
class
,
tableSettingDTO
));
if
(
StringUtils
.
isBlank
(
result
)){
return
ServiceResponse
.
success
();
}
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
result
);
}
@Override
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabTableSettingMapper.xml
View file @
303f0d78
...
...
@@ -229,4 +229,11 @@
and (table_name like concat('%',search,'%') or remark like concat('%',search,'%'))
</if>
</select>
<select
id=
"getTableSettingByTableName"
resultMap=
"ResultMapWithBLOBs"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_table_setting
where delete_flag = 0
and table_name = #{tableName}
</select>
</mapper>
\ No newline at end of file
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/TableSettingController.java
View file @
303f0d78
...
...
@@ -7,6 +7,7 @@ import com.gic.commons.util.EntityUtil;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.dto.TableSettingDTO
;
import
com.gic.enterprise.dto.TableSettingFieldDTO
;
import
com.gic.enterprise.response.EnterpriseRestResponse
;
import
com.gic.enterprise.service.TableSettingApiService
;
import
com.gic.operation.web.qo.TableSettingFieldQO
;
import
com.gic.operation.web.qo.TableSettingQO
;
...
...
@@ -28,8 +29,11 @@ public class TableSettingController {
TableSettingDTO
tableSettingDTO
=
EntityUtil
.
changeEntityByJSON
(
TableSettingDTO
.
class
,
param
);
tableSettingDTO
.
setCreatetor
(
UserUtils
.
getUser
().
getId
().
toString
());
tableSettingDTO
.
setCreatetorName
(
UserUtils
.
getUser
().
getUsername
());
tableSettingApiService
.
saveTableSetting
(
tableSettingDTO
);
return
RestResponse
.
success
();
ServiceResponse
<
String
>
response
=
tableSettingApiService
.
saveTableSetting
(
tableSettingDTO
);
if
(
response
.
isSuccess
()){
return
RestResponse
.
success
();
}
return
EnterpriseRestResponse
.
failure
(
response
);
}
@RequestMapping
(
"page-table-setting"
)
...
...
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