Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
Project
Project
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
耿迪迪
gassafety
Commits
1ed7ce11
Commit
1ed7ce11
authored
Jul 23, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xml 条件判断问题修改 gengdidi
parent
898b6d93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
TDeviceInfoMapper.xml
...em/src/main/resources/mapper/system/TDeviceInfoMapper.xml
+3
-3
TPipeMapper.xml
...y-system/src/main/resources/mapper/system/TPipeMapper.xml
+4
-4
No files found.
gassafety-system/src/main/resources/mapper/system/TDeviceInfoMapper.xml
View file @
1ed7ce11
...
...
@@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert
id=
"insertTDeviceInfo"
parameterType=
"TDeviceInfo"
useGeneratedKeys=
"true"
keyProperty=
"deviceId"
>
insert into t_device_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"enterpriseId != null
and enterpriseId != 0
"
>
enterprise_id,
</if>
<if
test=
"pipeCode != null"
>
pipe_code,
</if>
<if
test=
"deviceName != null"
>
device_name,
</if>
<if
test=
"deviceCode != null"
>
device_code,
</if>
...
...
@@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"remarks != null"
>
remarks,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"enterpriseId != null"
>
#{enterpriseId},
</if>
<if
test=
"enterpriseId != null
and enterpriseId != 0
"
>
#{enterpriseId},
</if>
<if
test=
"pipeCode != null"
>
#{pipeCode},
</if>
<if
test=
"deviceName != null"
>
#{deviceName},
</if>
<if
test=
"deviceCode != null"
>
#{deviceCode},
</if>
...
...
@@ -108,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update
id=
"updateTDeviceInfo"
parameterType=
"TDeviceInfo"
>
update t_device_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId},
</if>
<if
test=
"enterpriseId != null
and enterpriseId != 0
"
>
enterprise_id = #{enterpriseId},
</if>
<if
test=
"pipeCode != null"
>
pipe_code = #{pipeCode},
</if>
<if
test=
"deviceName != null"
>
device_name = #{deviceName},
</if>
<if
test=
"deviceCode != null"
>
device_code = #{deviceCode},
</if>
...
...
gassafety-system/src/main/resources/mapper/system/TPipeMapper.xml
View file @
1ed7ce11
...
...
@@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"selectTPipeList"
parameterType=
"TPipe"
resultMap=
"TPipeResult"
>
<include
refid=
"selectTPipeVo"
/>
<where>
<if
test=
"enterpriseId != null "
>
and enterprise_id = #{enterpriseId}
</if>
<if
test=
"enterpriseId != null
and enterpriseId != 0
"
>
and enterprise_id = #{enterpriseId}
</if>
<if
test=
"pipeName != null and pipeName != ''"
>
and pipe_name like concat('%', #{pipeName}, '%')
</if>
<if
test=
"pipeCode != null and pipeCode != ''"
>
and pipe_code like concat('%', #{pipeCode}, '%')
</if>
<if
test=
"pipeAddr != null and pipeAddr != ''"
>
and pipe_addr = #{pipeAddr}
</if>
...
...
@@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert
id=
"insertTPipe"
parameterType=
"TPipe"
useGeneratedKeys=
"true"
keyProperty=
"pipeId"
>
insert into t_pipe
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"enterpriseId != null
and enterpriseId != 0
"
>
enterprise_id,
</if>
<if
test=
"pipeName != null"
>
pipe_name,
</if>
<if
test=
"pipeCode != null"
>
pipe_code,
</if>
<if
test=
"pipeAddr != null"
>
pipe_addr,
</if>
...
...
@@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"remarks != null"
>
remarks,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"enterpriseId != null"
>
#{enterpriseId},
</if>
<if
test=
"enterpriseId != null
and enterpriseId != 0
"
>
#{enterpriseId},
</if>
<if
test=
"pipeName != null"
>
#{pipeName},
</if>
<if
test=
"pipeCode != null"
>
#{pipeCode},
</if>
<if
test=
"pipeAddr != null"
>
#{pipeAddr},
</if>
...
...
@@ -90,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update
id=
"updateTPipe"
parameterType=
"TPipe"
>
update t_pipe
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId},
</if>
<if
test=
"enterpriseId != null
and enterpriseId != 0
"
>
enterprise_id = #{enterpriseId},
</if>
<if
test=
"pipeName != null"
>
pipe_name = #{pipeName},
</if>
<if
test=
"pipeCode != null"
>
pipe_code = #{pipeCode},
</if>
<if
test=
"pipeAddr != null"
>
pipe_addr = #{pipeAddr},
</if>
...
...
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