Merge pull request #1733 from QianNangong/fix_gb_status
修复级联状态推成 0 和 1 而不是 ON 和 OFF 的问题pull/1734/head
commit
dea05b46d3
|
@ -152,7 +152,7 @@ public interface CommonGBChannelMapper {
|
|||
" SET gb_status = #{status}" +
|
||||
" WHERE id = #{gbId}"+
|
||||
" </script>"})
|
||||
int updateStatusById(@Param("gbId") int gbId, @Param("status") int status);
|
||||
int updateStatusById(@Param("gbId") int gbId, @Param("status") String status);
|
||||
|
||||
@Update("<script> " +
|
||||
"<foreach collection='commonGBChannels' index='index' item='item' separator=';'> " +
|
||||
|
|
|
@ -131,7 +131,7 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
|||
log.warn("[通道离线] 未找到数据库ID,更新失败, {}({})", commonGBChannel.getGbName(), commonGBChannel.getGbDeviceId());
|
||||
return 0;
|
||||
}
|
||||
int result = commonGBChannelMapper.updateStatusById(commonGBChannel.getGbId(), 0);
|
||||
int result = commonGBChannelMapper.updateStatusById(commonGBChannel.getGbId(), "OFF");
|
||||
if (result > 0) {
|
||||
try {
|
||||
// 发送通知
|
||||
|
@ -185,7 +185,7 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
|||
log.warn("[通道上线] 未找到数据库ID,更新失败, {}({})", commonGBChannel.getGbName(), commonGBChannel.getGbDeviceId());
|
||||
return 0;
|
||||
}
|
||||
int result = commonGBChannelMapper.updateStatusById(commonGBChannel.getGbId(), 1);
|
||||
int result = commonGBChannelMapper.updateStatusById(commonGBChannel.getGbId(), "ON");
|
||||
if (result > 0) {
|
||||
try {
|
||||
// 发送通知
|
||||
|
|
Loading…
Reference in New Issue