临时提交

This commit is contained in:
lin
2025-10-15 18:25:42 +08:00
parent b135014aed
commit 83bba5d380
9 changed files with 148 additions and 88 deletions

View File

@@ -110,6 +110,9 @@ public interface GroupMapper {
@Select("SELECT * from wvp_common_group WHERE device_id = #{deviceId} and business_group = #{businessGroup}")
Group queryOneByDeviceId(@Param("deviceId") String deviceId, @Param("businessGroup") String businessGroup);
@Select("SELECT * from wvp_common_group WHERE device_id = #{deviceId}")
Group queryOneByOnlyDeviceId(@Param("deviceId") String deviceId);
@Delete("<script>" +
" DELETE FROM wvp_common_group WHERE id in " +
" <foreach collection='allChildren' item='item' open='(' separator=',' close=')' > #{item.id}</foreach>" +

View File

@@ -23,7 +23,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import java.util.ArrayList;
@@ -548,7 +547,10 @@ public class GbChannelServiceImpl implements IGbChannelService {
@Override
public void updateBusinessGroup(String oldBusinessGroup, String newBusinessGroup) {
List<CommonGBChannel> channelList = commonGBChannelMapper.queryByBusinessGroup(oldBusinessGroup);
Assert.notEmpty(channelList, "旧的业务分组的通道不存在");
if (channelList.isEmpty()) {
log.info("[更新业务分组] 发现未关联任何通道: {}", oldBusinessGroup);
return;
}
int result = commonGBChannelMapper.updateBusinessGroupByChannelList(newBusinessGroup, channelList);
if (result > 0) {

View File

@@ -166,7 +166,7 @@ public class GroupServiceImpl implements IGroupService {
@Override
public Group queryGroupByDeviceId(String regionDeviceId) {
return null;
return groupManager.queryOneByOnlyDeviceId(regionDeviceId);
}
@Override