sunpengfei
2025-08-14 7c3aee1fe52cb86345b35b90b6cef80bbc6c618a
feat:开发
1个文件已修改
7 ■■■■ 已修改文件
FlexJobApi.FlexJobServer.Application/TaskUsers/Commands/TaskUserCommandHandler.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FlexJobApi.FlexJobServer.Application/TaskUsers/Commands/TaskUserCommandHandler.cs
@@ -68,12 +68,15 @@
        public async Task<int> Handle(ClearTaskCollectCommand request, CancellationToken cancellationToken)
        {
            var logier = JwtUtils.GetCurrentLogier();
            var entities = await rep.Change<TaskUserCollect>().AsQueryable()
            var entities = await repTaskUserCollect.AsQueryable()
                .Where(it => it.TaskInfo.ReleaseStatus == EnumTaskReleaseStatus.Stopped && it.UserId == logier.Id)
                .ToListAsync(cancellationToken);
            if (entities.IsNotNull())
            {
                await rep.DeleteAsync(entities);
                foreach (var entity in entities)
                {
                    await repTaskUserCollect.DeleteAsync(entity);
                }
            }
            return entities.Count;
        }