添加公共参数和方法
This commit is contained in:
@@ -924,6 +924,26 @@ public class InfluxQueryWrapper {
|
||||
return this;
|
||||
}
|
||||
|
||||
/***
|
||||
* 批量返回field key较大的百分之N的值。
|
||||
* @author xuyang
|
||||
* @param prefix 表字段名
|
||||
* @param suffix 映射名称
|
||||
* @return InfluxQueryWrapper
|
||||
* 输出 percentile(prefix+diffContent+suffix) as prefix+diffContent+suffix
|
||||
*/
|
||||
public InfluxQueryWrapper percentileSamePrefixAndSuffix(String prefix, String suffix, List<Object> diffContent, int percent) {
|
||||
if (CollectionUtil.isEmpty(diffContent)) {
|
||||
throw new RuntimeException("查询数值集合为空,请校验!");
|
||||
}
|
||||
for (Object obj : diffContent) {
|
||||
String fieldName = prefix + obj + suffix;
|
||||
this.percentile(fieldName, percent);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**************************自定义查询条件,比如between、>、<、=、>=、<=等等**************************/
|
||||
|
||||
/***
|
||||
|
||||
Reference in New Issue
Block a user