This commit is contained in:
孟帅
2023-09-06 17:28:16 +08:00
parent 9fa670e5c3
commit 5670aa9c82
22 changed files with 156 additions and 127 deletions

View File

@@ -153,12 +153,16 @@ func (s *sSysDictData) Select(ctx context.Context, in *sysin.DataSelectInp) (lis
if err = mod.Order("sort asc,id desc").Scan(&list); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return list, err
return
}
for k, v := range list {
list[k].Value = consts.ConvType(v.Value, v.ValueType)
list[k].Key = list[k].Value
}
return list, err
if len(list) == 0 {
list = make(sysin.DataSelectModel, 0)
}
return
}