4 Commits

Author SHA1 Message Date
mroldx
61a2c396b5 Merge 9db9718e88 into 269f146c11 2025-07-09 17:17:43 +08:00
wangyong
269f146c11 (fix)(headless-server)语意建模-X模型-维度管理-维度搜索带key查询时,返回的维度结果范围超出了X模型范围 (#2328)
Some checks failed
supersonic CentOS CI / build (21) (push) Has been cancelled
supersonic mac CI / build (21) (push) Has been cancelled
supersonic ubuntu CI / build (21) (push) Has been cancelled
supersonic windows CI / build (21) (push) Has been cancelled
2025-07-07 17:19:59 +08:00
jerryjzhang
6f497b142e [fix][chat]Memory deletion should disable it first.
Some checks failed
supersonic CentOS CI / build (21) (push) Has been cancelled
supersonic mac CI / build (21) (push) Has been cancelled
supersonic ubuntu CI / build (21) (push) Has been cancelled
supersonic windows CI / build (21) (push) Has been cancelled
2025-07-02 18:59:56 +08:00
mroldx
9db9718e88 Update sql-update-mysql.sql
column  last_loin  ----->last_login
2025-06-12 14:26:12 +08:00
3 changed files with 11 additions and 4 deletions

View File

@@ -26,7 +26,6 @@ import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Objects;
@@ -110,6 +109,14 @@ public class MemoryServiceImpl implements MemoryService, CommandLineRunner {
@Override
public void batchDelete(List<Long> ids) {
QueryWrapper<ChatMemoryDO> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().in(ChatMemoryDO::getId, ids);
List<ChatMemoryDO> chatMemoryDOS = chatMemoryRepository.getMemories(queryWrapper);
chatMemoryDOS.forEach(chatMemoryDO -> {
if (MemoryStatus.ENABLED.toString().equals(chatMemoryDO.getStatus().trim())) {
disableMemory(chatMemoryDO);
}
});
chatMemoryRepository.batchDelete(ids);
}

View File

@@ -83,10 +83,10 @@ public class DimensionRepositoryImpl implements DimensionRepository {
}
if (StringUtils.isNotBlank(dimensionFilter.getKey())) {
String key = dimensionFilter.getKey();
queryWrapper.lambda().like(DimensionDO::getName, key).or()
queryWrapper.and(qw->qw.lambda().like(DimensionDO::getName, key).or()
.like(DimensionDO::getBizName, key).or().like(DimensionDO::getDescription, key)
.or().like(DimensionDO::getAlias, key).or()
.like(DimensionDO::getCreatedBy, key);
.like(DimensionDO::getCreatedBy, key));
}
return dimensionDOMapper.selectList(queryWrapper);

View File

@@ -420,4 +420,4 @@ ALTER TABLE s2_chat_model add column is_open tinyint DEFAULT NULL COMMENT '是
ALTER TABLE s2_database add column is_open tinyint DEFAULT NULL COMMENT '是否公开';
--20250321
ALTER TABLE s2_user add column last_loin datetime DEFAULT NULL;
ALTER TABLE s2_user add column last_login datetime DEFAULT NULL;