Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
indicators
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
zhangkb
indicators
Commits
badcce0c
Commit
badcce0c
authored
Jul 09, 2020
by
张祺
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改规则查询的方法
parent
1ba5481a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
TaskRuleMapper.xml
src/main/resources/mybatis/mapping/TaskRuleMapper.xml
+3
-2
TaskRuleObjMapper.xml
src/main/resources/mybatis/mapping/TaskRuleObjMapper.xml
+1
-1
No files found.
src/main/resources/mybatis/mapping/TaskRuleMapper.xml
View file @
badcce0c
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.keymobile.indicators.model.mapper.indicators.TaskRuleMapper"
>
<mapper
namespace=
"com.keymobile.indicators.model.mapper.indicators.TaskRuleMapper"
>
<select
id=
"getById"
parameterType=
"java.lang.Integer"
>
<select
id=
"getById"
parameterType=
"java.lang.Integer"
resultType=
"com.keymobile.indicators.model.entity.dataenter.TaskRule"
>
select rule.*, obj.name as group_name
select rule.*, obj.name as group_name
from data_enter_task_rule rule left join data_enter_rule_obj obj
from data_enter_task_rule rule left join data_enter_rule_obj obj
on rule.group_id = obj.id
on rule.group_id = obj.id
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
select rule.*, obj.name as group_name
select rule.*, obj.name as group_name
from data_enter_task_rule rule left join data_enter_rule_obj obj
from data_enter_task_rule rule left join data_enter_rule_obj obj
on rule.group_id = obj.id
on rule.group_id = obj.id
<include
refid=
"findWhereSql"
></include>
order by rule.update_time desc, name asc
order by rule.update_time desc, name asc
limit #{start}, #{pageSize}
limit #{start}, #{pageSize}
</select>
</select>
...
@@ -40,7 +41,7 @@
...
@@ -40,7 +41,7 @@
and rule.rule_level = #{ruleLevel}
and rule.rule_level = #{ruleLevel}
</if>
</if>
<if
test=
"keyword != null and keyword != ''"
>
<if
test=
"keyword != null and keyword != ''"
>
and rule.name like concat('%',
keyword
, '%')
and rule.name like concat('%',
#{keyword}
, '%')
</if>
</if>
</sql>
</sql>
<select
id=
"findRuleCount"
resultType=
"long"
>
<select
id=
"findRuleCount"
resultType=
"long"
>
...
...
src/main/resources/mybatis/mapping/TaskRuleObjMapper.xml
View file @
badcce0c
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
and obj_type = #{objType}
and obj_type = #{objType}
</if>
</if>
<if
test=
"keyword != null and keyword != ''"
>
<if
test=
"keyword != null and keyword != ''"
>
and name like concat('%',
keyword
, '%')
and name like concat('%',
#{keyword}
, '%')
</if>
</if>
</sql>
</sql>
<select
id=
"findByName"
resultType=
"com.keymobile.indicators.model.entity.dataenter.TaskRuleGroupObj"
>
<select
id=
"findByName"
resultType=
"com.keymobile.indicators.model.entity.dataenter.TaskRuleGroupObj"
>
...
...
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