Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
blg
Commits
ebef5eb7
Commit
ebef5eb7
authored
Apr 16, 2026
by
wujipeng
Browse files
设备资产列表优化
parent
ed9270c8
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/resources/org/example/blg/mapper/EquipmentMapper.xml
View file @
ebef5eb7
...
...
@@ -4,17 +4,21 @@
<mapper
namespace=
"org.example.blg.mapper.EquipmentMapper"
>
<select
id=
"list"
resultType=
"org.example.blg.pojo.vo.EquipmentVO"
>
select
id,
name,
code
e.id,
e.name,
e.code,
IF(COUNT(CASE WHEN ep.status = 1 THEN 1 END) > 0, TRUE, FALSE) AS hasAlarm
from
equipment
equipment e
JOIN equipment_param ep
ON e.id = ep.equipment_id
<where>
<if
test=
"conditions != null and conditions != ''"
>
(name like concat('%', #{conditions}, '%') or
code like concat('%', #{conditions}, '%'))
(
e.
name like concat('%', #{conditions}, '%') or
e.
code like concat('%', #{conditions}, '%'))
</if>
</where>
GROUP BY e.id, e.name, e.code
</select>
<select
id=
"detail"
resultType=
"org.example.blg.pojo.vo.EquipmentVO"
>
select
...
...
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