增加工具类
parent
cf87de2e1c
commit
de6b14cd7f
@ -0,0 +1,17 @@
|
||||
package com.ibeetl.admin.core.util.beetl;
|
||||
|
||||
import org.beetl.core.Context;
|
||||
import org.beetl.core.Function;
|
||||
|
||||
/**
|
||||
* 判断字符中中是否包含指定字段
|
||||
*/
|
||||
public class ContainFunction implements Function {
|
||||
|
||||
@Override
|
||||
public Object call(Object[] paras, Context ctx) {
|
||||
String fieldName = (String)paras[0];
|
||||
String fieldNames = (String)paras[1];
|
||||
return fieldNames.contains(fieldName);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue