Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
klck
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
位宇华
klck
Commits
b2055069
Commit
b2055069
authored
9 months ago
by
Fuzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正
parent
f158b86d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
0 deletions
+43
-0
ruoyi-wages/src/main/java/com/ruoyi/system/controller/RuleController.java
...main/java/com/ruoyi/system/controller/RuleController.java
+5
-0
ruoyi-wages/src/main/java/com/ruoyi/system/mapper/RuleMapper.java
...ges/src/main/java/com/ruoyi/system/mapper/RuleMapper.java
+2
-0
ruoyi-wages/src/main/java/com/ruoyi/system/model/rule/RuleRequestModel.java
...in/java/com/ruoyi/system/model/rule/RuleRequestModel.java
+10
-0
ruoyi-wages/src/main/java/com/ruoyi/system/service/RuleService.java
...s/src/main/java/com/ruoyi/system/service/RuleService.java
+2
-0
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/RuleServiceImpl.java
...n/java/com/ruoyi/system/service/impl/RuleServiceImpl.java
+7
-0
ruoyi-wages/src/main/resources/mapper/system/RuleMapper.xml
ruoyi-wages/src/main/resources/mapper/system/RuleMapper.xml
+17
-0
No files found.
ruoyi-wages/src/main/java/com/ruoyi/system/controller/RuleController.java
View file @
b2055069
...
...
@@ -26,4 +26,9 @@ public class RuleController {
public
AjaxResult
query
(
@RequestParam
(
"templateId"
)
String
ruleRequestModel
){
return
ruleService
.
query
(
ruleRequestModel
);
}
@PostMapping
(
"/rule/updateToId"
)
public
AjaxResult
updateToId
(
@RequestBody
RuleRequestModel
ruleRequestModel
){
return
ruleService
.
updateToId
(
ruleRequestModel
);
}
}
This diff is collapsed.
Click to expand it.
ruoyi-wages/src/main/java/com/ruoyi/system/mapper/RuleMapper.java
View file @
b2055069
...
...
@@ -11,4 +11,6 @@ public interface RuleMapper {
void
save
(
@Param
(
"rule"
)
RuleRequestModel
ruleRequestModel
,
@Param
(
"json"
)
JSON
json
);
List
<
RuleModel
>
query
(
@Param
(
"id"
)
String
ruleRequestModel
);
void
updateToId
(
@Param
(
"rule"
)
RuleRequestModel
ruleRequestModel
,
@Param
(
"json"
)
JSON
json
);
}
This diff is collapsed.
Click to expand it.
ruoyi-wages/src/main/java/com/ruoyi/system/model/rule/RuleRequestModel.java
View file @
b2055069
...
...
@@ -5,6 +5,8 @@ import java.util.List;
public
class
RuleRequestModel
implements
Serializable
{
private
String
id
;
private
String
templateId
;
private
String
firstRule
;
...
...
@@ -13,6 +15,14 @@ public class RuleRequestModel implements Serializable {
private
List
<
RuleModel
>
rules
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getTemplateId
()
{
return
templateId
;
}
...
...
This diff is collapsed.
Click to expand it.
ruoyi-wages/src/main/java/com/ruoyi/system/service/RuleService.java
View file @
b2055069
...
...
@@ -7,4 +7,6 @@ public interface RuleService {
AjaxResult
save
(
RuleRequestModel
ruleRequestModel
);
AjaxResult
query
(
String
ruleRequestModel
);
AjaxResult
updateToId
(
RuleRequestModel
ruleRequestModel
);
}
This diff is collapsed.
Click to expand it.
ruoyi-wages/src/main/java/com/ruoyi/system/service/impl/RuleServiceImpl.java
View file @
b2055069
...
...
@@ -31,4 +31,11 @@ public class RuleServiceImpl implements RuleService {
List
<
RuleModel
>
rules
=
ruleMapper
.
query
(
ruleRequestModel
);
return
new
AjaxResult
(
200
,
"成功"
,
rules
);
}
@Override
public
AjaxResult
updateToId
(
RuleRequestModel
ruleRequestModel
)
{
JSON
json
=
(
JSON
)
JSON
.
toJSON
(
ruleRequestModel
.
getRules
());
ruleMapper
.
updateToId
(
ruleRequestModel
,
json
);
return
null
;
}
}
This diff is collapsed.
Click to expand it.
ruoyi-wages/src/main/resources/mapper/system/RuleMapper.xml
View file @
b2055069
...
...
@@ -8,6 +8,23 @@
values
(#{rule.templateId}, #{json}, #{rule.firstRule}, #{rule.secondRule})
</insert>
<update
id=
"updateToId"
>
update rule_sheet set
<if
test=
"rule.templateId != null and rule.templateId != ''"
>
template_id = #{rule.templateId},
</if>
<if
test=
"rule.firstRule != null and rule.firstRule != ''"
>
first_rule = #{rule.firstRule},
</if>
<if
test=
"rule.secondRule != null and rule.secondRule != ''"
>
second_rule = #{rule.secondRule},
</if>
<if
test=
"json != null and json != ''"
>
rules = #{json},
</if>
id = #{rule.id}
where id = #{rule.id};
</update>
<select
id=
"query"
resultType=
"com.ruoyi.system.model.rule.RuleModel"
>
select *
from rule_sheet
...
...
This diff is collapsed.
Click to expand it.
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