|
@@ -725,8 +725,16 @@ namespace GxPress.Repository.Implement.WorkFlow
|
|
|
}
|
|
|
public async Task UpdateCCIsDoneAsync(int userId, int todoId)
|
|
|
{
|
|
|
- var flowTodo = await _repository.GetAsync(todoId);
|
|
|
- await UpdateReadAsync(userId, flowTodo.FlowId);
|
|
|
+ var flowId = 0;
|
|
|
+ var query = Q.NewQuery();
|
|
|
+ query.Where(nameof(Entity.WorkFlow.FlowTodo.Id), todoId);
|
|
|
+ query.Where(nameof(Entity.WorkFlow.FlowTodo.UserId), userId);
|
|
|
+ var flowTodo = await _repository.GetAsync(query);
|
|
|
+ if (flowTodo == null)
|
|
|
+ flowId = todoId;
|
|
|
+ else
|
|
|
+ flowId = flowTodo.FlowId;
|
|
|
+ await UpdateReadAsync(userId, flowId);
|
|
|
await UpdateFlowReadAsync(userId, flowTodo.FlowId);
|
|
|
}
|
|
|
|