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
cca07abf
Commit
cca07abf
authored
Mar 05, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
平台规则编辑修复
parent
0cf3ba55
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
2 deletions
+14
-2
ConfigRuleApiServiceImpl.java
...terprise/service/outer/impl/ConfigRuleApiServiceImpl.java
+1
-1
TabConfigRuleEnterpriseMapper.xml
...c/main/resources/mapper/TabConfigRuleEnterpriseMapper.xml
+1
-1
ConfigRuleController.java
...om/gic/operation/web/controller/ConfigRuleController.java
+7
-0
EnterpriseRuleVO.java
...com/gic/operation/web/vo/configrule/EnterpriseRuleVO.java
+5
-0
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/ConfigRuleApiServiceImpl.java
View file @
cca07abf
...
...
@@ -62,7 +62,7 @@ public class ConfigRuleApiServiceImpl implements ConfigRuleApiService {
@Override
public
ServiceResponse
<
Integer
>
editRule
(
RuleDTO
dto
)
{
TabConfigRule
record
=
configRuleService
.
getByRuleId
(
dto
.
get
Parent
RuleId
());
TabConfigRule
record
=
configRuleService
.
getByRuleId
(
dto
.
getRuleId
());
if
(
record
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"规则ID错误,规则不存在"
);
}
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabConfigRuleEnterpriseMapper.xml
View file @
cca07abf
...
...
@@ -114,7 +114,7 @@
</select>
<select
id=
"listRule"
resultType=
"com.gic.enterprise.dto.rule.RuleEnterpriseDTO"
>
select t1.rule_name ruleName, count(DISTINCT t2.enterprise_id) countEnterpriseId
select t1.
enterprise_rule_id enterpriseRuleId, t1.
rule_name ruleName, count(DISTINCT t2.enterprise_id) countEnterpriseId
from tab_config_rule_enterprise t1
left join tab_config_rule_enterprise_rel t2 on t1.enterprise_rule_id = t2.enterprise_rule_id
<if
test=
"search != null and search != '' "
>
...
...
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/ConfigRuleController.java
View file @
cca07abf
...
...
@@ -5,6 +5,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
com.gic.enterprise.error.ErrorCode
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -150,11 +151,17 @@ public class ConfigRuleController {
*/
@RequestMapping
(
"/saveEnterpriseRule"
)
public
RestResponse
saveEnterpriseRule
(
RuleEnterpriseDTO
dto
)
{
if
(
dto
.
getEnterpriseRuleId
()
!=
null
)
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"规则ID有值"
);
}
return
ResultControllerUtils
.
commonResult
(
configRuleEnterpriseApiService
.
save
(
dto
));
}
@RequestMapping
(
"/editEnterpriseRule"
)
public
RestResponse
editEnterpriseRule
(
RuleEnterpriseDTO
dto
)
{
if
(
dto
.
getEnterpriseRuleId
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"规则ID不能为空"
);
}
return
ResultControllerUtils
.
commonResult
(
configRuleEnterpriseApiService
.
edit
(
dto
));
}
...
...
gic-platform-operation-web/src/main/java/com/gic/operation/web/vo/configrule/EnterpriseRuleVO.java
View file @
cca07abf
...
...
@@ -16,4 +16,9 @@ public class EnterpriseRuleVO implements Serializable{
* 规则名称
*/
private
String
ruleName
;
/**
*
*/
private
Integer
enterpriseRuleId
;
}
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