feihu.wang
This commit is contained in:
feihu.wang 2022-11-27 12:01:18 +08:00
parent ab0b2aae9a
commit 5e688da639
3 changed files with 4 additions and 3 deletions

View File

@ -30,6 +30,7 @@ public class AggregateCommandImpl implements AggregateCommand {
return count(modelId, searchField, searchFieldValue, refDateName,"1", begin, end);
}
@Override
public long count(String modelId, String searchField, Object searchFieldValue, String refDateName, String status, Date begin,
Date end) {
String collectionName = "entity_" + modelId;

View File

@ -55,7 +55,7 @@ public class EntityServiceImpl implements EntityService {
Document filter = new Document();
filter.append(model.getEntryName(), eventId);
Document updateDoc = new Document();
updateDoc.append("status",status);
updateDoc.append("status", status);
String collectionName = buildCollectionName(modelId);
return mongoService.update(collectionName, filter, updateDoc);
}
@ -68,7 +68,7 @@ public class EntityServiceImpl implements EntityService {
Document attach = Document.parse(attachJson);
ModelVO model = modelService.getModelById(modelId);
attach.put("radar_ref_datetime", new Date(doc.getLong(model.getReferenceDate())));
attach.put("status", 1);
attach.put("status", "1");
doc.putAll(attach);
if (!isAllowDuplicate) {
//设置查询条件

View File

@ -208,7 +208,7 @@ public class ModelServiceImpl extends BaseLocalCacheService implements ModelServ
// add status.
Document statusKey = new Document();
statusKey.put("status", 1);
statusKey.put("status", "1");
IndexModel statusIndex = new IndexModel(statusKey);
indexes.add(statusIndex);