博客
关于我
RTMP协议web直播点播系统EasyDSS编辑储存目录时描述编辑设置可为空的方法介绍
阅读量:133 次
发布时间:2019-02-27

本文共 791 字,大约阅读时间需要 2 分钟。

由于近期一直在对EasyDSS的定制版本做开发,因此在EasyDSS定制版本中,我们又有了一些新功能的思考和新暴露的问题。

DSS14.png

EasyDSS的点播文件可存储至规定的路径内,在某EasyDSS定制版本中,编辑储存目录的时候,在页面中点击存储目录配置然后编辑一条信息,将描述这个字段设置为空,保存之后显示成功,但是实际却没有设置为空,还是默认填入了存储文件夹的名称。

18.png

原因应该是在存入数据库的时候,给的这个字段是空的,但是在修改的时候,以为这个空的字符串不属于修改的字段,导致数据库认为这个字段不需要修改。

19.png

因此我们需要修改代码逻辑为更新这条数据中的所有内容,即使是空的字符串也会修改掉。

参考代码如下:

if oldPath != newPath {   if efile.Exisit(newPath) {      return nil, errors.New("该目录已存在,请以其他名称重命名!")   }   err = os.Rename(oldPath, newPath)   if err != nil {      gErrorLog.Error("重命名目录失败", zap.Error(err))      return nil, errors.New("重命名目录失败!")   }}dirData.Desc = input.DescgVodDirDao.Save(dirData)viewData := &view.VodDirView{}impl.conversion.TableToView(dirData, viewData)return viewData, nil

除了EasyDSS外,TSINGSEE青犀视频其他主流的视频平台也支持版本定制,同时也支持二次开发和接口调用,如果还想了解其他内容,欢迎联系我们或者访问TSINGSEE青犀视频官方网站。

转载地址:http://cqlf.baihongyu.com/

你可能感兴趣的文章
NN&DL4.7 Parameters vs Hyperparameters
查看>>
NN&DL4.8 What does this have to do with the brain?
查看>>
nnU-Net 终极指南
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
NO 157 去掉禅道访问地址中的zentao
查看>>
no available service ‘default‘ found, please make sure registry config corre seata
查看>>
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
查看>>
no connection could be made because the target machine actively refused it.问题解决
查看>>
No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
查看>>
No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
查看>>
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>
No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
查看>>
No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'
查看>>
No module named 'crispy_forms'等使用pycharm开发
查看>>
No module named 'pandads'
查看>>
No module named cv2
查看>>
No module named tensorboard.main在安装tensorboardX的时候遇到的问题
查看>>
No module named ‘MySQLdb‘错误解决No module named ‘MySQLdb‘错误解决
查看>>
No new migrations found. Your system is up-to-date.
查看>>