#169 zhengxx

Merged
liwei03 merged 2 commits from openioctopus/octopus:zhengxx into master 2 years ago
  1. +1
    -2
      server/base-server/internal/data/dao/algorithm_dao/algorithm_framework.go
  2. +1
    -2
      server/base-server/internal/data/dao/algorithm_dao/algorithm_type.go
  3. +1
    -2
      server/base-server/internal/data/dao/dataset.go

+ 1
- 2
server/base-server/internal/data/dao/algorithm_dao/algorithm_framework.go View File

@@ -99,8 +99,7 @@ func (d *algorithmDao) UpdateAlgorithmFramework(ctx context.Context, req *model.
if req.Id == "" {
return errors.Errorf(nil, errors.ErrorInvalidRequestParameter)
}
res := db.Updates(map[string]interface{}{
"id": req.Id,
res := db.Model(&model.AlgorithmFramework{}).Where("id = ? ", req.Id).Updates(map[string]interface{}{
"desc": req.Desc,
"refer_times": req.ReferTimes,
})


+ 1
- 2
server/base-server/internal/data/dao/algorithm_dao/algorithm_type.go View File

@@ -99,8 +99,7 @@ func (d *algorithmDao) UpdateAlgorithmType(ctx context.Context, req *model.Algor
if req.Id == "" {
return errors.Errorf(nil, errors.ErrorInvalidRequestParameter)
}
res := db.Updates(map[string]interface{}{
"id": req.Id,
res := db.Model(&model.AlgorithmType{}).Where("id = ? ", req.Id).Updates(map[string]interface{}{
"desc": req.Desc,
"refer_times": req.ReferTimes,
})


+ 1
- 2
server/base-server/internal/data/dao/dataset.go View File

@@ -151,8 +151,7 @@ func (d *datasetDao) UpdateDatasetType(ctx context.Context, datasetType *model.D
if datasetType.Id == "" {
return errors.Errorf(nil, errors.ErrorInvalidRequestParameter)
}
res := db.Updates(map[string]interface{}{
"id": datasetType.Id,
res := db.Model(&model.DatasetType{}).Where("id = ? ", datasetType.Id).Updates(map[string]interface{}{
"desc": datasetType.Desc,
"refer_times": datasetType.ReferTimes,
})


Loading…
Cancel
Save