Commit 54038486f4792dce478bca6698f3cd9b55d0ae90

Authored by chenzhangyue
1 parent f57ed350

generate @param

src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceAlarmMapper.java
@@ -4,6 +4,7 @@ import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm; @@ -4,6 +4,7 @@ import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm;
4 import org.apache.ibatis.annotations.Delete; 4 import org.apache.ibatis.annotations.Delete;
5 import org.apache.ibatis.annotations.Insert; 5 import org.apache.ibatis.annotations.Insert;
6 import org.apache.ibatis.annotations.Mapper; 6 import org.apache.ibatis.annotations.Mapper;
  7 +import org.apache.ibatis.annotations.Param;
7 import org.apache.ibatis.annotations.Select; 8 import org.apache.ibatis.annotations.Select;
8 import org.springframework.stereotype.Repository; 9 import org.springframework.stereotype.Repository;
9 10
@@ -32,8 +33,8 @@ public interface DeviceAlarmMapper { @@ -32,8 +33,8 @@ public interface DeviceAlarmMapper {
32 " <if test=\"endTime != null\" > AND alarm_time &lt;= #{endTime} </if>" + 33 " <if test=\"endTime != null\" > AND alarm_time &lt;= #{endTime} </if>" +
33 " ORDER BY alarm_time ASC " + 34 " ORDER BY alarm_time ASC " +
34 " </script>"}) 35 " </script>"})
35 - List<DeviceAlarm> query(String deviceId, String alarmPriority, String alarmMethod,  
36 - String alarmType, String startTime, String endTime); 36 + List<DeviceAlarm> query(@Param("deviceId") String deviceId, @Param("alarmPriority") String alarmPriority, @Param("alarmMethod") String alarmMethod,
  37 + @Param("alarmType") String alarmType, @Param("startTime") String startTime, @Param("endTime") String endTime);
37 38
38 39
39 @Delete(" <script>" + 40 @Delete(" <script>" +
@@ -45,5 +46,5 @@ public interface DeviceAlarmMapper { @@ -45,5 +46,5 @@ public interface DeviceAlarmMapper {
45 " <if test=\"id != null\" > AND id = #{id}</if>" + 46 " <if test=\"id != null\" > AND id = #{id}</if>" +
46 " </script>" 47 " </script>"
47 ) 48 )
48 - int clearAlarmBeforeTime(Integer id, List<String> deviceIdList, String time); 49 + int clearAlarmBeforeTime(@Param("id") Integer id, @Param("deviceIdList") List<String> deviceIdList, @Param("time") String time);
49 } 50 }
src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java
@@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.gb28181.bean.DeviceChannelInPlatform; @@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.gb28181.bean.DeviceChannelInPlatform;
6 import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; 6 import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
7 import com.genersoft.iot.vmp.web.gb28181.dto.DeviceChannelExtend; 7 import com.genersoft.iot.vmp.web.gb28181.dto.DeviceChannelExtend;
8 import org.apache.ibatis.annotations.*; 8 import org.apache.ibatis.annotations.*;
  9 +import org.apache.ibatis.annotations.Param;
9 import org.springframework.stereotype.Repository; 10 import org.springframework.stereotype.Repository;
10 11
11 import java.util.List; 12 import java.util.List;
@@ -82,7 +83,7 @@ public interface DeviceChannelMapper { @@ -82,7 +83,7 @@ public interface DeviceChannelMapper {
82 "</foreach> </if>" + 83 "</foreach> </if>" +
83 "ORDER BY dc.channel_id " + 84 "ORDER BY dc.channel_id " +
84 " </script>"}) 85 " </script>"})
85 - List<DeviceChannel> queryChannels(String deviceId, String parentChannelId, String query, Boolean hasSubChannel, Boolean online, List<String> channelIds); 86 + List<DeviceChannel> queryChannels(@Param("deviceId") String deviceId, @Param("parentChannelId") String parentChannelId, @Param("query") String query, @Param("hasSubChannel") Boolean hasSubChannel, @Param("online") Boolean online, @Param("channelIds") List<String> channelIds);
86 87
87 @Select(value = {" <script>" + 88 @Select(value = {" <script>" +
88 "SELECT " + 89 "SELECT " +
@@ -105,7 +106,7 @@ public interface DeviceChannelMapper { @@ -105,7 +106,7 @@ public interface DeviceChannelMapper {
105 "</foreach> </if>" + 106 "</foreach> </if>" +
106 "ORDER BY dc.channel_id ASC" + 107 "ORDER BY dc.channel_id ASC" +
107 " </script>"}) 108 " </script>"})
108 - List<DeviceChannelExtend> queryChannelsWithDeviceInfo(String deviceId, String parentChannelId, String query, Boolean hasSubChannel, Boolean online, List<String> channelIds); 109 + List<DeviceChannelExtend> queryChannelsWithDeviceInfo(@Param("deviceId") String deviceId, @Param("parentChannelId") String parentChannelId, @Param("query") String query, @Param("hasSubChannel") Boolean hasSubChannel, @Param("online") Boolean online, @Param("channelIds") List<String> channelIds);
109 110
110 111
111 @Select(value = {" <script>" + 112 @Select(value = {" <script>" +
@@ -130,23 +131,23 @@ public interface DeviceChannelMapper { @@ -130,23 +131,23 @@ public interface DeviceChannelMapper {
130 "ORDER BY dc.channel_id ASC " + 131 "ORDER BY dc.channel_id ASC " +
131 "Limit #{limit} OFFSET #{start}" + 132 "Limit #{limit} OFFSET #{start}" +
132 " </script>"}) 133 " </script>"})
133 - List<DeviceChannelExtend> queryChannelsByDeviceIdWithStartAndLimit(String deviceId,List<String> channelIds, String parentChannelId, String query,  
134 - Boolean hasSubChannel, Boolean online, int start, int limit); 134 + List<DeviceChannelExtend> queryChannelsByDeviceIdWithStartAndLimit(@Param("deviceId") String deviceId, @Param("channelIds") List<String> channelIds, @Param("parentChannelId") String parentChannelId, @Param("query") String query, @Param("hasSubChannel") Boolean hasSubChannel, @Param("online") Boolean online, @Param("start") int start, @Param("limit") int limit);
135 135
136 @Select("SELECT * FROM wvp_device_channel WHERE device_id=#{deviceId} AND channel_id=#{channelId}") 136 @Select("SELECT * FROM wvp_device_channel WHERE device_id=#{deviceId} AND channel_id=#{channelId}")
137 - DeviceChannel queryChannel(String deviceId, String channelId); 137 + DeviceChannel queryChannel(@Param("deviceId") String deviceId,@Param("channelId") String channelId);
138 138
139 @Delete("DELETE FROM wvp_device_channel WHERE device_id=#{deviceId}") 139 @Delete("DELETE FROM wvp_device_channel WHERE device_id=#{deviceId}")
140 - int cleanChannelsByDeviceId(String deviceId); 140 + int cleanChannelsByDeviceId(@Param("deviceId") String deviceId);
141 141
142 @Delete("DELETE FROM wvp_device_channel WHERE device_id=#{deviceId} AND channel_id=#{channelId}") 142 @Delete("DELETE FROM wvp_device_channel WHERE device_id=#{deviceId} AND channel_id=#{channelId}")
143 - int del(String deviceId, String channelId); 143 + int del(@Param("deviceId") String deviceId, @Param("channelId") String channelId);
144 144
145 @Update(value = {"UPDATE wvp_device_channel SET stream_id=null WHERE device_id=#{deviceId} AND channel_id=#{channelId}"}) 145 @Update(value = {"UPDATE wvp_device_channel SET stream_id=null WHERE device_id=#{deviceId} AND channel_id=#{channelId}"})
146 - void stopPlay(String deviceId, String channelId); 146 + void stopPlay(@Param("deviceId") String deviceId, @Param("channelId") String channelId);
147 147
148 @Update(value = {"UPDATE wvp_device_channel SET stream_id=#{streamId} WHERE device_id=#{deviceId} AND channel_id=#{channelId}"}) 148 @Update(value = {"UPDATE wvp_device_channel SET stream_id=#{streamId} WHERE device_id=#{deviceId} AND channel_id=#{channelId}"})
149 - void startPlay(String deviceId, String channelId, String streamId); 149 + void startPlay(@Param("deviceId") String deviceId, @Param("channelId") String channelId, @Param("streamId") String streamId);
  150 +
150 151
151 @Select(value = {" <script>" + 152 @Select(value = {" <script>" +
152 "SELECT " + 153 "SELECT " +
@@ -172,7 +173,7 @@ public interface DeviceChannelMapper { @@ -172,7 +173,7 @@ public interface DeviceChannelMapper {
172 " <if test='catalogId != null ' > AND pgc.platform_id = #{platformId} and pgc.catalog_id=#{catalogId} </if> " + 173 " <if test='catalogId != null ' > AND pgc.platform_id = #{platformId} and pgc.catalog_id=#{catalogId} </if> " +
173 " ORDER BY dc.device_id, dc.channel_id ASC" + 174 " ORDER BY dc.device_id, dc.channel_id ASC" +
174 " </script>"}) 175 " </script>"})
175 - List<ChannelReduce> queryChannelListInAll(String query, Boolean online, Boolean hasSubChannel, String platformId, String catalogId); 176 + List<ChannelReduce> queryChannelListInAll(@Param("query") String query, @Param("online") Boolean online, @Param("hasSubChannel") Boolean hasSubChannel, @Param("platformId") String platformId, @Param("catalogId") String catalogId);
176 177
177 @Select(value = {" <script>" + 178 @Select(value = {" <script>" +
178 "SELECT " + 179 "SELECT " +
@@ -191,7 +192,7 @@ public interface DeviceChannelMapper { @@ -191,7 +192,7 @@ public interface DeviceChannelMapper {
191 List<DeviceChannel> queryChannelByChannelId( String channelId); 192 List<DeviceChannel> queryChannelByChannelId( String channelId);
192 193
193 @Update(value = {"UPDATE wvp_device_channel SET status=false WHERE device_id=#{deviceId} AND channel_id=#{channelId}"}) 194 @Update(value = {"UPDATE wvp_device_channel SET status=false WHERE device_id=#{deviceId} AND channel_id=#{channelId}"})
194 - void offline(String deviceId, String channelId); 195 + void offline(@Param("deviceId") String deviceId, @Param("channelId") String channelId);
195 196
196 @Update(value = {"UPDATE wvp_device_channel SET status=false WHERE device_id=#{deviceId}"}) 197 @Update(value = {"UPDATE wvp_device_channel SET status=false WHERE device_id=#{deviceId}"})
197 void offlineByDeviceId(String deviceId); 198 void offlineByDeviceId(String deviceId);
@@ -214,7 +215,7 @@ public interface DeviceChannelMapper { @@ -214,7 +215,7 @@ public interface DeviceChannelMapper {
214 "#{item.businessGroupId}, #{item.gpsTime}) " + 215 "#{item.businessGroupId}, #{item.gpsTime}) " +
215 "</foreach> " + 216 "</foreach> " +
216 "</script>") 217 "</script>")
217 - int batchAdd(List<DeviceChannel> addChannels); 218 + int batchAdd(@Param("addChannels") List<DeviceChannel> addChannels);
218 219
219 220
220 @Insert("<script> " + 221 @Insert("<script> " +
@@ -271,7 +272,7 @@ public interface DeviceChannelMapper { @@ -271,7 +272,7 @@ public interface DeviceChannelMapper {
271 int batchAddOrUpdate(List<DeviceChannel> addChannels); 272 int batchAddOrUpdate(List<DeviceChannel> addChannels);
272 273
273 @Update(value = {"UPDATE wvp_device_channel SET status=true WHERE device_id=#{deviceId} AND channel_id=#{channelId}"}) 274 @Update(value = {"UPDATE wvp_device_channel SET status=true WHERE device_id=#{deviceId} AND channel_id=#{channelId}"})
274 - void online(String deviceId, String channelId); 275 + void online(@Param("deviceId") String deviceId, @Param("channelId") String channelId);
275 276
276 @Update({"<script>" + 277 @Update({"<script>" +
277 "<foreach collection='updateChannels' item='item' separator=';'>" + 278 "<foreach collection='updateChannels' item='item' separator=';'>" +
@@ -328,7 +329,7 @@ public interface DeviceChannelMapper { @@ -328,7 +329,7 @@ public interface DeviceChannelMapper {
328 " AND channel_id NOT IN " + 329 " AND channel_id NOT IN " +
329 "<foreach collection='channels' item='item' open='(' separator=',' close=')' > #{item.channelId}</foreach>" + 330 "<foreach collection='channels' item='item' open='(' separator=',' close=')' > #{item.channelId}</foreach>" +
330 " </script>"}) 331 " </script>"})
331 - int cleanChannelsNotInList(String deviceId, List<DeviceChannel> channels); 332 + int cleanChannelsNotInList(@Param("deviceId") String deviceId, @Param("channels") List<DeviceChannel> channels);
332 333
333 @Update(" update wvp_device_channel" + 334 @Update(" update wvp_device_channel" +
334 " set sub_count = (select *" + 335 " set sub_count = (select *" +
@@ -337,7 +338,7 @@ public interface DeviceChannelMapper { @@ -337,7 +338,7 @@ public interface DeviceChannelMapper {
337 " where device_id = #{deviceId} and parent_id = #{channelId}) as temp)" + 338 " where device_id = #{deviceId} and parent_id = #{channelId}) as temp)" +
338 " where device_id = #{deviceId} " + 339 " where device_id = #{deviceId} " +
339 " and channel_id = #{channelId}") 340 " and channel_id = #{channelId}")
340 - int updateChannelSubCount(String deviceId, String channelId); 341 + int updateChannelSubCount(@Param("deviceId") String deviceId, @Param("channelId") String channelId);
341 342
342 @Update(value = {" <script>" + 343 @Update(value = {" <script>" +
343 "UPDATE wvp_device_channel " + 344 "UPDATE wvp_device_channel " +
@@ -370,14 +371,14 @@ public interface DeviceChannelMapper { @@ -370,14 +371,14 @@ public interface DeviceChannelMapper {
370 " <if test='parentId == null and length == null' > and parent_id= #{parentId} </if>" + 371 " <if test='parentId == null and length == null' > and parent_id= #{parentId} </if>" +
371 " <if test='parentId != null and length == null' > and parent_id= #{parentId} or left(channel_id, LENGTH(#{parentId})) = #{parentId} </if>" + 372 " <if test='parentId != null and length == null' > and parent_id= #{parentId} or left(channel_id, LENGTH(#{parentId})) = #{parentId} </if>" +
372 " </script>"}) 373 " </script>"})
373 - List<DeviceChannel> getChannelsWithCivilCodeAndLength(String deviceId, String parentId, Integer length); 374 + List<DeviceChannel> getChannelsWithCivilCodeAndLength(@Param("deviceId") String deviceId, @Param("parentId") String parentId, @Param("length") Integer length);
374 375
375 @Select(value = {" <script>" + 376 @Select(value = {" <script>" +
376 "select * " + 377 "select * " +
377 "from wvp_device_channel " + 378 "from wvp_device_channel " +
378 "where device_id=#{deviceId} and length(channel_id)>14 and civil_code=#{parentId}" + 379 "where device_id=#{deviceId} and length(channel_id)>14 and civil_code=#{parentId}" +
379 " </script>"}) 380 " </script>"})
380 - List<DeviceChannel> getChannelsByCivilCode(String deviceId, String parentId); 381 + List<DeviceChannel> getChannelsByCivilCode(@Param("deviceId") String deviceId, @Param("parentId") String parentId);
381 382
382 @Select("select min(length(channel_id)) as minLength " + 383 @Select("select min(length(channel_id)) as minLength " +
383 "from wvp_device_channel " + 384 "from wvp_device_channel " +
@@ -389,7 +390,7 @@ public interface DeviceChannelMapper { @@ -389,7 +390,7 @@ public interface DeviceChannelMapper {
389 List<DeviceChannel> getChannelWithoutCivilCode(String deviceId); 390 List<DeviceChannel> getChannelWithoutCivilCode(String deviceId);
390 391
391 @Select("select * from wvp_device_channel where device_id=#{deviceId} and SUBSTRING(channel_id, 11, 3)=#{typeCode}") 392 @Select("select * from wvp_device_channel where device_id=#{deviceId} and SUBSTRING(channel_id, 11, 3)=#{typeCode}")
392 - List<DeviceChannel> getBusinessGroups(String deviceId, String typeCode); 393 + List<DeviceChannel> getBusinessGroups(@Param("deviceId") String deviceId, @Param("typeCode") String typeCode);
393 394
394 @Select("select dc.id, dc.channel_id, dc.device_id, dc.name, dc.manufacture,dc.model,dc.owner, pc.civil_code,dc.block, " + 395 @Select("select dc.id, dc.channel_id, dc.device_id, dc.name, dc.manufacture,dc.model,dc.owner, pc.civil_code,dc.block, " +
395 " dc.address, '0' as parental,'0' as channel_type, pc.id as parent_id, dc.safety_way, dc.register_way,dc.cert_num, dc.certifiable, " + 396 " dc.address, '0' as parental,'0' as channel_type, pc.id as parent_id, dc.safety_way, dc.register_way,dc.cert_num, dc.certifiable, " +
@@ -428,14 +429,14 @@ public interface DeviceChannelMapper { @@ -428,14 +429,14 @@ public interface DeviceChannelMapper {
428 "DELETE FROM wvp_device_channel WHERE device_id=#{item.deviceId} AND channel_id=#{item.channelId}" + 429 "DELETE FROM wvp_device_channel WHERE device_id=#{item.deviceId} AND channel_id=#{item.channelId}" +
429 "</foreach>" + 430 "</foreach>" +
430 "</script>"}) 431 "</script>"})
431 - int batchDel(List<DeviceChannel> deleteChannelList); 432 + int batchDel(@Param("deleteChannelList") List<DeviceChannel> deleteChannelList);
432 433
433 @Update({"<script>" + 434 @Update({"<script>" +
434 "<foreach collection='channels' item='item' separator=';'>" + 435 "<foreach collection='channels' item='item' separator=';'>" +
435 "UPDATE wvp_device_channel SET status=true WHERE device_id=#{item.deviceId} AND channel_id=#{item.channelId}" + 436 "UPDATE wvp_device_channel SET status=true WHERE device_id=#{item.deviceId} AND channel_id=#{item.channelId}" +
436 "</foreach>" + 437 "</foreach>" +
437 "</script>"}) 438 "</script>"})
438 - int batchOnline(List<DeviceChannel> channels); 439 + int batchOnline(@Param("channels") List<DeviceChannel> channels);
439 440
440 @Update({"<script>" + 441 @Update({"<script>" +
441 "<foreach collection='channels' item='item' separator=';'>" + 442 "<foreach collection='channels' item='item' separator=';'>" +
@@ -463,6 +464,6 @@ public interface DeviceChannelMapper { @@ -463,6 +464,6 @@ public interface DeviceChannelMapper {
463 " <if test='parentId == null or parentId == deviceId'> and parent_id is null or parent_id = #{deviceId}</if>" + 464 " <if test='parentId == null or parentId == deviceId'> and parent_id is null or parent_id = #{deviceId}</if>" +
464 " <if test='onlyCatalog == true '> and parental = 1 </if>" + 465 " <if test='onlyCatalog == true '> and parental = 1 </if>" +
465 " </script>"}) 466 " </script>"})
466 - List<DeviceChannel> getSubChannelsByDeviceId(String deviceId, String parentId, boolean onlyCatalog); 467 + List<DeviceChannel> getSubChannelsByDeviceId(@Param("deviceId") String deviceId, @Param("parentId") String parentId, @Param("onlyCatalog") boolean onlyCatalog);
467 468
468 } 469 }
src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java
@@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.storager.dao; @@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.storager.dao;
2 2
3 import com.genersoft.iot.vmp.gb28181.bean.Device; 3 import com.genersoft.iot.vmp.gb28181.bean.Device;
4 import org.apache.ibatis.annotations.*; 4 import org.apache.ibatis.annotations.*;
  5 +import org.apache.ibatis.annotations.Param;
5 import org.springframework.stereotype.Repository; 6 import org.springframework.stereotype.Repository;
6 7
7 import java.util.List; 8 import java.util.List;
@@ -229,7 +230,7 @@ public interface DeviceMapper { @@ -229,7 +230,7 @@ public interface DeviceMapper {
229 "geo_coord_sys,"+ 230 "geo_coord_sys,"+
230 "on_line"+ 231 "on_line"+
231 " FROM wvp_device WHERE ip = #{host} AND port=#{port}") 232 " FROM wvp_device WHERE ip = #{host} AND port=#{port}")
232 - Device getDeviceByHostAndPort(String host, int port); 233 + Device getDeviceByHostAndPort(@Param("host") String host, @Param("port") int port);
233 234
234 @Update(value = {" <script>" + 235 @Update(value = {" <script>" +
235 "UPDATE wvp_device " + 236 "UPDATE wvp_device " +
src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMobilePositionMapper.java
@@ -4,6 +4,7 @@ import com.genersoft.iot.vmp.gb28181.bean.MobilePosition; @@ -4,6 +4,7 @@ import com.genersoft.iot.vmp.gb28181.bean.MobilePosition;
4 import org.apache.ibatis.annotations.Delete; 4 import org.apache.ibatis.annotations.Delete;
5 import org.apache.ibatis.annotations.Insert; 5 import org.apache.ibatis.annotations.Insert;
6 import org.apache.ibatis.annotations.Mapper; 6 import org.apache.ibatis.annotations.Mapper;
  7 +import org.apache.ibatis.annotations.Param;
7 import org.apache.ibatis.annotations.Select; 8 import org.apache.ibatis.annotations.Select;
8 9
9 import java.util.List; 10 import java.util.List;
@@ -23,7 +24,7 @@ public interface DeviceMobilePositionMapper { @@ -23,7 +24,7 @@ public interface DeviceMobilePositionMapper {
23 "<if test=\"endTime != null\"> AND time&lt;=#{endTime}</if>" + 24 "<if test=\"endTime != null\"> AND time&lt;=#{endTime}</if>" +
24 " ORDER BY time ASC" + 25 " ORDER BY time ASC" +
25 " </script>"}) 26 " </script>"})
26 - List<MobilePosition> queryPositionByDeviceIdAndTime(String deviceId, String channelId, String startTime, String endTime); 27 + List<MobilePosition> queryPositionByDeviceIdAndTime(@Param("deviceId") String deviceId, @Param("channelId") String channelId, @Param("startTime") String startTime, @Param("endTime") String endTime);
27 28
28 @Select("SELECT * FROM wvp_device_mobile_position WHERE device_id = #{deviceId}" + 29 @Select("SELECT * FROM wvp_device_mobile_position WHERE device_id = #{deviceId}" +
29 " ORDER BY time DESC LIMIT 1") 30 " ORDER BY time DESC LIMIT 1")
src/main/java/com/genersoft/iot/vmp/storager/dao/GbStreamMapper.java
@@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem; @@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem;
6 import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem; 6 import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem;
7 import com.genersoft.iot.vmp.service.bean.GPSMsgInfo; 7 import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
8 import org.apache.ibatis.annotations.*; 8 import org.apache.ibatis.annotations.*;
  9 +import org.apache.ibatis.annotations.Param;
9 import org.springframework.stereotype.Repository; 10 import org.springframework.stereotype.Repository;
10 11
11 import java.util.List; 12 import java.util.List;
@@ -47,7 +48,7 @@ public interface GbStreamMapper { @@ -47,7 +48,7 @@ public interface GbStreamMapper {
47 int update(GbStream gbStream); 48 int update(GbStream gbStream);
48 49
49 @Delete("DELETE FROM wvp_gb_stream WHERE app=#{app} AND stream=#{stream}") 50 @Delete("DELETE FROM wvp_gb_stream WHERE app=#{app} AND stream=#{stream}")
50 - int del(String app, String stream); 51 + int del(@Param("app") String app, @Param("stream") String stream);
51 52
52 @Select("<script> "+ 53 @Select("<script> "+
53 "SELECT gs.* FROM wvp_gb_stream gs " + 54 "SELECT gs.* FROM wvp_gb_stream gs " +
@@ -61,10 +62,10 @@ public interface GbStreamMapper { @@ -61,10 +62,10 @@ public interface GbStreamMapper {
61 " <if test='mediaServerId != null' > AND gs.media_server_id=#{mediaServerId} </if>" + 62 " <if test='mediaServerId != null' > AND gs.media_server_id=#{mediaServerId} </if>" +
62 " order by gs.gb_stream_id asc " + 63 " order by gs.gb_stream_id asc " +
63 "</script>") 64 "</script>")
64 - List<GbStream> selectAll(String platformId, String catalogId, String query, String mediaServerId); 65 + List<GbStream> selectAll(@Param("platformId") String platformId, @Param("catalogId") String catalogId, @Param("query") String query, @Param("mediaServerId") String mediaServerId);
65 66
66 @Select("SELECT * FROM wvp_gb_stream WHERE app=#{app} AND stream=#{stream}") 67 @Select("SELECT * FROM wvp_gb_stream WHERE app=#{app} AND stream=#{stream}")
67 - GbStream selectOne(String app, String stream); 68 + GbStream selectOne(@Param("app") String app, @Param("stream") String stream);
68 69
69 @Select("SELECT * FROM wvp_gb_stream WHERE gb_id=#{gbId}") 70 @Select("SELECT * FROM wvp_gb_stream WHERE gb_id=#{gbId}")
70 List<GbStream> selectByGBId(String gbId); 71 List<GbStream> selectByGBId(String gbId);
@@ -72,7 +73,7 @@ public interface GbStreamMapper { @@ -72,7 +73,7 @@ public interface GbStreamMapper {
72 @Select("SELECT gs.*, pgs.platform_id as platform_id, pgs.catalog_id as catalog_id FROM wvp_gb_stream gs " + 73 @Select("SELECT gs.*, pgs.platform_id as platform_id, pgs.catalog_id as catalog_id FROM wvp_gb_stream gs " +
73 "LEFT JOIN wvp_platform_gb_stream pgs ON gs.gb_stream_id = pgs.gb_stream_id " + 74 "LEFT JOIN wvp_platform_gb_stream pgs ON gs.gb_stream_id = pgs.gb_stream_id " +
74 "WHERE gs.gb_id = #{gbId} AND pgs.platform_id = #{platformId}") 75 "WHERE gs.gb_id = #{gbId} AND pgs.platform_id = #{platformId}")
75 - GbStream queryStreamInPlatform(String platformId, String gbId); 76 + GbStream queryStreamInPlatform(@Param("platformId") String platformId, @Param("gbId") String gbId);
76 77
77 @Select("<script> "+ 78 @Select("<script> "+
78 "select gt.gb_id as channel_id, gt.name, 'wvp-pro' as manufacture, st.status, gt.longitude, gt.latitude, pc.id as parent_id," + 79 "select gt.gb_id as channel_id, gt.name, 'wvp-pro' as manufacture, st.status, gt.longitude, gt.latitude, pc.id as parent_id," +
@@ -90,7 +91,7 @@ public interface GbStreamMapper { @@ -90,7 +91,7 @@ public interface GbStreamMapper {
90 " left join wvp_platform_catalog pc on pgs.catalog_id = pc.id and pgs.platform_id = pc.platform_id" + 91 " left join wvp_platform_catalog pc on pgs.catalog_id = pc.id and pgs.platform_id = pc.platform_id" +
91 " where pgs.platform_id=#{platformId}" + 92 " where pgs.platform_id=#{platformId}" +
92 "</script>") 93 "</script>")
93 - List<DeviceChannel> queryGbStreamListInPlatform(String platformId, boolean usPushingAsStatus); 94 + List<DeviceChannel> queryGbStreamListInPlatform(String platformId, @Param("usPushingAsStatus") boolean usPushingAsStatus);
94 95
95 96
96 @Select("SELECT gs.* FROM wvp_gb_stream gs left join wvp_platform_gb_stream pgs " + 97 @Select("SELECT gs.* FROM wvp_gb_stream gs left join wvp_platform_gb_stream pgs " +
@@ -98,7 +99,7 @@ public interface GbStreamMapper { @@ -98,7 +99,7 @@ public interface GbStreamMapper {
98 List<GbStream> queryStreamNotInPlatform(); 99 List<GbStream> queryStreamNotInPlatform();
99 100
100 @Delete("DELETE FROM wvp_gb_stream WHERE stream_type=#{type} AND gb_id=NULL AND media_server_id=#{mediaServerId}") 101 @Delete("DELETE FROM wvp_gb_stream WHERE stream_type=#{type} AND gb_id=NULL AND media_server_id=#{mediaServerId}")
101 - void deleteWithoutGBId(String type, String mediaServerId); 102 + void deleteWithoutGBId(@Param("type") String type, @Param("mediaServerId") String mediaServerId);
102 103
103 @Delete("<script> "+ 104 @Delete("<script> "+
104 "DELETE FROM wvp_gb_stream where " + 105 "DELETE FROM wvp_gb_stream where " +
@@ -128,7 +129,7 @@ public interface GbStreamMapper { @@ -128,7 +129,7 @@ public interface GbStreamMapper {
128 "</foreach> " + 129 "</foreach> " +
129 "</script>") 130 "</script>")
130 @Options(useGeneratedKeys = true, keyProperty = "gbStreamId", keyColumn = "gb_stream_id") 131 @Options(useGeneratedKeys = true, keyProperty = "gbStreamId", keyColumn = "gb_stream_id")
131 - void batchAdd(List<StreamPushItem> subList); 132 + void batchAdd(@Param("subList") List<StreamPushItem> subList);
132 133
133 @Update({"<script>" + 134 @Update({"<script>" +
134 "<foreach collection='gpsMsgInfos' item='item' separator=';'>" + 135 "<foreach collection='gpsMsgInfos' item='item' separator=';'>" +
@@ -164,9 +165,9 @@ public interface GbStreamMapper { @@ -164,9 +165,9 @@ public interface GbStreamMapper {
164 int updateGbIdOrName(List<StreamPushItem> streamPushItemForUpdate); 165 int updateGbIdOrName(List<StreamPushItem> streamPushItemForUpdate);
165 166
166 @Select("SELECT status FROM wvp_stream_proxy WHERE app=#{app} AND stream=#{stream}") 167 @Select("SELECT status FROM wvp_stream_proxy WHERE app=#{app} AND stream=#{stream}")
167 - Boolean selectStatusForProxy(String app, String stream); 168 + Boolean selectStatusForProxy(@Param("app") String app, @Param("stream") String stream);
168 169
169 @Select("SELECT status FROM wvp_stream_push WHERE app=#{app} AND stream=#{stream}") 170 @Select("SELECT status FROM wvp_stream_push WHERE app=#{app} AND stream=#{stream}")
170 - Boolean selectStatusForPush(String app, String stream); 171 + Boolean selectStatusForPush(@Param("app") String app, @Param("stream") String stream);
171 172
172 } 173 }
src/main/java/com/genersoft/iot/vmp/storager/dao/LogMapper.java
@@ -4,6 +4,7 @@ import com.genersoft.iot.vmp.storager.dao.dto.LogDto; @@ -4,6 +4,7 @@ import com.genersoft.iot.vmp.storager.dao.dto.LogDto;
4 import org.apache.ibatis.annotations.Delete; 4 import org.apache.ibatis.annotations.Delete;
5 import org.apache.ibatis.annotations.Insert; 5 import org.apache.ibatis.annotations.Insert;
6 import org.apache.ibatis.annotations.Mapper; 6 import org.apache.ibatis.annotations.Mapper;
  7 +import org.apache.ibatis.annotations.Param;
7 import org.apache.ibatis.annotations.Select; 8 import org.apache.ibatis.annotations.Select;
8 import org.springframework.stereotype.Repository; 9 import org.springframework.stereotype.Repository;
9 10
@@ -29,7 +30,7 @@ public interface LogMapper { @@ -29,7 +30,7 @@ public interface LogMapper {
29 " <if test=\"endTime != null\" > AND create_time &lt;= #{endTime} </if>" + 30 " <if test=\"endTime != null\" > AND create_time &lt;= #{endTime} </if>" +
30 " ORDER BY create_time DESC " + 31 " ORDER BY create_time DESC " +
31 " </script>"}) 32 " </script>"})
32 - List<LogDto> query(String query, String type, String startTime, String endTime); 33 + List<LogDto> query(@Param("query") String query, @Param("type") String type, @Param("startTime") String startTime, @Param("endTime") String endTime);
33 34
34 @Delete("DELETE FROM wvp_log") 35 @Delete("DELETE FROM wvp_log")
35 int clear(); 36 int clear();
src/main/java/com/genersoft/iot/vmp/storager/dao/MediaServerMapper.java
@@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.storager.dao; @@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.storager.dao;
2 2
3 import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; 3 import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
4 import org.apache.ibatis.annotations.*; 4 import org.apache.ibatis.annotations.*;
  5 +import org.apache.ibatis.annotations.Param;
5 import org.springframework.stereotype.Repository; 6 import org.springframework.stereotype.Repository;
6 7
7 import java.util.List; 8 import java.util.List;
@@ -119,13 +120,13 @@ public interface MediaServerMapper { @@ -119,13 +120,13 @@ public interface MediaServerMapper {
119 void delOne(String id); 120 void delOne(String id);
120 121
121 @Select("DELETE FROM wvp_media_server WHERE ip=#{host} and http_port=#{port}") 122 @Select("DELETE FROM wvp_media_server WHERE ip=#{host} and http_port=#{port}")
122 - void delOneByIPAndPort(String host, int port); 123 + void delOneByIPAndPort(@Param("host") String host, @Param("port") int port);
123 124
124 @Delete("DELETE FROM wvp_media_server WHERE default_server=true") 125 @Delete("DELETE FROM wvp_media_server WHERE default_server=true")
125 int delDefault(); 126 int delDefault();
126 127
127 @Select("SELECT * FROM wvp_media_server WHERE ip=#{host} and http_port=#{port}") 128 @Select("SELECT * FROM wvp_media_server WHERE ip=#{host} and http_port=#{port}")
128 - MediaServerItem queryOneByHostAndPort(String host, int port); 129 + MediaServerItem queryOneByHostAndPort(@Param("host") String host, @Param("port") int port);
129 130
130 @Select("SELECT * FROM wvp_media_server WHERE default_server=true") 131 @Select("SELECT * FROM wvp_media_server WHERE default_server=true")
131 MediaServerItem queryDefault(); 132 MediaServerItem queryDefault();
src/main/java/com/genersoft/iot/vmp/storager/dao/ParentPlatformMapper.java
@@ -3,6 +3,7 @@ package com.genersoft.iot.vmp.storager.dao; @@ -3,6 +3,7 @@ package com.genersoft.iot.vmp.storager.dao;
3 import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; 3 import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
4 import com.genersoft.iot.vmp.storager.dao.dto.ChannelSourceInfo; 4 import com.genersoft.iot.vmp.storager.dao.dto.ChannelSourceInfo;
5 import org.apache.ibatis.annotations.*; 5 import org.apache.ibatis.annotations.*;
  6 +import org.apache.ibatis.annotations.Param;
6 import org.springframework.stereotype.Repository; 7 import org.springframework.stereotype.Repository;
7 8
8 import java.util.List; 9 import java.util.List;
@@ -84,17 +85,17 @@ public interface ParentPlatformMapper { @@ -84,17 +85,17 @@ public interface ParentPlatformMapper {
84 int outlineForAllParentPlatform(); 85 int outlineForAllParentPlatform();
85 86
86 @Update("UPDATE wvp_platform SET status=#{online} WHERE server_gb_id=#{platformGbID}" ) 87 @Update("UPDATE wvp_platform SET status=#{online} WHERE server_gb_id=#{platformGbID}" )
87 - int updateParentPlatformStatus(String platformGbID, boolean online); 88 + int updateParentPlatformStatus(@Param("platformGbID") String platformGbID, @Param("online") boolean online);
88 89
89 @Update(value = {" <script>" + 90 @Update(value = {" <script>" +
90 "UPDATE wvp_platform " + 91 "UPDATE wvp_platform " +
91 "SET catalog_id=#{catalogId}, update_time=#{updateTime}" + 92 "SET catalog_id=#{catalogId}, update_time=#{updateTime}" +
92 "WHERE server_gb_id=#{platformId}"+ 93 "WHERE server_gb_id=#{platformId}"+
93 "</script>"}) 94 "</script>"})
94 - int setDefaultCatalog(String platformId, String catalogId, String updateTime); 95 + int setDefaultCatalog(@Param("platformId") String platformId, @Param("catalogId") String catalogId, @Param("updateTime") String updateTime);
95 96
96 @Select("select 'channel' as name, count(pgc.platform_id) count from wvp_platform_gb_channel pgc left join wvp_device_channel dc on dc.id = pgc.device_channel_id where pgc.platform_id=#{platform_id} and dc.channel_id =#{gbId} " + 97 @Select("select 'channel' as name, count(pgc.platform_id) count from wvp_platform_gb_channel pgc left join wvp_device_channel dc on dc.id = pgc.device_channel_id where pgc.platform_id=#{platform_id} and dc.channel_id =#{gbId} " +
97 "union " + 98 "union " +
98 "select 'stream' as name, count(pgs.platform_id) count from wvp_platform_gb_stream pgs left join wvp_gb_stream gs on pgs.gb_stream_id = gs.gb_stream_id where pgs.platform_id=#{platform_id} and gs.gb_id =#{gbId}") 99 "select 'stream' as name, count(pgs.platform_id) count from wvp_platform_gb_stream pgs left join wvp_gb_stream gs on pgs.gb_stream_id = gs.gb_stream_id where pgs.platform_id=#{platform_id} and gs.gb_id =#{gbId}")
99 - List<ChannelSourceInfo> getChannelSource(String platform_id, String gbId); 100 + List<ChannelSourceInfo> getChannelSource(@Param("platform_id") String platform_id, @Param("gbId") String gbId);
100 } 101 }
src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformCatalogMapper.java
@@ -3,6 +3,7 @@ package com.genersoft.iot.vmp.storager.dao; @@ -3,6 +3,7 @@ package com.genersoft.iot.vmp.storager.dao;
3 import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; 3 import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
4 import com.genersoft.iot.vmp.gb28181.bean.PlatformCatalog; 4 import com.genersoft.iot.vmp.gb28181.bean.PlatformCatalog;
5 import org.apache.ibatis.annotations.*; 5 import org.apache.ibatis.annotations.*;
  6 +import org.apache.ibatis.annotations.Param;
6 import org.springframework.stereotype.Repository; 7 import org.springframework.stereotype.Repository;
7 8
8 import java.util.List; 9 import java.util.List;
@@ -17,37 +18,37 @@ public interface PlatformCatalogMapper { @@ -17,37 +18,37 @@ public interface PlatformCatalogMapper {
17 int add(PlatformCatalog platformCatalog); 18 int add(PlatformCatalog platformCatalog);
18 19
19 @Delete("DELETE from wvp_platform_catalog WHERE platform_id=#{platformId} and id=#{id}") 20 @Delete("DELETE from wvp_platform_catalog WHERE platform_id=#{platformId} and id=#{id}")
20 - int del(String platformId, String id); 21 + int del(@Param("platformId") String platformId, @Param("id") String id);
21 22
22 @Delete("DELETE from wvp_platform_catalog WHERE platform_id=#{platformId}") 23 @Delete("DELETE from wvp_platform_catalog WHERE platform_id=#{platformId}")
23 - int delByPlatformId(String platformId); 24 + int delByPlatformId(@Param("platformId") String platformId);
24 25
25 @Select("SELECT pc.*, count(pc2.id) as children_count from wvp_platform_catalog pc " + 26 @Select("SELECT pc.*, count(pc2.id) as children_count from wvp_platform_catalog pc " +
26 "left join wvp_platform_catalog pc2 on pc.id = pc2.parent_id " + 27 "left join wvp_platform_catalog pc2 on pc.id = pc2.parent_id " +
27 "WHERE pc.parent_id=#{parentId} AND pc.platform_id=#{platformId} " + 28 "WHERE pc.parent_id=#{parentId} AND pc.platform_id=#{platformId} " +
28 "group by pc.id, pc.name, pc.platform_id, pc.business_group_id, pc.civil_code, pc.parent_id") 29 "group by pc.id, pc.name, pc.platform_id, pc.business_group_id, pc.civil_code, pc.parent_id")
29 - List<PlatformCatalog> selectByParentId(String platformId, String parentId); 30 + List<PlatformCatalog> selectByParentId(@Param("platformId") String platformId, @Param("parentId") String parentId);
30 31
31 @Update(value = {" <script>" + 32 @Update(value = {" <script>" +
32 "UPDATE wvp_platform_catalog " + 33 "UPDATE wvp_platform_catalog " +
33 "SET name=#{name}" + 34 "SET name=#{name}" +
34 "WHERE id=#{id} and platform_id=#{platformId}"+ 35 "WHERE id=#{id} and platform_id=#{platformId}"+
35 "</script>"}) 36 "</script>"})
36 - int update(PlatformCatalog platformCatalog); 37 + int update(@Param("platformCatalog") PlatformCatalog platformCatalog);
37 38
38 @Select("SELECT *, (SELECT COUNT(1) from wvp_platform_catalog where parent_id = pc.id) as children_count from wvp_platform_catalog pc WHERE pc.platform_id=#{platformId}") 39 @Select("SELECT *, (SELECT COUNT(1) from wvp_platform_catalog where parent_id = pc.id) as children_count from wvp_platform_catalog pc WHERE pc.platform_id=#{platformId}")
39 - List<PlatformCatalog> selectByPlatForm(String platformId); 40 + List<PlatformCatalog> selectByPlatForm(@Param("platformId") String platformId);
40 41
41 @Select("SELECT pc.* FROM wvp_platform_catalog pc WHERE pc.id = (SELECT pp.catalog_id from wvp_platform pp WHERE pp.server_gb_id=#{platformId})") 42 @Select("SELECT pc.* FROM wvp_platform_catalog pc WHERE pc.id = (SELECT pp.catalog_id from wvp_platform pp WHERE pp.server_gb_id=#{platformId})")
42 - PlatformCatalog selectDefaultByPlatFormId(String platformId); 43 + PlatformCatalog selectDefaultByPlatFormId(@Param("platformId") String platformId);
43 44
44 @Select("SELECT pc.id as channel_id, pc.name, pc.civil_code, pc.business_group_id,'1' as parental, pc.parent_id " + 45 @Select("SELECT pc.id as channel_id, pc.name, pc.civil_code, pc.business_group_id,'1' as parental, pc.parent_id " +
45 " from wvp_platform_catalog pc WHERE pc.platform_id=#{platformId}") 46 " from wvp_platform_catalog pc WHERE pc.platform_id=#{platformId}")
46 - List<DeviceChannel> queryCatalogInPlatform(String platformId); 47 + List<DeviceChannel> queryCatalogInPlatform(@Param("platformId") String platformId);
47 48
48 @Select("SELECT *, " + 49 @Select("SELECT *, " +
49 "(SELECT COUNT(1) from wvp_platform_catalog where parent_id = pc.id) as children_count " + 50 "(SELECT COUNT(1) from wvp_platform_catalog where parent_id = pc.id) as children_count " +
50 " from wvp_platform_catalog pc " + 51 " from wvp_platform_catalog pc " +
51 " WHERE pc.id=#{id} and pc.platform_id=#{platformId}") 52 " WHERE pc.id=#{id} and pc.platform_id=#{platformId}")
52 - PlatformCatalog selectByPlatFormAndCatalogId(String platformId, String id); 53 + PlatformCatalog selectByPlatFormAndCatalogId(@Param("platformId") String platformId, @Param("id") String id);
53 } 54 }
src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformChannelMapper.java
@@ -8,6 +8,7 @@ import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; @@ -8,6 +8,7 @@ import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
8 import org.apache.ibatis.annotations.Delete; 8 import org.apache.ibatis.annotations.Delete;
9 import org.apache.ibatis.annotations.Insert; 9 import org.apache.ibatis.annotations.Insert;
10 import org.apache.ibatis.annotations.Mapper; 10 import org.apache.ibatis.annotations.Mapper;
  11 +import org.apache.ibatis.annotations.Param;
11 import org.apache.ibatis.annotations.Select; 12 import org.apache.ibatis.annotations.Select;
12 import org.springframework.stereotype.Repository; 13 import org.springframework.stereotype.Repository;
13 14
@@ -24,7 +25,7 @@ public interface PlatformChannelMapper { @@ -24,7 +25,7 @@ public interface PlatformChannelMapper {
24 "SELECT device_channel_id from wvp_platform_gb_channel WHERE platform_id=#{platformId} AND device_channel_id in" + 25 "SELECT device_channel_id from wvp_platform_gb_channel WHERE platform_id=#{platformId} AND device_channel_id in" +
25 "<foreach collection='channelReduces' open='(' item='item' separator=',' close=')'> #{item.id}</foreach>" + 26 "<foreach collection='channelReduces' open='(' item='item' separator=',' close=')'> #{item.id}</foreach>" +
26 "</script>") 27 "</script>")
27 - List<Integer> findChannelRelatedPlatform(String platformId, List<ChannelReduce> channelReduces); 28 + List<Integer> findChannelRelatedPlatform(@Param("platformId") String platformId, @Param("channelReduces") List<ChannelReduce> channelReduces);
28 29
29 @Insert("<script> "+ 30 @Insert("<script> "+
30 "INSERT INTO wvp_platform_gb_channel (platform_id, device_channel_id, catalog_id) VALUES" + 31 "INSERT INTO wvp_platform_gb_channel (platform_id, device_channel_id, catalog_id) VALUES" +
@@ -32,13 +33,13 @@ public interface PlatformChannelMapper { @@ -32,13 +33,13 @@ public interface PlatformChannelMapper {
32 " (#{platformId}, #{item.id} , #{item.catalogId} )" + 33 " (#{platformId}, #{item.id} , #{item.catalogId} )" +
33 "</foreach>" + 34 "</foreach>" +
34 "</script>") 35 "</script>")
35 - int addChannels(String platformId, List<ChannelReduce> channelReducesToAdd); 36 + int addChannels(@Param("platformId") String platformId, @Param("channelReducesToAdd") List<ChannelReduce> channelReducesToAdd);
36 37
37 @Delete("<script> "+ 38 @Delete("<script> "+
38 "DELETE from wvp_platform_gb_channel WHERE platform_id=#{platformId} AND device_channel_id in" + 39 "DELETE from wvp_platform_gb_channel WHERE platform_id=#{platformId} AND device_channel_id in" +
39 "<foreach collection='channelReducesToDel' item='item' open='(' separator=',' close=')' > #{item.id}</foreach>" + 40 "<foreach collection='channelReducesToDel' item='item' open='(' separator=',' close=')' > #{item.id}</foreach>" +
40 "</script>") 41 "</script>")
41 - int delChannelForGB(String platformId, List<ChannelReduce> channelReducesToDel); 42 + int delChannelForGB(@Param("platformId") String platformId, @Param("channelReducesToDel") List<ChannelReduce> channelReducesToDel);
42 43
43 @Delete("<script> "+ 44 @Delete("<script> "+
44 "DELETE from wvp_platform_gb_channel WHERE device_channel_id in " + 45 "DELETE from wvp_platform_gb_channel WHERE device_channel_id in " +
@@ -55,27 +56,27 @@ public interface PlatformChannelMapper { @@ -55,27 +56,27 @@ public interface PlatformChannelMapper {
55 int cleanChannelForGB(String platformId); 56 int cleanChannelForGB(String platformId);
56 57
57 @Select("SELECT dc.* from wvp_platform_gb_channel pgc left join wvp_device_channel dc on dc.id = pgc.device_channel_id WHERE dc.channel_id=#{channelId} and pgc.platform_id=#{platformId}") 58 @Select("SELECT dc.* from wvp_platform_gb_channel pgc left join wvp_device_channel dc on dc.id = pgc.device_channel_id WHERE dc.channel_id=#{channelId} and pgc.platform_id=#{platformId}")
58 - List<DeviceChannel> queryChannelInParentPlatform(String platformId, String channelId); 59 + List<DeviceChannel> queryChannelInParentPlatform(@Param("platformId") String platformId, @Param("channelId") String channelId);
59 60
60 @Select("SELECT dc.* from wvp_platform_gb_channel pgc left join wvp_device_channel dc on dc.id = pgc.device_channel_id WHERE pgc.platform_id=#{platformId} and pgc.catalog_id=#{catalogId}") 61 @Select("SELECT dc.* from wvp_platform_gb_channel pgc left join wvp_device_channel dc on dc.id = pgc.device_channel_id WHERE pgc.platform_id=#{platformId} and pgc.catalog_id=#{catalogId}")
61 - List<DeviceChannel> queryAllChannelInCatalog(String platformId, String catalogId); 62 + List<DeviceChannel> queryAllChannelInCatalog(@Param("platformId") String platformId, @Param("catalogId") String catalogId);
62 63
63 @Select(" select dc.channel_id as id, dc.name as name, pgc.platform_id as platform_id, pgc.catalog_id as parent_id, 0 as children_count, 1 as type " + 64 @Select(" select dc.channel_id as id, dc.name as name, pgc.platform_id as platform_id, pgc.catalog_id as parent_id, 0 as children_count, 1 as type " +
64 " from wvp_device_channel dc left join wvp_platform_gb_channel pgc on dc.id = pgc.device_channel_id " + 65 " from wvp_device_channel dc left join wvp_platform_gb_channel pgc on dc.id = pgc.device_channel_id " +
65 " where pgc.platform_id=#{platformId} and pgc.catalog_id=#{catalogId}") 66 " where pgc.platform_id=#{platformId} and pgc.catalog_id=#{catalogId}")
66 - List<PlatformCatalog> queryChannelInParentPlatformAndCatalog(String platformId, String catalogId); 67 + List<PlatformCatalog> queryChannelInParentPlatformAndCatalog(@Param("platformId") String platformId, @Param("catalogId") String catalogId);
67 68
68 @Select("select d.*\n" + 69 @Select("select d.*\n" +
69 "from wvp_platform_gb_channel pgc\n" + 70 "from wvp_platform_gb_channel pgc\n" +
70 " left join wvp_device_channel dc on dc.id = pgc.device_channel_id\n" + 71 " left join wvp_device_channel dc on dc.id = pgc.device_channel_id\n" +
71 " left join wvp_device d on dc.device_id = d.device_id\n" + 72 " left join wvp_device d on dc.device_id = d.device_id\n" +
72 "where dc.channel_id = #{channelId} and pgc.platform_id=#{platformId}") 73 "where dc.channel_id = #{channelId} and pgc.platform_id=#{platformId}")
73 - List<Device> queryVideoDeviceByPlatformIdAndChannelId(String platformId, String channelId); 74 + List<Device> queryVideoDeviceByPlatformIdAndChannelId(@Param("platformId") String platformId, @Param("channelId") String channelId);
74 75
75 @Delete("<script> "+ 76 @Delete("<script> "+
76 "DELETE from wvp_platform_gb_channel WHERE platform_id=#{platformId} and catalog_id=#{id}" + 77 "DELETE from wvp_platform_gb_channel WHERE platform_id=#{platformId} and catalog_id=#{id}" +
77 "</script>") 78 "</script>")
78 - int delByCatalogId(String platformId, String id); 79 + int delByCatalogId(@Param("platformId") String platformId, @Param("id") String id);
79 80
80 @Delete("<script> "+ 81 @Delete("<script> "+
81 "DELETE from wvp_platform_gb_channel WHERE catalog_id=#{parentId} AND platform_id=#{platformId} AND channel_id=#{id}" + 82 "DELETE from wvp_platform_gb_channel WHERE catalog_id=#{parentId} AND platform_id=#{platformId} AND channel_id=#{id}" +
@@ -96,7 +97,7 @@ public interface PlatformChannelMapper { @@ -96,7 +97,7 @@ public interface PlatformChannelMapper {
96 "AND pp.server_gb_id IN" + 97 "AND pp.server_gb_id IN" +
97 "<foreach collection='platforms' item='item' open='(' separator=',' close=')' > #{item}</foreach>" + 98 "<foreach collection='platforms' item='item' open='(' separator=',' close=')' > #{item}</foreach>" +
98 "</script> ") 99 "</script> ")
99 - List<ParentPlatform> queryPlatFormListForGBWithGBId(String channelId, List<String> platforms); 100 + List<ParentPlatform> queryPlatFormListForGBWithGBId(@Param("channelId") String channelId, @Param("platforms") List<String> platforms);
100 101
101 @Delete("<script> " + 102 @Delete("<script> " +
102 "DELETE from wvp_platform_gb_channel WHERE platform_id=#{serverGBId}" + 103 "DELETE from wvp_platform_gb_channel WHERE platform_id=#{serverGBId}" +
@@ -106,14 +107,14 @@ public interface PlatformChannelMapper { @@ -106,14 +107,14 @@ public interface PlatformChannelMapper {
106 @Delete("<script> " + 107 @Delete("<script> " +
107 "DELETE from wvp_platform_gb_channel WHERE platform_id=#{platformId} and catalog_id=#{catalogId}" + 108 "DELETE from wvp_platform_gb_channel WHERE platform_id=#{platformId} and catalog_id=#{catalogId}" +
108 "</script>") 109 "</script>")
109 - int delChannelForGBByCatalogId(String platformId, String catalogId); 110 + int delChannelForGBByCatalogId(@Param("platformId") String platformId, @Param("catalogId") String catalogId);
110 111
111 @Select("select dc.channel_id dc.device_id,dc.name,d.manufacturer,d.model,d.firmware\n" + 112 @Select("select dc.channel_id dc.device_id,dc.name,d.manufacturer,d.model,d.firmware\n" +
112 "from wvp_platform_gb_channel pgc\n" + 113 "from wvp_platform_gb_channel pgc\n" +
113 " left join wvp_device_channel dc on dc.id = pgc.device_channel_id\n" + 114 " left join wvp_device_channel dc on dc.id = pgc.device_channel_id\n" +
114 " left join wvp_device d on dc.device_id = d.device_id\n" + 115 " left join wvp_device d on dc.device_id = d.device_id\n" +
115 "where dc.channel_id = #{channelId} and pgc.platform_id=#{platformId}") 116 "where dc.channel_id = #{channelId} and pgc.platform_id=#{platformId}")
116 - List<Device> queryDeviceInfoByPlatformIdAndChannelId(String platformId, String channelId); 117 + List<Device> queryDeviceInfoByPlatformIdAndChannelId(@Param("platformId") String platformId, @Param("channelId") String channelId);
117 118
118 @Select("SELECT pgc.platform_id from wvp_platform_gb_channel pgc left join wvp_device_channel dc on dc.id = pgc.device_channel_id WHERE dc.channel_id='${channelId}'") 119 @Select("SELECT pgc.platform_id from wvp_platform_gb_channel pgc left join wvp_device_channel dc on dc.id = pgc.device_channel_id WHERE dc.channel_id='${channelId}'")
119 List<String> queryParentPlatformByChannelId(String channelId); 120 List<String> queryParentPlatformByChannelId(String channelId);
src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformGbStreamMapper.java
@@ -32,7 +32,7 @@ public interface PlatformGbStreamMapper { @@ -32,7 +32,7 @@ public interface PlatformGbStreamMapper {
32 int batchAdd(List<StreamPushItem> streamPushItems); 32 int batchAdd(List<StreamPushItem> streamPushItems);
33 33
34 @Delete("DELETE from wvp_platform_gb_stream WHERE gb_stream_id = (select gb_stream_id from wvp_gb_stream where app=#{app} AND stream=#{stream})") 34 @Delete("DELETE from wvp_platform_gb_stream WHERE gb_stream_id = (select gb_stream_id from wvp_gb_stream where app=#{app} AND stream=#{stream})")
35 - int delByAppAndStream(String app, String stream); 35 + int delByAppAndStream(@Param("app") String app, @Param("stream") String stream);
36 36
37 @Delete("DELETE from wvp_platform_gb_stream WHERE platform_id=#{platformId}") 37 @Delete("DELETE from wvp_platform_gb_stream WHERE platform_id=#{platformId}")
38 int delByPlatformId(String platformId); 38 int delByPlatformId(String platformId);
@@ -46,26 +46,26 @@ public interface PlatformGbStreamMapper { @@ -46,26 +46,26 @@ public interface PlatformGbStreamMapper {
46 "WHERE " + 46 "WHERE " +
47 "gs.app =#{app} " + 47 "gs.app =#{app} " +
48 "AND gs.stream =#{stream} ") 48 "AND gs.stream =#{stream} ")
49 - List<ParentPlatform> selectByAppAndStream(String app, String stream); 49 + List<ParentPlatform> selectByAppAndStream(@Param("app") String app, @Param("stream") String stream);
50 50
51 @Select("SELECT pgs.*, gs.gb_id from wvp_platform_gb_stream pgs " + 51 @Select("SELECT pgs.*, gs.gb_id from wvp_platform_gb_stream pgs " +
52 "LEFT join wvp_gb_stream gs ON pgs.gb_stream_id = gs.gb_stream_id " + 52 "LEFT join wvp_gb_stream gs ON pgs.gb_stream_id = gs.gb_stream_id " +
53 "WHERE gs.app=#{app} AND gs.stream=#{stream} AND pgs.platform_id=#{platformId}") 53 "WHERE gs.app=#{app} AND gs.stream=#{stream} AND pgs.platform_id=#{platformId}")
54 - StreamProxyItem selectOne(String app, String stream, String platformId); 54 + StreamProxyItem selectOne(@Param("app") String app, @Param("stream") String stream, @Param("platformId") String platformId);
55 55
56 @Select("select gs.* \n" + 56 @Select("select gs.* \n" +
57 "from wvp_gb_stream gs\n" + 57 "from wvp_gb_stream gs\n" +
58 " left join wvp_platform_gb_stream pgs\n" + 58 " left join wvp_platform_gb_stream pgs\n" +
59 " on gs.gb_stream_id = pgs.gb_stream_id\n" + 59 " on gs.gb_stream_id = pgs.gb_stream_id\n" +
60 "where pgs.platform_id=#{platformId} and pgs.catalog_id=#{catalogId}") 60 "where pgs.platform_id=#{platformId} and pgs.catalog_id=#{catalogId}")
61 - List<GbStream> queryChannelInParentPlatformAndCatalog(String platformId, String catalogId); 61 + List<GbStream> queryChannelInParentPlatformAndCatalog(@Param("platformId") String platformId, @Param("catalogId") String catalogId);
62 62
63 @Select("select gs.gb_id as id, gs.name as name, pgs.platform_id as platform_id, pgs.catalog_id as catalog_id , 0 as children_count, 2 as type\n" + 63 @Select("select gs.gb_id as id, gs.name as name, pgs.platform_id as platform_id, pgs.catalog_id as catalog_id , 0 as children_count, 2 as type\n" +
64 "from wvp_gb_stream gs\n" + 64 "from wvp_gb_stream gs\n" +
65 " left join wvp_platform_gb_stream pgs\n" + 65 " left join wvp_platform_gb_stream pgs\n" +
66 " on gs.gb_stream_id = pgs.gb_stream_id\n" + 66 " on gs.gb_stream_id = pgs.gb_stream_id\n" +
67 "where pgs.platform_id=#{platformId} and pgs.catalog_id=#{catalogId}") 67 "where pgs.platform_id=#{platformId} and pgs.catalog_id=#{catalogId}")
68 - List<PlatformCatalog> queryChannelInParentPlatformAndCatalogForCatalog(String platformId, String catalogId); 68 + List<PlatformCatalog> queryChannelInParentPlatformAndCatalogForCatalog(@Param("platformId") String platformId, @Param("catalogId") String catalogId);
69 69
70 @Select("<script> " + 70 @Select("<script> " +
71 "SELECT " + 71 "SELECT " +
@@ -82,7 +82,7 @@ public interface PlatformGbStreamMapper { @@ -82,7 +82,7 @@ public interface PlatformGbStreamMapper {
82 "AND pp.server_gb_id IN" + 82 "AND pp.server_gb_id IN" +
83 "<foreach collection='platforms' item='item' open='(' separator=',' close=')' > #{item}</foreach>" + 83 "<foreach collection='platforms' item='item' open='(' separator=',' close=')' > #{item}</foreach>" +
84 "</script> ") 84 "</script> ")
85 - List<ParentPlatform> queryPlatFormListForGBWithGBId(String app, String stream, List<String> platforms); 85 + List<ParentPlatform> queryPlatFormListForGBWithGBId(@Param("app") String app, @Param("stream") String stream, @Param("platforms") List<String> platforms);
86 86
87 @Delete("DELETE from wvp_platform_gb_stream WHERE gb_stream_id = (select id from wvp_gb_stream where app=#{app} AND stream=#{stream}) AND platform_id=#{platformId}") 87 @Delete("DELETE from wvp_platform_gb_stream WHERE gb_stream_id = (select id from wvp_gb_stream where app=#{app} AND stream=#{stream}) AND platform_id=#{platformId}")
88 int delByAppAndStreamAndPlatform(String app, String stream, String platformId); 88 int delByAppAndStreamAndPlatform(String app, String stream, String platformId);
@@ -101,8 +101,8 @@ public interface PlatformGbStreamMapper { @@ -101,8 +101,8 @@ public interface PlatformGbStreamMapper {
101 "#{item.gbStreamId} " + 101 "#{item.gbStreamId} " +
102 "</foreach>" + 102 "</foreach>" +
103 "</script>") 103 "</script>")
104 - void delByAppAndStreamsByPlatformId(List<GbStream> gbStreams, String platformId); 104 + void delByAppAndStreamsByPlatformId(@Param("gbStreams") List<GbStream> gbStreams, @Param("platformId") String platformId);
105 105
106 @Delete("DELETE from wvp_platform_gb_stream WHERE platform_id=#{platformId} and catalog_id=#{catalogId}") 106 @Delete("DELETE from wvp_platform_gb_stream WHERE platform_id=#{platformId} and catalog_id=#{catalogId}")
107 - int delByPlatformAndCatalogId(String platformId, String catalogId); 107 + int delByPlatformAndCatalogId(@Param("platformId") String platformId, @Param("catalogId") String catalogId);
108 } 108 }
src/main/java/com/genersoft/iot/vmp/storager/dao/StreamProxyMapper.java
@@ -49,12 +49,12 @@ public interface StreamProxyMapper { @@ -49,12 +49,12 @@ public interface StreamProxyMapper {
49 List<StreamProxyItem> selectForEnable(boolean enable); 49 List<StreamProxyItem> selectForEnable(boolean enable);
50 50
51 @Select("SELECT st.*, pgs.gb_id, pgs.name, pgs.longitude, pgs.latitude FROM wvp_stream_proxy st LEFT join wvp_gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream WHERE st.app=#{app} AND st.stream=#{stream} order by st.create_time desc") 51 @Select("SELECT st.*, pgs.gb_id, pgs.name, pgs.longitude, pgs.latitude FROM wvp_stream_proxy st LEFT join wvp_gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream WHERE st.app=#{app} AND st.stream=#{stream} order by st.create_time desc")
52 - StreamProxyItem selectOne(String app, String stream); 52 + StreamProxyItem selectOne(@Param("app") String app, @Param("stream") String stream);
53 53
54 @Select("SELECT st.*, pgs.gb_id, pgs.name, pgs.longitude, pgs.latitude FROM wvp_stream_proxy st " + 54 @Select("SELECT st.*, pgs.gb_id, pgs.name, pgs.longitude, pgs.latitude FROM wvp_stream_proxy st " +
55 "LEFT join wvp_gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream " + 55 "LEFT join wvp_gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream " +
56 "WHERE st.enable=#{enable} and st.media_server_id= #{id} order by st.create_time desc") 56 "WHERE st.enable=#{enable} and st.media_server_id= #{id} order by st.create_time desc")
57 - List<StreamProxyItem> selectForEnableInMediaServer(String id, boolean enable); 57 + List<StreamProxyItem> selectForEnableInMediaServer( @Param("id") String id, @Param("enable") boolean enable);
58 58
59 @Select("SELECT st.*, pgs.gb_id, pgs.name, pgs.longitude, pgs.latitude FROM wvp_stream_proxy st " + 59 @Select("SELECT st.*, pgs.gb_id, pgs.name, pgs.longitude, pgs.latitude FROM wvp_stream_proxy st " +
60 "LEFT join wvp_gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream " + 60 "LEFT join wvp_gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream " +
@@ -64,12 +64,12 @@ public interface StreamProxyMapper { @@ -64,12 +64,12 @@ public interface StreamProxyMapper {
64 @Update("UPDATE wvp_stream_proxy " + 64 @Update("UPDATE wvp_stream_proxy " +
65 "SET status=#{status} " + 65 "SET status=#{status} " +
66 "WHERE media_server_id=#{mediaServerId}") 66 "WHERE media_server_id=#{mediaServerId}")
67 - void updateStatusByMediaServerId(String mediaServerId, boolean status); 67 + void updateStatusByMediaServerId(@Param("mediaServerId") String mediaServerId, @Param("status") boolean status);
68 68
69 @Update("UPDATE wvp_stream_proxy " + 69 @Update("UPDATE wvp_stream_proxy " +
70 "SET status=#{status} " + 70 "SET status=#{status} " +
71 "WHERE app=#{app} AND stream=#{stream}") 71 "WHERE app=#{app} AND stream=#{stream}")
72 - int updateStatus(String app, String stream, boolean status); 72 + int updateStatus(@Param("app") String app, @Param("stream") String stream, @Param("status") boolean status);
73 73
74 @Delete("DELETE FROM wvp_stream_proxy WHERE enable_remove_none_reader=true AND media_server_id=#{mediaServerId}") 74 @Delete("DELETE FROM wvp_stream_proxy WHERE enable_remove_none_reader=true AND media_server_id=#{mediaServerId}")
75 void deleteAutoRemoveItemByMediaServerId(String mediaServerId); 75 void deleteAutoRemoveItemByMediaServerId(String mediaServerId);
src/main/java/com/genersoft/iot/vmp/storager/dao/StreamPushMapper.java
@@ -79,13 +79,13 @@ public interface StreamPushMapper { @@ -79,13 +79,13 @@ public interface StreamPushMapper {
79 " <if test='mediaServerId != null' > AND st.media_server_id=#{mediaServerId} </if>" + 79 " <if test='mediaServerId != null' > AND st.media_server_id=#{mediaServerId} </if>" +
80 "order by st.create_time desc" + 80 "order by st.create_time desc" +
81 " </script>"}) 81 " </script>"})
82 - List<StreamPushItem> selectAllForList(String query, Boolean pushing, String mediaServerId); 82 + List<StreamPushItem> selectAllForList(@Param("query") String query, @Param("pushing") Boolean pushing, @Param("mediaServerId") String mediaServerId);
83 83
84 @Select("SELECT st.*, gs.gb_id, gs.name, gs.longitude, gs.latitude FROM wvp_stream_push st LEFT join wvp_gb_stream gs on st.app = gs.app AND st.stream = gs.stream order by st.create_time desc") 84 @Select("SELECT st.*, gs.gb_id, gs.name, gs.longitude, gs.latitude FROM wvp_stream_push st LEFT join wvp_gb_stream gs on st.app = gs.app AND st.stream = gs.stream order by st.create_time desc")
85 List<StreamPushItem> selectAll(); 85 List<StreamPushItem> selectAll();
86 86
87 @Select("SELECT st.*, gs.gb_id, gs.name, gs.longitude, gs.latitude FROM wvp_stream_push st LEFT join wvp_gb_stream gs on st.app = gs.app AND st.stream = gs.stream WHERE st.app=#{app} AND st.stream=#{stream}") 87 @Select("SELECT st.*, gs.gb_id, gs.name, gs.longitude, gs.latitude FROM wvp_stream_push st LEFT join wvp_gb_stream gs on st.app = gs.app AND st.stream = gs.stream WHERE st.app=#{app} AND st.stream=#{stream}")
88 - StreamPushItem selectOne(String app, String stream); 88 + StreamPushItem selectOne(@Param("app") String app, @Param("stream") String stream);
89 89
90 @Insert("<script>" + 90 @Insert("<script>" +
91 "Insert INTO wvp_stream_push (app, stream, total_reader_count, origin_type, origin_type_str, " + 91 "Insert INTO wvp_stream_push (app, stream, total_reader_count, origin_type, origin_type_str, " +
@@ -122,17 +122,17 @@ public interface StreamPushMapper { @@ -122,17 +122,17 @@ public interface StreamPushMapper {
122 @Update("UPDATE wvp_stream_push " + 122 @Update("UPDATE wvp_stream_push " +
123 "SET status=#{status} " + 123 "SET status=#{status} " +
124 "WHERE app=#{app} AND stream=#{stream}") 124 "WHERE app=#{app} AND stream=#{stream}")
125 - int updateStatus(String app, String stream, boolean status); 125 + int updateStatus(@Param("app") String app, @Param("stream") String stream, @Param("status") boolean status);
126 126
127 @Update("UPDATE wvp_stream_push " + 127 @Update("UPDATE wvp_stream_push " +
128 "SET push_ing=#{pushIng} " + 128 "SET push_ing=#{pushIng} " +
129 "WHERE app=#{app} AND stream=#{stream}") 129 "WHERE app=#{app} AND stream=#{stream}")
130 - int updatePushStatus(String app, String stream, boolean pushIng); 130 + int updatePushStatus(@Param("app") String app, @Param("stream") String stream, @Param("pushIng") boolean pushIng);
131 131
132 @Update("UPDATE wvp_stream_push " + 132 @Update("UPDATE wvp_stream_push " +
133 "SET status=#{status} " + 133 "SET status=#{status} " +
134 "WHERE media_server_id=#{mediaServerId}") 134 "WHERE media_server_id=#{mediaServerId}")
135 - void updateStatusByMediaServerId(String mediaServerId, boolean status); 135 + void updateStatusByMediaServerId(@Param("mediaServerId") String mediaServerId, @Param("status") boolean status);
136 136
137 137
138 @Select("<script> "+ 138 @Select("<script> "+
src/main/java/com/genersoft/iot/vmp/storager/dao/UserMapper.java
@@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.storager.dao; @@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.storager.dao;
2 2
3 import com.genersoft.iot.vmp.storager.dao.dto.User; 3 import com.genersoft.iot.vmp.storager.dao.dto.User;
4 import org.apache.ibatis.annotations.*; 4 import org.apache.ibatis.annotations.*;
  5 +import org.apache.ibatis.annotations.Param;
5 import org.springframework.stereotype.Repository; 6 import org.springframework.stereotype.Repository;
6 7
7 import java.util.List; 8 import java.util.List;
@@ -36,7 +37,7 @@ public interface UserMapper { @@ -36,7 +37,7 @@ public interface UserMapper {
36 @Result(column = "role_create_time", property = "role.createTime"), 37 @Result(column = "role_create_time", property = "role.createTime"),
37 @Result(column = "role_update_time", property = "role.updateTime") 38 @Result(column = "role_update_time", property = "role.updateTime")
38 }) 39 })
39 - User select(String username, String password); 40 + User select(@Param("username") String username, @Param("password") String password);
40 41
41 @Select("select u.*, r.id as role_id, r.name as role_name, r.authority as role_authority , r.create_time as role_create_time , r.update_time as role_update_time from wvp_user u, wvp_user_role r WHERE u.role_id=r.id and u.id=#{id}") 42 @Select("select u.*, r.id as role_id, r.name as role_name, r.authority as role_authority , r.create_time as role_create_time , r.update_time as role_update_time from wvp_user u, wvp_user_role r WHERE u.role_id=r.id and u.id=#{id}")
42 @ResultMap(value="roleMap") 43 @ResultMap(value="roleMap")
@@ -55,5 +56,5 @@ public interface UserMapper { @@ -55,5 +56,5 @@ public interface UserMapper {
55 List<User> getUsers(); 56 List<User> getUsers();
56 57
57 @Update("UPDATE wvp_user set push_key=#{pushKey} where id=#{id}") 58 @Update("UPDATE wvp_user set push_key=#{pushKey} where id=#{id}")
58 - int changePushKey(int id, String pushKey); 59 + int changePushKey(@Param("id") int id, @Param("pushKey") String pushKey);
59 } 60 }