|
@@ -606,16 +606,19 @@ namespace GxPress.Repository.Implement
|
|
|
/// 获取小组列表
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<IEnumerable<GroupDetailResult>> GetGroupDetailResults()
|
|
|
+ public async Task<IEnumerable<GroupDetailResult>> GetGroupDetailResults(string keyWord)
|
|
|
{
|
|
|
- string sql = @"SELECT
|
|
|
+ string sqlStr = string.Empty;
|
|
|
+ if (!string.IsNullOrWhiteSpace(keyWord))
|
|
|
+ sqlStr += $" and a.Name like '%{keyWord}%'";
|
|
|
+ string sql = $@"SELECT
|
|
|
a.*, b.PiazzaName AS CategroyName, c.Name AS UserName
|
|
|
FROM
|
|
|
tede_group a
|
|
|
INNER JOIN
|
|
|
tede_user c ON a.UserId = c.Id
|
|
|
LEFT JOIN
|
|
|
- tede_group_piazza b ON a.GroupCategroyId = b.Id
|
|
|
+ tede_group_piazza b ON a.GroupCategroyId = b.Id Where 1=1 {sqlStr}
|
|
|
ORDER BY a.Sort DESC , a.CreatedDate DESC";
|
|
|
var databaseType = StringUtils.ToEnum<DatabaseType>(_databaseTypeStr, DatabaseType.MySql);
|
|
|
var database = new Database(databaseType, _connectionString);
|