refactor(service): 重构服务模块结构并优化模型配置

This commit is contained in:
2026-05-29 17:54:19 +08:00
parent d74559ae74
commit 55eb436639
7 changed files with 204 additions and 53 deletions

View File

@@ -26,3 +26,15 @@ func (d *modelDao) Get(ctx context.Context, req *entity.AsynchModel, fields ...s
err = r.Struct(&m)
return
}
// GetsByModelName 批量获取模型
func (d *modelDao) GetsByModelName(ctx context.Context, creator string, modelNames []string, fields ...string) (list []*entity.AsynchModel, err error) {
err = gfdb.DB(ctx, public.DbNameModelGateway).Model(ctx, public.TableNameModel).
OmitEmpty().
Where(entity.AsynchModelCol.Creator, creator).
WhereIn(entity.AsynchModelCol.ModelName, modelNames).
Fields(fields).
Scan(&list)
return
}