Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-standard-interfaces
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit faaeb2d4
authored
Jun 27, 2022
by
向延琳
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:sql error
1 parent
f3acd267
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
src/main/resources/mapper/DevicePowerMapper.xml
src/test/java/cn/com/glsx/stdinterface/modules/mapper/DevicePowerMapperTest.java
src/main/resources/mapper/DevicePowerMapper.xml
View file @
faaeb2d
...
@@ -43,9 +43,12 @@
...
@@ -43,9 +43,12 @@
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from t_device_power
from t_device_power
<foreach
collection=
"sn"
item=
"sn"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<where>
#{sn}
and sn in
</foreach>
<foreach
collection=
"sn"
item=
"sn"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{sn}
</foreach>
</where>
</select>
</select>
<insert
id=
"insertOrUpdateBatch"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"insertOrUpdateBatch"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
...
...
src/test/java/cn/com/glsx/stdinterface/modules/mapper/DevicePowerMapperTest.java
View file @
faaeb2d
...
@@ -2,6 +2,7 @@ package cn.com.glsx.stdinterface.modules.mapper;
...
@@ -2,6 +2,7 @@ package cn.com.glsx.stdinterface.modules.mapper;
import
cn.com.glsx.Application
;
import
cn.com.glsx.Application
;
import
cn.com.glsx.stdinterface.modules.entity.DevicePower
;
import
cn.com.glsx.stdinterface.modules.entity.DevicePower
;
import
com.alibaba.fastjson.JSON
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.Test
;
...
@@ -38,4 +39,11 @@ class DevicePowerMapperTest {
...
@@ -38,4 +39,11 @@ class DevicePowerMapperTest {
devicePowerMapper
.
insertOrUpdateBatch
(
list
);
devicePowerMapper
.
insertOrUpdateBatch
(
list
);
}
}
@Test
public
void
listBySn
(){
List
<
DevicePower
>
devicePowers
=
devicePowerMapper
.
listBySn
(
Lists
.
newArrayList
(
"111"
));
System
.
out
.
println
(
JSON
.
toJSONString
(
devicePowers
));
}
}
}
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment