Browse Source

Merge pull request '提交视频' (#78) from feature_meta into develop

Reviewed-on: http://101.201.121.115:3000/leo/LAPP_GAAS_GFrame_BACKEND/pulls/78
Reviewed-by: weichenglei <chenglei.wei@le-it.com.cn>
pull/79/head
weichenglei 3 years ago
parent
commit
af582f324f
2 changed files with 4 additions and 4 deletions
  1. +0
    -2
      services/ods/implments/OdsHead.service.impl.go
  2. +4
    -2
      web/controllers/common/CommonUploadPic.rest.go

+ 0
- 2
services/ods/implments/OdsHead.service.impl.go View File

@ -118,7 +118,6 @@ func (impl *OdsHeadServiceImplement) InsertOne(user *models.Usertab, entity *mod
for k, _ := range entity.Valst {
entity.Valst[k].OdsId = entity.OdsId
entity.Valst[k].Pos = k+1
entity.Valst[k].OdsTypeId = entity.OdsTypeId
}
lstdao := dal.NewOdsStepLstDAO(session, user.Pid, user.Userid)
err = lstdao.Insert(&entity.Valst)
@ -232,7 +231,6 @@ func (impl *OdsHeadServiceImplement) UpdateOne(user *models.Usertab, entity *mod
for k, _ := range entity.Valst {
entity.Valst[k].OdsId = entity.OdsId
entity.Valst[k].Pos = k+1
entity.Valst[k].OdsTypeId = entity.OdsTypeId
}
lstdao := dal.NewOdsStepLstDAO(session, user.Pid, user.Userid)
err = lstdao.DeleteWhere([]grmi.Predicate{


+ 4
- 2
web/controllers/common/CommonUploadPic.rest.go View File

@ -56,9 +56,11 @@ func RegisterUploadMustPic(party router.Party, httpMethod string, path string, m
var uploadfiles []string
for _, file := range files {
if !utils.ValueIsEmpty(file.Filename) {
filename := strings.Split(file.Filename,".")
filetype := filename[1]
guid := utils.MakeOrderSn(user.Userid)
filPath := "public/uploadfile/" + guid + ".jpg"
savePath := "web/public/uploadfile/" + guid + ".jpg"
filPath := "public/uploadfile/" + guid + "." +filetype
savePath := "web/public/uploadfile/" + guid + "." +filetype
// 上传文件至指定目录
err := utils.SaveUploadedFile(file, savePath)
if err != nil {


Loading…
Cancel
Save