feat: 新增创作作品管理模块及相关配置
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"ai-agent/workflow/consts"
|
||||
"ai-agent/workflow/consts/public"
|
||||
"ai-agent/workflow/model/dto"
|
||||
"ai-agent/workflow/model/entity"
|
||||
"context"
|
||||
@@ -15,7 +15,7 @@ var CreationInfoDao = &creationInfoDao{}
|
||||
type creationInfoDao struct{}
|
||||
|
||||
func (d *creationInfoDao) List(ctx context.Context, req *dto.ListCreationInfoReq, fields ...string) (res []*entity.CreationInfo, total int, err error) {
|
||||
model := gfdb.DB(ctx, consts.DbNameBlackDeacon).Model(ctx, consts.TableNameCreationInfo).Fields(fields).OmitEmpty()
|
||||
model := gfdb.DB(ctx, public.DbNameBlackDeacon).Model(ctx, public.TableNameCreationInfo).Fields(fields).OmitEmpty()
|
||||
model.Where(entity.CreationInfoCol.Creator, req.Creator)
|
||||
model.OrderDesc(entity.CreationInfoCol.CreatedAt)
|
||||
if req.Page != nil {
|
||||
@@ -35,7 +35,7 @@ func (d *creationInfoDao) Insert(ctx context.Context, req *dto.Create) (id int64
|
||||
if err = gconv.Struct(req, e); err != nil {
|
||||
return
|
||||
}
|
||||
r, err := gfdb.DB(ctx, consts.DbNameBlackDeacon).Model(ctx, consts.TableNameCreationInfo).Insert(e)
|
||||
r, err := gfdb.DB(ctx, public.DbNameBlackDeacon).Model(ctx, public.TableNameCreationInfo).Insert(e)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user