|
|
@@ -4565,6 +4565,47 @@ GROUP BY
|
|
|
return Ok(JsonView(await _deepSeek.ChatAsync(question)));
|
|
|
}
|
|
|
|
|
|
+ private class clientView
|
|
|
+ {
|
|
|
+ public int Id { get; set; }
|
|
|
+ public string LastName { get; set; }
|
|
|
+ public string FirstName { get; set; }
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// DeepSeek Chat 测试
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> ClientInfo(string name )
|
|
|
+ {
|
|
|
+ var clientInfos = await _sqlSugar.Queryable<Crm_DeleClient>()
|
|
|
+ .Where(x => x.IsDel == 0)
|
|
|
+ .Select(x => new clientView { Id = x.Id, LastName = x.LastName })
|
|
|
+ .ToListAsync();
|
|
|
+
|
|
|
+ foreach (var item in clientInfos)
|
|
|
+ {
|
|
|
+ item.LastName = AesEncryptionHelper.Decrypt(item.LastName);
|
|
|
+ }
|
|
|
+
|
|
|
+ var searchIds = clientInfos.Where(x => x.LastName.Contains(name)).Select(x => x.Id).ToList();
|
|
|
+
|
|
|
+ var view = await _sqlSugar.Queryable<Crm_DeleClient>()
|
|
|
+ .Where(x => x.IsDel == 0)
|
|
|
+ .Where(x => searchIds.Contains(x.Id))
|
|
|
+ .Select(x => new clientView { Id = x.Id, LastName = x.LastName, FirstName = x.FirstName })
|
|
|
+ .ToListAsync();
|
|
|
+ foreach (var item in view)
|
|
|
+ {
|
|
|
+ item.LastName = AesEncryptionHelper.Decrypt(item.LastName);
|
|
|
+ item.FirstName = AesEncryptionHelper.Decrypt(item.FirstName);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return Ok(JsonView(view));
|
|
|
+ }
|
|
|
#endregion
|
|
|
}
|
|
|
}
|