|
|
@@ -247,14 +247,14 @@ public class CorpKfController {
|
|
|
* 会话记录
|
|
|
*/
|
|
|
@GetMapping("/get/session")
|
|
|
- public Result<SearchResult<CorpKfUserChatRecordView>> getSession(Long userId, String keyword) {
|
|
|
+ public Result<SearchResult<CorpKfUserChatRecordView>> getSession(Long userId, String textKey) {
|
|
|
String unionId = getUnionid(userId);
|
|
|
MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap());
|
|
|
if (unionId != null) {
|
|
|
builder.field(CorpKfUserChatRecordView::getUnionid, unionId);
|
|
|
}
|
|
|
- if (StringUtils.isNotBlank(keyword)) {
|
|
|
- builder.put("keyword", String.format(" and exist (select 1 from corp_kf_account_session_chat ct where ct.session_id = cr.id and ct.msg_content like '%s%%')", keyword));
|
|
|
+ if (StringUtils.isNotBlank(textKey)) {
|
|
|
+ builder.put("textKey", String.format(" exists (select 1 from corp_kf_account_session_chat ct where ct.session_id = cr.id and ct.msg_content like '%s%%')", textKey));
|
|
|
}
|
|
|
SearchResult<CorpKfUserChatRecordView> search = beanSearcher.search(CorpKfUserChatRecordView.class, builder.build());
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|