Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pingshan-ranqi
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
yaqizhang
pingshan-ranqi
Commits
336f8506
Commit
336f8506
authored
Nov 12, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报警器添加修改时间字段
parent
04f6991e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
TDetectorInfoController.java
...hong/web/controller/detector/TDetectorInfoController.java
+1
-0
TDetectorInfoMapper.xml
.../src/main/resources/mapper/system/TDetectorInfoMapper.xml
+14
-3
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/detector/TDetectorInfoController.java
View file @
336f8506
...
...
@@ -217,6 +217,7 @@ public class TDetectorInfoController extends BaseController
List
<
TDetectorInfo
>
detectorList
=
tDetectorInfoService
.
selectTDetectorInfoList
(
detector
);
if
(
detectorList
.
size
()
>
0
){
tDetectorInfo
.
setDetectorId
(
detectorList
.
get
(
0
).
getDetectorId
());
tDetectorInfo
.
setUpdateTime
(
new
Date
());
tDetectorInfoService
.
updateTDetectorInfo
(
tDetectorInfo
);
continue
;
}
...
...
gassafety-system/src/main/resources/mapper/system/TDetectorInfoMapper.xml
View file @
336f8506
...
...
@@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"linkman"
column=
"linkman"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"alarmTime"
column=
"alarm_time"
/>
<result
property=
"detectorStatus"
column=
"detector_status"
/>
<result
property=
"isDel"
column=
"is_del"
/>
...
...
@@ -26,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql
id=
"selectTDetectorInfoVo"
>
select detector_id, enterprise_id, user_id, detector_name, detector_code, detector_addr, detector_type, medium, longitude, latitude, iot_no, linkman, phone, create_time, alarm_time, detector_status, is_del, remarks from t_detector_info
select detector_id, enterprise_id, user_id, detector_name, detector_code, detector_addr, detector_type, medium, longitude, latitude, iot_no, linkman, phone, create_time,
update_time,
alarm_time, detector_status, is_del, remarks from t_detector_info
</sql>
<select
id=
"selectTDetectorInfoList"
parameterType=
"TDetectorInfo"
resultMap=
"TDetectorInfoResult"
>
...
...
@@ -45,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"linkman != null and linkman != ''"
>
and linkman = #{linkman}
</if>
<if
test=
"phone != null and phone != ''"
>
and phone = #{phone}
</if>
<if
test=
"createTime != null "
>
and create_time = #{createTime}
</if>
<if
test=
"updateTime != null "
>
and update_time = #{updateTime}
</if>
<if
test=
"alarmTime != null "
>
and alarm_time = #{alarmTime}
</if>
<if
test=
"detectorStatus != null and detectorStatus != ''"
>
and detector_status = #{detectorStatus}
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
...
...
@@ -73,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"linkman != null"
>
linkman,
</if>
<if
test=
"phone != null"
>
phone,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"alarmTime != null"
>
alarm_time,
</if>
<if
test=
"detectorStatus != null"
>
detector_status,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
...
...
@@ -92,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"linkman != null"
>
#{linkman},
</if>
<if
test=
"phone != null"
>
#{phone},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"alarmTime != null"
>
#{alarmTime},
</if>
<if
test=
"detectorStatus != null"
>
#{detectorStatus},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
...
...
@@ -174,7 +178,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim
prefix=
"phone=case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
>
<if
test=
"item.phone != null && item.
tele
phone != ''"
>
<if
test=
"item.phone != null && item.phone != ''"
>
when detector_code=#{item.detectorCode} then #{item.phone}
</if>
</foreach>
...
...
@@ -193,6 +197,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
</foreach>
</trim>
<trim
prefix=
"update_time=case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
>
<if
test=
"item.updateTime != null"
>
when detector_code=#{item.detectorCode} then #{item.updateTime}
</if>
</foreach>
</trim>
<trim
prefix=
"alarm_time=case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
>
<if
test=
"item.alarmTime != null"
>
...
...
@@ -224,7 +235,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"iotNo != null"
>
iot_no = #{iotNo},
</if>
<if
test=
"linkman != null"
>
linkman = #{linkman},
</if>
<if
test=
"phone != null"
>
phone = #{phone},
</if>
<if
test=
"
createTime != null"
>
create_time = #{cre
ateTime},
</if>
<if
test=
"
updateTime != null"
>
update_time = #{upd
ateTime},
</if>
<if
test=
"alarmTime != null"
>
alarm_time = #{alarmTime},
</if>
<if
test=
"detectorStatus != null"
>
detector_status = #{detectorStatus},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</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