实现目录订阅的相关接口
parent
31ab6eb174
commit
36c641c467
|
@ -286,9 +286,6 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
||||||
ArrayList<DeviceChannel> deviceChannels = new ArrayList<>(addChannelMap.values());
|
ArrayList<DeviceChannel> deviceChannels = new ArrayList<>(addChannelMap.values());
|
||||||
addChannelMap.clear();
|
addChannelMap.clear();
|
||||||
deviceChannelService.batchAddChannel(deviceChannels);
|
deviceChannelService.batchAddChannel(deviceChannels);
|
||||||
if (device.isAutoSyncChannel()) {
|
|
||||||
commonGbChannelService.addChannelFromGb28181DeviceInList(device, deviceChannels);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,9 +302,6 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
||||||
private void executeSaveForOnline(Device device){
|
private void executeSaveForOnline(Device device){
|
||||||
if (!updateChannelOnlineList.isEmpty()) {
|
if (!updateChannelOnlineList.isEmpty()) {
|
||||||
deviceChannelService.channelsOnline(updateChannelOnlineList);
|
deviceChannelService.channelsOnline(updateChannelOnlineList);
|
||||||
if (device.isAutoSyncChannel()) {
|
|
||||||
commonGbChannelService.channelsOnlineFromList(deleteChannelList);
|
|
||||||
}
|
|
||||||
updateChannelOnlineList.clear();
|
updateChannelOnlineList.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -315,9 +309,6 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
||||||
private void executeSaveForOffline(Device device){
|
private void executeSaveForOffline(Device device){
|
||||||
if (!updateChannelOfflineList.isEmpty()) {
|
if (!updateChannelOfflineList.isEmpty()) {
|
||||||
deviceChannelService.channelsOffline(updateChannelOfflineList);
|
deviceChannelService.channelsOffline(updateChannelOfflineList);
|
||||||
if (device.isAutoSyncChannel()) {
|
|
||||||
commonGbChannelService.channelsOfflineFromList(deleteChannelList);
|
|
||||||
}
|
|
||||||
updateChannelOfflineList.clear();
|
updateChannelOfflineList.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,25 +22,12 @@ public interface ICommonGbChannelService {
|
||||||
|
|
||||||
int add(CommonGbChannel channel);
|
int add(CommonGbChannel channel);
|
||||||
|
|
||||||
int delete(String channelId);
|
|
||||||
|
|
||||||
int update(CommonGbChannel channel);
|
int update(CommonGbChannel channel);
|
||||||
|
|
||||||
boolean checkChannelInPlatform(String channelId, String platformServerId);
|
|
||||||
|
|
||||||
PageInfo<CommonGbChannel> getChannelsInRegion(String regionDeviceId, String query, int page, int count);
|
PageInfo<CommonGbChannel> getChannelsInRegion(String regionDeviceId, String query, int page, int count);
|
||||||
|
|
||||||
List<CommonGbChannel> getChannelsInBusinessGroup(String businessGroupID);
|
|
||||||
|
|
||||||
void updateChannelFromGb28181DeviceInList(Device device, List<DeviceChannel> deviceChannels);
|
|
||||||
|
|
||||||
void addChannelFromGb28181DeviceInList(Device device, List<DeviceChannel> deviceChannels);
|
|
||||||
|
|
||||||
void deleteGbChannelsFromList(List<DeviceChannel> deleteChannelList);
|
void deleteGbChannelsFromList(List<DeviceChannel> deleteChannelList);
|
||||||
|
|
||||||
void channelsOnlineFromList(List<DeviceChannel> deleteChannelList);
|
|
||||||
|
|
||||||
void channelsOfflineFromList(List<DeviceChannel> deleteChannelList);
|
|
||||||
|
|
||||||
PageInfo<CommonGbChannel> queryChannelListInGroup(int page, int count, String query, String groupDeviceId,
|
PageInfo<CommonGbChannel> queryChannelListInGroup(int page, int count, String query, String groupDeviceId,
|
||||||
String regionDeviceId, Boolean inGroup, Boolean inRegion,
|
String regionDeviceId, Boolean inGroup, Boolean inRegion,
|
||||||
|
|
|
@ -1,35 +1,23 @@
|
||||||
package com.genersoft.iot.vmp.service.impl;
|
package com.genersoft.iot.vmp.service.impl;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.common.BatchLimit;
|
import com.genersoft.iot.vmp.common.BatchLimit;
|
||||||
import com.genersoft.iot.vmp.common.CivilCodePo;
|
|
||||||
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
||||||
import com.genersoft.iot.vmp.conf.CivilCodeFileConf;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||||
import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEventType;
|
import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEventType;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
|
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
|
||||||
import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
|
import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
|
||||||
import com.genersoft.iot.vmp.service.*;
|
import com.genersoft.iot.vmp.service.*;
|
||||||
import com.genersoft.iot.vmp.service.bean.*;
|
import com.genersoft.iot.vmp.service.bean.*;
|
||||||
import com.genersoft.iot.vmp.storager.dao.CommonChannelMapper;
|
import com.genersoft.iot.vmp.storager.dao.CommonChannelMapper;
|
||||||
import com.genersoft.iot.vmp.storager.dao.DeviceChannelMapper;
|
|
||||||
import com.genersoft.iot.vmp.storager.dao.GroupMapper;
|
|
||||||
import com.genersoft.iot.vmp.storager.dao.RegionMapper;
|
|
||||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
|
||||||
import com.genersoft.iot.vmp.vmanager.bean.UpdateCommonChannelToGroup;
|
import com.genersoft.iot.vmp.vmanager.bean.UpdateCommonChannelToGroup;
|
||||||
import com.genersoft.iot.vmp.vmanager.bean.UpdateCommonChannelToRegion;
|
import com.genersoft.iot.vmp.vmanager.bean.UpdateCommonChannelToRegion;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.TransactionDefinition;
|
|
||||||
import org.springframework.transaction.TransactionStatus;
|
|
||||||
|
|
||||||
import javax.sip.InvalidArgumentException;
|
import javax.sip.InvalidArgumentException;
|
||||||
import javax.sip.SipException;
|
import javax.sip.SipException;
|
||||||
|
@ -44,24 +32,6 @@ public class CommonGbChannelServiceImpl implements ICommonGbChannelService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private CommonChannelMapper commonGbChannelMapper;
|
private CommonChannelMapper commonGbChannelMapper;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private DeviceChannelMapper deviceChannelMapper;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private GroupMapper groupMapper;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private RegionMapper regionMapper;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private DataSourceTransactionManager dataSourceTransactionManager;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private TransactionDefinition transactionDefinition;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private CivilCodeFileConf civilCodeFileConf;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPlatformService platformService;
|
private IPlatformService platformService;
|
||||||
|
|
||||||
|
@ -114,25 +84,19 @@ public class CommonGbChannelServiceImpl implements ICommonGbChannelService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void sendCatalogEvent(CommonGbChannel channel, CatalogEventType catalogEventType) {
|
||||||
|
List<CommonGbChannel> commonGbChannelList = new ArrayList<>();
|
||||||
|
commonGbChannelList.add(channel);
|
||||||
|
sendCatalogEvent(commonGbChannelList, catalogEventType);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(CommonGbChannel channel) {
|
public int add(CommonGbChannel channel) {
|
||||||
int result = commonGbChannelMapper.add(channel);
|
int result = commonGbChannelMapper.add(channel);
|
||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
List<CommonGbChannel> channelList = new ArrayList<>();
|
sendCatalogEvent(channel, CatalogEventType.ADD);
|
||||||
sendCatalogEvent(channelList, CatalogEventType.ADD);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int delete(String channelId) {
|
|
||||||
int result = commonGbChannelMapper.deleteByDeviceID(channelId);
|
|
||||||
if (result == 0) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
List<CommonGbChannel> channelList = new ArrayList<>();
|
|
||||||
sendCatalogEvent(channelList, CatalogEventType.DEL);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,31 +109,10 @@ public class CommonGbChannelServiceImpl implements ICommonGbChannelService {
|
||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
List<CommonGbChannel> channelList = new ArrayList<>();
|
sendCatalogEvent(channel, CatalogEventType.UPDATE);
|
||||||
sendCatalogEvent(channelList, CatalogEventType.UPDATE);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkChannelInPlatform(String channelId, String platformServerId) {
|
|
||||||
return commonGbChannelMapper.checkChannelInPlatform(channelId, platformServerId) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<CommonGbChannel> getChannelsInBusinessGroup(String businessGroupID) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateChannelFromGb28181DeviceInList(Device device, List<DeviceChannel> deviceChannels) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addChannelFromGb28181DeviceInList(Device device, List<DeviceChannel> deviceChannels) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteGbChannelsFromList(List<DeviceChannel> channelList) {
|
public void deleteGbChannelsFromList(List<DeviceChannel> channelList) {
|
||||||
if (channelList.isEmpty()) {
|
if (channelList.isEmpty()) {
|
||||||
|
@ -183,16 +126,6 @@ public class CommonGbChannelServiceImpl implements ICommonGbChannelService {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void channelsOnlineFromList(List<DeviceChannel> channelList) {
|
|
||||||
commonGbChannelMapper.channelsOnlineFromList(channelList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void channelsOfflineFromList(List<DeviceChannel> channelList) {
|
|
||||||
commonGbChannelMapper.channelsOfflineFromList(channelList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<CommonGbChannel> getChannelsInRegion(String regionDeviceId, String query, int page, int count) {
|
public PageInfo<CommonGbChannel> getChannelsInRegion(String regionDeviceId, String query, int page, int count) {
|
||||||
assert regionDeviceId != null;
|
assert regionDeviceId != null;
|
||||||
|
@ -350,45 +283,65 @@ public class CommonGbChannelServiceImpl implements ICommonGbChannelService {
|
||||||
if (channelsForDelete.isEmpty()) {
|
if (channelsForDelete.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
List<CommonGbChannel> channelList = commonGbChannelMapper.queryInIdList(channelsForDelete);
|
||||||
|
if (channelList.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (channelsForDelete.size() > BatchLimit.count) {
|
if (channelsForDelete.size() > BatchLimit.count) {
|
||||||
for (int i = 0; i < channelsForDelete.size(); i += BatchLimit.count) {
|
for (int i = 0; i < channelsForDelete.size(); i += BatchLimit.count) {
|
||||||
int toIndex = i + BatchLimit.count;
|
int toIndex = i + BatchLimit.count;
|
||||||
if (i + BatchLimit.count > channelsForDelete.size()) {
|
if (i + BatchLimit.count > channelsForDelete.size()) {
|
||||||
toIndex = channelsForDelete.size();
|
toIndex = channelsForDelete.size();
|
||||||
}
|
}
|
||||||
if (commonGbChannelMapper.batchDelete(channelsForDelete.subList(i, toIndex)) < 0) {
|
if (commonGbChannelMapper.batchDelete(channelList.subList(i, toIndex)) < 0) {
|
||||||
throw new RuntimeException("batch update commonGbChannel fail");
|
throw new RuntimeException("batch update commonGbChannel fail");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
if (commonGbChannelMapper.batchDelete(channelsForDelete) < 0) {
|
if (commonGbChannelMapper.batchDelete(channelList) < 0) {
|
||||||
throw new RuntimeException("batch update commonGbChannel fail");
|
throw new RuntimeException("batch update commonGbChannel fail");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO 向国标级联发送catalog
|
sendCatalogEvent(channelList, CatalogEventType.DEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteById(int commonGbChannelId) {
|
public void deleteById(int commonGbChannelId) {
|
||||||
|
CommonGbChannel commonGbChannel = commonGbChannelMapper.getOne(commonGbChannelId);
|
||||||
|
if (commonGbChannel == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
commonGbChannelMapper.delete(commonGbChannelId);
|
commonGbChannelMapper.delete(commonGbChannelId);
|
||||||
// TODO 向国标级联发送catalog
|
sendCatalogEvent(commonGbChannel, CatalogEventType.DEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteByIdList(List<Integer> commonChannelIdList) {
|
public void deleteByIdList(List<Integer> commonChannelIdList) {
|
||||||
commonGbChannelMapper.deleteByIdList(commonChannelIdList);
|
List<CommonGbChannel> commonGbChannelList = commonGbChannelMapper.queryInIdList(commonChannelIdList);
|
||||||
// TODO 向国标级联发送catalog
|
if (commonGbChannelList.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
commonGbChannelMapper.batchDelete(commonGbChannelList);
|
||||||
|
sendCatalogEvent(commonGbChannelList, CatalogEventType.DEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void offlineForList(List<Integer> onlinePushers) {
|
public void offlineForList(List<Integer> commonChannelIdList) {
|
||||||
|
List<CommonGbChannel> commonGbChannelList = commonGbChannelMapper.queryInIdList(commonChannelIdList);
|
||||||
|
if (commonGbChannelList.isEmpty()) {
|
||||||
// TODO 向国标级联发送catalog
|
return;
|
||||||
|
}
|
||||||
|
commonGbChannelMapper.channelsOfflineFromList(commonGbChannelList);
|
||||||
|
sendCatalogEvent(commonGbChannelList, CatalogEventType.OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onlineForList(List<Integer> commonChannelIdList) {
|
public void onlineForList(List<Integer> commonChannelIdList) {
|
||||||
// TODO 向国标级联发送catalog
|
List<CommonGbChannel> commonGbChannelList = commonGbChannelMapper.queryInIdList(commonChannelIdList);
|
||||||
|
if (commonGbChannelList.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
commonGbChannelMapper.channelsOnlineFromList(commonGbChannelList);
|
||||||
|
sendCatalogEvent(commonGbChannelList, CatalogEventType.ON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,11 +240,25 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int channelsOnline(List<DeviceChannel> channels) {
|
public int channelsOnline(List<DeviceChannel> channels) {
|
||||||
|
List<Integer> ids = new ArrayList<>();
|
||||||
|
for (DeviceChannel channel : channels) {
|
||||||
|
ids.add(channel.getCommonGbChannelId());
|
||||||
|
}
|
||||||
|
if (!ids.isEmpty()) {
|
||||||
|
commonGbChannelService.onlineForList(ids);
|
||||||
|
}
|
||||||
return channelMapper.batchOnline(channels);
|
return channelMapper.batchOnline(channels);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int channelsOffline(List<DeviceChannel> channels) {
|
public int channelsOffline(List<DeviceChannel> channels) {
|
||||||
|
List<Integer> ids = new ArrayList<>();
|
||||||
|
for (DeviceChannel channel : channels) {
|
||||||
|
ids.add(channel.getCommonGbChannelId());
|
||||||
|
}
|
||||||
|
if (!ids.isEmpty()) {
|
||||||
|
commonGbChannelService.offlineForList(ids);
|
||||||
|
}
|
||||||
return channelMapper.batchOffline(channels);
|
return channelMapper.batchOffline(channels);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +293,6 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||||
commonGbChannelList.add(CommonGbChannel.getInstance(null, channel));
|
commonGbChannelList.add(CommonGbChannel.getInstance(null, channel));
|
||||||
});
|
});
|
||||||
commonGbChannelService.batchAdd(commonGbChannelList);
|
commonGbChannelService.batchAdd(commonGbChannelList);
|
||||||
|
|
||||||
channelMapper.batchAdd(channels);
|
channelMapper.batchAdd(channels);
|
||||||
for (DeviceChannel channel : channels) {
|
for (DeviceChannel channel : channels) {
|
||||||
if (channel.getParentId() != null) {
|
if (channel.getParentId() != null) {
|
||||||
|
|
|
@ -295,16 +295,16 @@ public interface CommonChannelMapper {
|
||||||
|
|
||||||
@Update("<script> "+
|
@Update("<script> "+
|
||||||
"UPDATE wvp_common_channel SET commonGbStatus = true WHERE common_gb_id in" +
|
"UPDATE wvp_common_channel SET commonGbStatus = true WHERE common_gb_id in" +
|
||||||
"<foreach collection='channelList' item='item' open='(' separator=',' close=')' > #{item.commonGbChannelId}</foreach>" +
|
"<foreach collection='channelList' item='item' open='(' separator=',' close=')' > #{item.commonGbId}</foreach>" +
|
||||||
"</script>")
|
"</script>")
|
||||||
void channelsOnlineFromList(List<DeviceChannel> channelList);
|
void channelsOnlineFromList(List<CommonGbChannel> channelList);
|
||||||
|
|
||||||
|
|
||||||
@Update("<script> "+
|
@Update("<script> "+
|
||||||
"UPDATE wvp_common_channel SET commonGbStatus = false WHERE common_gb_id in" +
|
"UPDATE wvp_common_channel SET commonGbStatus = false WHERE common_gb_id in" +
|
||||||
"<foreach collection='channelList' item='item' open='(' separator=',' close=')' > #{item.commonGbChannelId}</foreach>" +
|
"<foreach collection='channelList' item='item' open='(' separator=',' close=')' > #{item.commonGbId}</foreach>" +
|
||||||
"</script>")
|
"</script>")
|
||||||
void channelsOfflineFromList(List<DeviceChannel> channelList);
|
void channelsOfflineFromList(List<CommonGbChannel> channelList);
|
||||||
|
|
||||||
@Update("<script> "+
|
@Update("<script> "+
|
||||||
"UPDATE wvp_common_channel SET common_gb_parent_id = null WHERE common_gb_id in" +
|
"UPDATE wvp_common_channel SET common_gb_parent_id = null WHERE common_gb_id in" +
|
||||||
|
@ -570,9 +570,9 @@ public interface CommonChannelMapper {
|
||||||
"from " +
|
"from " +
|
||||||
"wvp_common_channel " +
|
"wvp_common_channel " +
|
||||||
"WHERE common_gb_id IN " +
|
"WHERE common_gb_id IN " +
|
||||||
"<foreach collection='ids' item='item' open='(' separator=',' close=')' >#{item}</foreach>" +
|
"<foreach collection='commonGbChannels' item='item' open='(' separator=',' close=')' >#{item.commonGbId}</foreach>" +
|
||||||
" </script>"})
|
" </script>"})
|
||||||
int batchDelete(@Param("ids") List<Integer> ids);
|
int batchDelete(@Param("commonGbChannels") List<CommonGbChannel> commonGbChannels);
|
||||||
|
|
||||||
@MapKey("commonGbDeviceID")
|
@MapKey("commonGbDeviceID")
|
||||||
@Select("select * from wvp_common_channel")
|
@Select("select * from wvp_common_channel")
|
||||||
|
@ -599,11 +599,13 @@ public interface CommonChannelMapper {
|
||||||
"delete from wvp_common_channel WHERE common_gb_id in" +
|
"delete from wvp_common_channel WHERE common_gb_id in" +
|
||||||
"<foreach collection='commonChannelIdList' item='item' open='(' separator=',' close=')' > #{item}</foreach>" +
|
"<foreach collection='commonChannelIdList' item='item' open='(' separator=',' close=')' > #{item}</foreach>" +
|
||||||
"</script>")
|
"</script>")
|
||||||
void deleteByIdList(List<Integer> commonChannelIdList);
|
void deleteByIdList(@Param("commonChannelIdList") List<Integer> commonChannelIdList);
|
||||||
|
|
||||||
@Select("<script> "+
|
@Select("<script> "+
|
||||||
"SELECT * FROM wvp_common_channel" +
|
"SELECT * FROM wvp_common_channel" +
|
||||||
"</script>")
|
"</script>")
|
||||||
List<CommonGbChannel> getAll();
|
List<CommonGbChannel> getAll();
|
||||||
|
|
||||||
|
@Select("SELECT common_gb_id FROM wvp_common_channel WHERE common_gb_id = #{commonGbChannelId}")
|
||||||
|
CommonGbChannel getOne(@Param("commonGbChannelId") int commonGbChannelId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue