mirror of
https://gitee.com/freshday/radar.git
synced 2026-03-22 12:47:16 +08:00
2
pom.xml
2
pom.xml
@@ -30,7 +30,7 @@
|
||||
|
||||
<mapper.version>4.0.0</mapper.version>
|
||||
<mybatisGenerator.version>1.3.7</mybatisGenerator.version>
|
||||
<mysql.version>5.1.47</mysql.version>
|
||||
<mysql.version>8.0.16</mysql.version>
|
||||
<springboot.version>2.2.5.RELEASE</springboot.version>
|
||||
<tensorflow.version>1.12.0</tensorflow.version>
|
||||
<es.version>7.6.1</es.version>
|
||||
|
||||
@@ -2,7 +2,7 @@ spring:
|
||||
profiles:
|
||||
active: @profileActive@
|
||||
datasource:
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
initial-size: 8
|
||||
|
||||
@@ -2,7 +2,7 @@ spring:
|
||||
profiles:
|
||||
active: @profileActive@
|
||||
datasource:
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
initial-size: 8
|
||||
|
||||
@@ -137,7 +137,7 @@ public class DataListsServiceImpl implements DataListsService, SubscribeHandle {
|
||||
}
|
||||
}
|
||||
// 移除未提交的记录
|
||||
List<Long> listId = new ArrayList<Long>();
|
||||
List<Long> listId = new ArrayList<>();
|
||||
listId.addAll(metaMap.keySet());
|
||||
if (listId.size() > 0) {
|
||||
deleteMeta(listId);
|
||||
@@ -210,7 +210,7 @@ public class DataListsServiceImpl implements DataListsService, SubscribeHandle {
|
||||
public void onMessage(String channel, String message) {
|
||||
logger.info("data list sub:{}", message);
|
||||
DataListsVO dataListsVO = JSON.parseObject(message, DataListsVO.class);
|
||||
Map<String, Object> listRecordMap = dataListRecordCacheMap.get(dataListsVO.getModelId());
|
||||
Map<String, Object> listRecordMap = dataListRecordCacheMap.computeIfAbsent(dataListsVO.getModelId(), k -> new HashMap<>());
|
||||
if (dataListsVO.getOpt().equals("delete")) {
|
||||
listRecordMap.remove(dataListsVO.getName());
|
||||
} else if (dataListsVO.getOpt().equals("new")) {
|
||||
@@ -273,6 +273,7 @@ public class DataListsServiceImpl implements DataListsService, SubscribeHandle {
|
||||
}).start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getDataListMap(Long modelId) {
|
||||
Map<String, Object> listMap = dataListRecordCacheMap.get(modelId);
|
||||
return listMap;
|
||||
|
||||
@@ -221,6 +221,11 @@ public class ModelServiceImpl extends BaseLocalCacheService implements ModelServ
|
||||
if (isCreated) {
|
||||
modelVO.setStatus(StatusType.INACTIVE.getKey());
|
||||
modelDal.save(modelVO);
|
||||
int save = modelDal.save(modelVO);
|
||||
// 通知更新
|
||||
if (save > 0) {
|
||||
cacheService.publishModel(modelVO);
|
||||
}
|
||||
} else {
|
||||
result.setMsg("重建索引失败");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user