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