feat: 支持多租户多模型对话及文档去重优化
This commit is contained in:
@@ -37,6 +37,15 @@ func (d *taskDao) Update(ctx context.Context, req *dto.UpdateTaskReq) (rows int6
|
||||
return r.RowsAffected()
|
||||
}
|
||||
|
||||
func (d *taskDao) Count(ctx context.Context, req *dto.GetTaskReq) (count int, err error) {
|
||||
count, err = gfdb.DB(ctx, public.DbNameKnowledge).Model(ctx, public.TableNameTask).OmitEmpty().
|
||||
Where(entity.TaskCol.TaskId, req.TaskId).
|
||||
Where(entity.TaskCol.TaskType, req.TaskType).
|
||||
Where(entity.TaskCol.Status, req.TaskStatus).
|
||||
Count()
|
||||
return
|
||||
}
|
||||
|
||||
func (d *taskDao) Get(ctx context.Context, req *dto.GetTaskReq) (res []*entity.Task, total int, err error) {
|
||||
r, total, err := gfdb.DB(ctx, public.DbNameKnowledge).Model(ctx, public.TableNameTask).OmitEmpty().
|
||||
Where(entity.TaskCol.Id, req.Id).
|
||||
|
||||
Reference in New Issue
Block a user