Merge pull request #52 from wfh45678/develop

Develop
This commit is contained in:
feihu.wang
2020-08-15 10:29:00 +08:00
committed by GitHub
5 changed files with 11 additions and 5 deletions

View File

@@ -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>

View File

@@ -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

View File

@@ -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

View File

@@ -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;

View File

@@ -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("重建索引失败");
}