去除动态数据库切换

dev/数据库统合
648540858 2024-12-06 17:11:22 +08:00
parent 5bbd461d88
commit 5777a8e93c
18 changed files with 2 additions and 42 deletions

View File

@ -199,13 +199,6 @@
<artifactId>springdoc-openapi-security</artifactId> <artifactId>springdoc-openapi-security</artifactId>
<version>1.6.10</version> <version>1.6.10</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/com.baomidou/dynamic-datasource-spring-boot-starter -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.6.1</version>
</dependency>
<!--在线文档 --> <!--在线文档 -->
<dependency> <dependency>

View File

@ -1,9 +1,8 @@
package com.genersoft.iot.vmp.gb28181.service.impl; package com.genersoft.iot.vmp.gb28181.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm; import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm;
import com.genersoft.iot.vmp.gb28181.service.IDeviceAlarmService;
import com.genersoft.iot.vmp.gb28181.dao.DeviceAlarmMapper; import com.genersoft.iot.vmp.gb28181.dao.DeviceAlarmMapper;
import com.genersoft.iot.vmp.gb28181.service.IDeviceAlarmService;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -12,7 +11,6 @@ import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
@Service @Service
@DS("master")
public class DeviceAlarmServiceImpl implements IDeviceAlarmService { public class DeviceAlarmServiceImpl implements IDeviceAlarmService {
@Autowired @Autowired

View File

@ -1,7 +1,6 @@
package com.genersoft.iot.vmp.gb28181.service.impl; package com.genersoft.iot.vmp.gb28181.service.impl;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.common.InviteInfo; import com.genersoft.iot.vmp.common.InviteInfo;
import com.genersoft.iot.vmp.common.InviteSessionType; import com.genersoft.iot.vmp.common.InviteSessionType;
import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.UserSetting;
@ -43,7 +42,6 @@ import java.util.*;
*/ */
@Slf4j @Slf4j
@Service @Service
@DS("master")
public class DeviceChannelServiceImpl implements IDeviceChannelService { public class DeviceChannelServiceImpl implements IDeviceChannelService {
@Autowired @Autowired

View File

@ -1,7 +1,6 @@
package com.genersoft.iot.vmp.gb28181.service.impl; package com.genersoft.iot.vmp.gb28181.service.impl;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.common.CommonCallback; import com.genersoft.iot.vmp.common.CommonCallback;
import com.genersoft.iot.vmp.common.VideoManagerConstants; import com.genersoft.iot.vmp.common.VideoManagerConstants;
import com.genersoft.iot.vmp.conf.DynamicTask; import com.genersoft.iot.vmp.conf.DynamicTask;
@ -47,7 +46,6 @@ import java.util.concurrent.TimeUnit;
*/ */
@Slf4j @Slf4j
@Service @Service
@DS("master")
public class DeviceServiceImpl implements IDeviceService { public class DeviceServiceImpl implements IDeviceService {
@Autowired @Autowired

View File

@ -1,7 +1,6 @@
package com.genersoft.iot.vmp.gb28181.service.impl; package com.genersoft.iot.vmp.gb28181.service.impl;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.common.*; import com.genersoft.iot.vmp.common.*;
import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.Device;
@ -28,7 +27,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
@Slf4j @Slf4j
@Service @Service
@DS("master")
public class InviteStreamServiceImpl implements IInviteStreamService { public class InviteStreamServiceImpl implements IInviteStreamService {
private final Map<String, List<ErrorCallback<StreamInfo>>> inviteErrorCallbackMap = new ConcurrentHashMap<>(); private final Map<String, List<ErrorCallback<StreamInfo>>> inviteErrorCallbackMap = new ConcurrentHashMap<>();

View File

@ -1,13 +1,11 @@
package com.genersoft.iot.vmp.gb28181.service.impl; package com.genersoft.iot.vmp.gb28181.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.gb28181.bean.*; import com.genersoft.iot.vmp.gb28181.bean.*;
import com.genersoft.iot.vmp.gb28181.dao.*; import com.genersoft.iot.vmp.gb28181.dao.*;
import com.genersoft.iot.vmp.gb28181.event.EventPublisher; import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent; import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
import com.genersoft.iot.vmp.gb28181.service.IPlatformChannelService; import com.genersoft.iot.vmp.gb28181.service.IPlatformChannelService;
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
import com.genersoft.iot.vmp.jt1078.proc.request.Re;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -26,7 +24,6 @@ import java.util.*;
*/ */
@Slf4j @Slf4j
@Service @Service
@DS("master")
public class PlatformChannelServiceImpl implements IPlatformChannelService { public class PlatformChannelServiceImpl implements IPlatformChannelService {
@Autowired @Autowired

View File

@ -1,6 +1,5 @@
package com.genersoft.iot.vmp.gb28181.service.impl; package com.genersoft.iot.vmp.gb28181.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.common.InviteInfo; import com.genersoft.iot.vmp.common.InviteInfo;
import com.genersoft.iot.vmp.common.*; import com.genersoft.iot.vmp.common.*;
import com.genersoft.iot.vmp.conf.DynamicTask; import com.genersoft.iot.vmp.conf.DynamicTask;
@ -53,7 +52,6 @@ import java.util.Vector;
*/ */
@Slf4j @Slf4j
@Service @Service
@DS("master")
public class PlatformServiceImpl implements IPlatformService { public class PlatformServiceImpl implements IPlatformService {
private final static String REGISTER_KEY_PREFIX = "platform_register_"; private final static String REGISTER_KEY_PREFIX = "platform_register_";

View File

@ -1,6 +1,5 @@
package com.genersoft.iot.vmp.gb28181.service.impl; package com.genersoft.iot.vmp.gb28181.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.common.InviteInfo; import com.genersoft.iot.vmp.common.InviteInfo;
import com.genersoft.iot.vmp.common.*; import com.genersoft.iot.vmp.common.*;
import com.genersoft.iot.vmp.conf.DynamicTask; import com.genersoft.iot.vmp.conf.DynamicTask;
@ -65,7 +64,6 @@ import java.util.Vector;
@SuppressWarnings(value = {"rawtypes", "unchecked"}) @SuppressWarnings(value = {"rawtypes", "unchecked"})
@Slf4j @Slf4j
@Service @Service
@DS("master")
public class PlayServiceImpl implements IPlayService { public class PlayServiceImpl implements IPlayService {
@Autowired @Autowired

View File

@ -1,6 +1,5 @@
package com.genersoft.iot.vmp.media.service.impl; package com.genersoft.iot.vmp.media.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.common.CommonCallback; import com.genersoft.iot.vmp.common.CommonCallback;
import com.genersoft.iot.vmp.common.StreamInfo; import com.genersoft.iot.vmp.common.StreamInfo;
import com.genersoft.iot.vmp.common.VideoManagerConstants; import com.genersoft.iot.vmp.common.VideoManagerConstants;
@ -50,7 +49,6 @@ import java.util.*;
*/ */
@Slf4j @Slf4j
@Service @Service
@DS("master")
public class MediaServerServiceImpl implements IMediaServerService { public class MediaServerServiceImpl implements IMediaServerService {
@Autowired @Autowired

View File

@ -2,7 +2,6 @@ package com.genersoft.iot.vmp.service.impl;
import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.gb28181.service.ICloudRecordService; import com.genersoft.iot.vmp.gb28181.service.ICloudRecordService;
import com.genersoft.iot.vmp.media.bean.MediaServer; import com.genersoft.iot.vmp.media.bean.MediaServer;
@ -36,7 +35,6 @@ import java.util.Set;
@Slf4j @Slf4j
@Service @Service
@DS("share")
public class CloudRecordServiceImpl implements ICloudRecordService { public class CloudRecordServiceImpl implements ICloudRecordService {
@Autowired @Autowired

View File

@ -1,6 +1,5 @@
package com.genersoft.iot.vmp.service.impl; package com.genersoft.iot.vmp.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.service.IRoleService; import com.genersoft.iot.vmp.service.IRoleService;
import com.genersoft.iot.vmp.storager.dao.RoleMapper; import com.genersoft.iot.vmp.storager.dao.RoleMapper;
import com.genersoft.iot.vmp.storager.dao.dto.Role; import com.genersoft.iot.vmp.storager.dao.dto.Role;
@ -10,7 +9,6 @@ import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
@Service @Service
@DS("master")
public class RoleServerImpl implements IRoleService { public class RoleServerImpl implements IRoleService {
@Autowired @Autowired

View File

@ -1,6 +1,5 @@
package com.genersoft.iot.vmp.service.impl; package com.genersoft.iot.vmp.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.service.IUserApiKeyService; import com.genersoft.iot.vmp.service.IUserApiKeyService;
import com.genersoft.iot.vmp.storager.dao.UserApiKeyMapper; import com.genersoft.iot.vmp.storager.dao.UserApiKeyMapper;
import com.genersoft.iot.vmp.storager.dao.dto.UserApiKey; import com.genersoft.iot.vmp.storager.dao.dto.UserApiKey;
@ -15,7 +14,6 @@ import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
@Service @Service
@DS("master")
public class UserApiKeyServiceImpl implements IUserApiKeyService { public class UserApiKeyServiceImpl implements IUserApiKeyService {
@Autowired @Autowired

View File

@ -1,6 +1,5 @@
package com.genersoft.iot.vmp.service.impl; package com.genersoft.iot.vmp.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.service.IUserService; import com.genersoft.iot.vmp.service.IUserService;
import com.genersoft.iot.vmp.storager.dao.UserMapper; import com.genersoft.iot.vmp.storager.dao.UserMapper;
import com.genersoft.iot.vmp.storager.dao.dto.User; import com.genersoft.iot.vmp.storager.dao.dto.User;
@ -13,7 +12,6 @@ import org.springframework.util.DigestUtils;
import java.util.List; import java.util.List;
@Service @Service
@DS("master")
public class UserServiceImpl implements IUserService { public class UserServiceImpl implements IUserService {
@Autowired @Autowired

View File

@ -1,6 +1,5 @@
package com.genersoft.iot.vmp.streamProxy.service.impl; package com.genersoft.iot.vmp.streamProxy.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.common.StreamInfo; import com.genersoft.iot.vmp.common.StreamInfo;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.media.bean.MediaServer; import com.genersoft.iot.vmp.media.bean.MediaServer;
@ -20,7 +19,6 @@ import org.springframework.util.ObjectUtils;
*/ */
@Slf4j @Slf4j
@Service @Service
@DS("master")
public class StreamProxyPlayServiceImpl implements IStreamProxyPlayService { public class StreamProxyPlayServiceImpl implements IStreamProxyPlayService {
@Autowired @Autowired

View File

@ -1,7 +1,6 @@
package com.genersoft.iot.vmp.streamProxy.service.impl; package com.genersoft.iot.vmp.streamProxy.service.impl;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.common.StreamInfo; import com.genersoft.iot.vmp.common.StreamInfo;
import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
@ -47,7 +46,6 @@ import java.util.Map;
*/ */
@Slf4j @Slf4j
@Service @Service
@DS("master")
public class StreamProxyServiceImpl implements IStreamProxyService { public class StreamProxyServiceImpl implements IStreamProxyService {
@Autowired @Autowired

View File

@ -1,6 +1,5 @@
package com.genersoft.iot.vmp.streamPush.service.impl; package com.genersoft.iot.vmp.streamPush.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.common.StreamInfo; import com.genersoft.iot.vmp.common.StreamInfo;
import com.genersoft.iot.vmp.conf.DynamicTask; import com.genersoft.iot.vmp.conf.DynamicTask;
import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.UserSetting;
@ -25,7 +24,6 @@ import java.util.UUID;
@Service @Service
@Slf4j @Slf4j
@DS("master")
public class StreamPushPlayServiceImpl implements IStreamPushPlayService { public class StreamPushPlayServiceImpl implements IStreamPushPlayService {
@Autowired @Autowired

View File

@ -1,7 +1,6 @@
package com.genersoft.iot.vmp.streamPush.service.impl; package com.genersoft.iot.vmp.streamPush.service.impl;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.common.StreamInfo; import com.genersoft.iot.vmp.common.StreamInfo;
import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.conf.exception.ControllerException;
@ -41,7 +40,6 @@ import java.util.*;
@Service @Service
@Slf4j @Slf4j
@DS("master")
public class StreamPushServiceImpl implements IStreamPushService { public class StreamPushServiceImpl implements IStreamPushService {
@Autowired @Autowired

View File

@ -2,4 +2,4 @@ spring:
application: application:
name: wvp name: wvp
profiles: profiles:
active: dev active: 273数据库统合