mirror of
https://gitee.com/freshday/radar.git
synced 2026-03-22 12:47:16 +08:00
@@ -97,7 +97,7 @@ public class RiskAnalysisEngineServiceImpl implements RiskAnalysisEngineService
|
||||
|
||||
// 3. save to db
|
||||
boolean isAllowDuplicate = false;
|
||||
if (isDuplicate != null && isDuplicate.equals("true")) {
|
||||
if (isDuplicate != null && "true".equals(isDuplicate)) {
|
||||
isAllowDuplicate = true;
|
||||
}
|
||||
entityService
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@Service
|
||||
@ConditionalOnProperty(prefix = "sys.conf",name="app", havingValue = "engine")
|
||||
//@ConditionalOnProperty(prefix = "sys.conf",name="app", havingValue = "engine")
|
||||
public class MobileInfoServiceImpl implements MobileInfoService {
|
||||
|
||||
public static Logger logger = LoggerFactory.getLogger(MobileInfoServiceImpl.class);
|
||||
|
||||
@@ -68,6 +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);
|
||||
doc.putAll(attach);
|
||||
if (!isAllowDuplicate) {
|
||||
//设置查询条件
|
||||
|
||||
@@ -204,9 +204,14 @@ public class ModelServiceImpl extends BaseLocalCacheService implements ModelServ
|
||||
IndexOptions options = new IndexOptions();
|
||||
options.expireAfter((long) eventExpireDays, TimeUnit.DAYS);
|
||||
IndexModel ttlIndex = new IndexModel(ttlKeys, options);
|
||||
|
||||
indexes.add(ttlIndex);
|
||||
|
||||
// add status.
|
||||
Document statusKey = new Document();
|
||||
statusKey.put("status", 1);
|
||||
IndexModel statusIndex = new IndexModel(statusKey);
|
||||
indexes.add(statusIndex);
|
||||
|
||||
mongoService.getCollection(collectionName).createIndexes(indexes);
|
||||
//
|
||||
|
||||
|
||||
Reference in New Issue
Block a user