临时提交
This commit is contained in:
@@ -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>" +
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -166,7 +166,7 @@ public class GroupServiceImpl implements IGroupService {
|
||||
|
||||
@Override
|
||||
public Group queryGroupByDeviceId(String regionDeviceId) {
|
||||
return null;
|
||||
return groupManager.queryOneByOnlyDeviceId(regionDeviceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user