mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 13:47:09 +00:00
[fix][launcher]Enable multi-turn conversation in S2VisitsDemo.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package com.tencent.supersonic.headless.server.rest;
|
||||
|
||||
import com.tencent.supersonic.headless.api.pojo.request.MetaBatchReq;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.tencent.supersonic.auth.api.authentication.pojo.User;
|
||||
import com.tencent.supersonic.auth.api.authentication.utils.UserHolder;
|
||||
import com.tencent.supersonic.headless.api.pojo.request.MetaBatchReq;
|
||||
import com.tencent.supersonic.headless.api.pojo.request.TermReq;
|
||||
import com.tencent.supersonic.headless.api.pojo.response.TermResp;
|
||||
import com.tencent.supersonic.headless.server.service.TermService;
|
||||
@@ -38,8 +38,9 @@ public class TermController {
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
public List<TermResp> getTerms(@RequestParam("domainId") Long domainId,
|
||||
@RequestParam(name = "queryKey", required = false) String queryKey) {
|
||||
public List<TermResp> getTerms(
|
||||
@RequestParam("domainId") Long domainId,
|
||||
@RequestParam(name = "queryKey", required = false) String queryKey) {
|
||||
return termService.getTerms(domainId, queryKey);
|
||||
}
|
||||
|
||||
@@ -55,5 +56,4 @@ public class TermController {
|
||||
termService.deleteBatch(metaBatchReq);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -56,13 +56,15 @@ public class TermServiceImpl extends ServiceImpl<TermMapper, TermDO> implements
|
||||
QueryWrapper<TermDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(TermDO::getDomainId, domainId);
|
||||
if (StringUtils.isNotBlank(queryKey)) {
|
||||
queryWrapper.lambda().and(i ->
|
||||
i.like(TermDO::getName, queryKey)
|
||||
.or()
|
||||
.like(TermDO::getDescription, queryKey)
|
||||
.or()
|
||||
.like(TermDO::getAlias, queryKey)
|
||||
);
|
||||
queryWrapper
|
||||
.lambda()
|
||||
.and(
|
||||
i ->
|
||||
i.like(TermDO::getName, queryKey)
|
||||
.or()
|
||||
.like(TermDO::getDescription, queryKey)
|
||||
.or()
|
||||
.like(TermDO::getAlias, queryKey));
|
||||
}
|
||||
List<TermDO> termDOS = list(queryWrapper);
|
||||
return termDOS.stream().map(this::convert).collect(Collectors.toList());
|
||||
|
||||
Reference in New Issue
Block a user