|
@@ -117,17 +117,11 @@ namespace GxPress.Repository.Implement.WorkFlow
|
|
|
/// <param name="isDone"></param>
|
|
|
/// <param name="request"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<IEnumerable<Flow>> GetMyCheckedTodoIdFlowIdListAsync(int userId, string type, bool isDone, FlowListRequest request)
|
|
|
+ public async Task<IEnumerable<(int FlowId, int TodoId)>> GetMyCheckedTodoIdFlowIdListAsync(int userId, string type, bool isDone, FlowListRequest request)
|
|
|
{
|
|
|
string sql = $@"
|
|
|
SELECT
|
|
|
- *
|
|
|
- FROM
|
|
|
- tede_flow
|
|
|
- WHERE
|
|
|
- Id IN (
|
|
|
- SELECT
|
|
|
- FlowId
|
|
|
+ FlowId,TodoId
|
|
|
FROM
|
|
|
tede_flow_todo a
|
|
|
INNER JOIN
|
|
@@ -192,13 +186,13 @@ namespace GxPress.Repository.Implement.WorkFlow
|
|
|
sql += $" AND b.Id IN ({processId})";
|
|
|
}
|
|
|
}
|
|
|
- sql += $") ORDER BY CreatedDate DESC limit {(request.Page - 1) * request.PerPage},{request.PerPage}";
|
|
|
+ sql += $" ORDER BY CreatedDate DESC limit {(request.Page - 1) * request.PerPage},{request.PerPage}";
|
|
|
var databaseType = StringUtils.ToEnum<DatabaseType>(_databaseTypeStr, DatabaseType.MySql);
|
|
|
var database = new Database(databaseType, _connectionString);
|
|
|
var connection = database.GetConnection();
|
|
|
var result =
|
|
|
await connection
|
|
|
- .QueryAsync<Flow>(sql);
|
|
|
+ .QueryAsync<(int FlowId, int TodoId)>(sql);
|
|
|
return result;
|
|
|
}
|
|
|
|