|
|
@@ -150,6 +150,19 @@ public class MongoStartup {
|
|
|
return mongodbIndexEntity;
|
|
|
}
|
|
|
|
|
|
+ public MongodbIndexEntity iotYbqEnvDataCreateIndex() {
|
|
|
+ log.info("开始创建IotYbqEnvData索引");
|
|
|
+ List<String[]> indexNameList = new ArrayList<>();
|
|
|
+ indexNameList.add(new String[]{"devBid"});
|
|
|
+ indexNameList.add(new String[]{"devBid", "ybqdataCreatedDate"});
|
|
|
+
|
|
|
+ MongodbIndexEntity mongodbIndexEntity = new MongodbIndexEntity();
|
|
|
+ mongodbIndexEntity.setIotBaseEntity(IotYbqEnvData.class);
|
|
|
+ mongodbIndexEntity.setIndexNameList(indexNameList);
|
|
|
+
|
|
|
+ return mongodbIndexEntity;
|
|
|
+ }
|
|
|
+
|
|
|
@PostConstruct
|
|
|
public void start() {
|
|
|
log.info("开始创建mongodb索引");
|