Merge branch 'master' into dev/数据库统合

master
648540858 2024-12-27 15:31:27 +08:00
commit 7751eae913
2 changed files with 3 additions and 3 deletions

View File

@ -152,7 +152,7 @@ public interface CommonGBChannelMapper {
" SET gb_status = #{status}" + " SET gb_status = #{status}" +
" WHERE id = #{gbId}"+ " WHERE id = #{gbId}"+
" </script>"}) " </script>"})
int updateStatusById(@Param("gbId") int gbId, @Param("status") int status); int updateStatusById(@Param("gbId") int gbId, @Param("status") String status);
@Update("<script> " + @Update("<script> " +
"<foreach collection='commonGBChannels' index='index' item='item' separator=';'> " + "<foreach collection='commonGBChannels' index='index' item='item' separator=';'> " +

View File

@ -140,7 +140,7 @@ public class GbChannelServiceImpl implements IGbChannelService {
log.warn("[通道离线] 未找到数据库ID更新失败 {}({})", commonGBChannel.getGbName(), commonGBChannel.getGbDeviceId()); log.warn("[通道离线] 未找到数据库ID更新失败 {}({})", commonGBChannel.getGbName(), commonGBChannel.getGbDeviceId());
return 0; return 0;
} }
int result = commonGBChannelMapper.updateStatusById(commonGBChannel.getGbId(), 0); int result = commonGBChannelMapper.updateStatusById(commonGBChannel.getGbId(), "OFF");
if (result > 0) { if (result > 0) {
try { try {
// 发送通知 // 发送通知
@ -194,7 +194,7 @@ public class GbChannelServiceImpl implements IGbChannelService {
log.warn("[通道上线] 未找到数据库ID更新失败 {}({})", commonGBChannel.getGbName(), commonGBChannel.getGbDeviceId()); log.warn("[通道上线] 未找到数据库ID更新失败 {}({})", commonGBChannel.getGbName(), commonGBChannel.getGbDeviceId());
return 0; return 0;
} }
int result = commonGBChannelMapper.updateStatusById(commonGBChannel.getGbId(), 1); int result = commonGBChannelMapper.updateStatusById(commonGBChannel.getGbId(), "ON");
if (result > 0) { if (result > 0) {
try { try {
// 发送通知 // 发送通知