拉流代理通用通道默认在线
parent
3a6e098f7b
commit
bc0ee2bf13
|
@ -628,6 +628,7 @@ public class CommonGbChannel {
|
||||||
commonGbChannel.setCommonGbName(streamProxy.getName());
|
commonGbChannel.setCommonGbName(streamProxy.getName());
|
||||||
commonGbChannel.setCommonGbLongitude(streamProxy.getLongitude());
|
commonGbChannel.setCommonGbLongitude(streamProxy.getLongitude());
|
||||||
commonGbChannel.setCommonGbLatitude(streamProxy.getLatitude());
|
commonGbChannel.setCommonGbLatitude(streamProxy.getLatitude());
|
||||||
|
commonGbChannel.setCommonGbStatus(true);
|
||||||
commonGbChannel.setCreateTime(DateUtil.getNow());
|
commonGbChannel.setCreateTime(DateUtil.getNow());
|
||||||
commonGbChannel.setUpdateTime(DateUtil.getNow());
|
commonGbChannel.setUpdateTime(DateUtil.getNow());
|
||||||
return commonGbChannel;
|
return commonGbChannel;
|
||||||
|
|
|
@ -28,6 +28,7 @@ public class MybatisConfig {
|
||||||
if (userSetting.getSqlLog()){
|
if (userSetting.getSqlLog()){
|
||||||
config.setLogImpl(StdOutImpl.class);
|
config.setLogImpl(StdOutImpl.class);
|
||||||
}
|
}
|
||||||
|
// 自动将数据库中的下划线转换为驼峰格式
|
||||||
config.setMapUnderscoreToCamelCase(true);
|
config.setMapUnderscoreToCamelCase(true);
|
||||||
sqlSessionFactory.setConfiguration(config);
|
sqlSessionFactory.setConfiguration(config);
|
||||||
return sqlSessionFactory.getObject();
|
return sqlSessionFactory.getObject();
|
||||||
|
|
|
@ -95,6 +95,11 @@ public class CommonGbChannelServiceImpl implements ICommonGbChannelService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int add(CommonGbChannel channel) {
|
public int add(CommonGbChannel channel) {
|
||||||
|
CommonGbChannel commonGbChannel = commonGbChannelMapper.queryByDeviceID(channel.getCommonGbDeviceID());
|
||||||
|
if (commonGbChannel != null) {
|
||||||
|
channel.setCommonGbId(commonGbChannel.getCommonGbId());
|
||||||
|
return update(channel);
|
||||||
|
}
|
||||||
int result = commonGbChannelMapper.add(channel);
|
int result = commonGbChannelMapper.add(channel);
|
||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue