mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-01-06 01:08:16 +08:00
[fix][common]Fix postgres schema, using varchar instead of char.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package com.tencent.supersonic.chat.server.rest;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.tencent.supersonic.auth.api.authentication.utils.UserHolder;
|
||||
import com.tencent.supersonic.chat.api.pojo.enums.MemoryReviewResult;
|
||||
@@ -16,8 +19,6 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Date;
|
||||
|
||||
@RestController
|
||||
|
||||
@@ -55,7 +55,8 @@ public class MemoryServiceImpl implements MemoryService {
|
||||
@Override
|
||||
public void updateMemory(ChatMemoryUpdateReq chatMemoryUpdateReq, User user) {
|
||||
ChatMemoryDO chatMemoryDO = chatMemoryRepository.getMemory(chatMemoryUpdateReq.getId());
|
||||
boolean hadEnabled = MemoryStatus.ENABLED.toString().equals(chatMemoryDO.getStatus().trim());
|
||||
boolean hadEnabled =
|
||||
MemoryStatus.ENABLED.toString().equals(chatMemoryDO.getStatus().trim());
|
||||
chatMemoryDO.setUpdatedBy(user.getName());
|
||||
chatMemoryDO.setUpdatedAt(new Date());
|
||||
BeanMapper.mapper(chatMemoryUpdateReq, chatMemoryDO);
|
||||
@@ -154,7 +155,8 @@ public class MemoryServiceImpl implements MemoryService {
|
||||
BeanUtils.copyProperties(memoryDO, memory);
|
||||
memory.setStatus(MemoryStatus.valueOf(memoryDO.getStatus().trim()));
|
||||
if (Objects.nonNull(memoryDO.getHumanReviewRet())) {
|
||||
memory.setHumanReviewRet(MemoryReviewResult.valueOf(memoryDO.getHumanReviewRet().trim()));
|
||||
memory.setHumanReviewRet(
|
||||
MemoryReviewResult.valueOf(memoryDO.getHumanReviewRet().trim()));
|
||||
}
|
||||
if (Objects.nonNull(memoryDO.getLlmReviewRet())) {
|
||||
memory.setLlmReviewRet(MemoryReviewResult.valueOf(memoryDO.getLlmReviewRet().trim()));
|
||||
|
||||
Reference in New Issue
Block a user