Merge remote-tracking branch 'origin/beetlsql3-dev' into beetlsql3-dev
commit
0a2c6dd982
@ -1,26 +1,26 @@
|
||||
package com.ibeetl.admin.core.util.beetl;
|
||||
|
||||
import org.beetl.core.Context;
|
||||
import org.beetl.core.Function;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 忽略大小写的比较
|
||||
*/
|
||||
@Component
|
||||
public class EqualsIgnoreCaseFunction implements Function {
|
||||
|
||||
@Override
|
||||
public Object call(Object[] objects, Context context) {
|
||||
try{
|
||||
if(objects != null && objects.length == 2){
|
||||
String left = objects[0].toString();
|
||||
String right = objects[1].toString();
|
||||
return left.equalsIgnoreCase(right);
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//package com.ibeetl.admin.core.util.beetl;
|
||||
//
|
||||
//import org.beetl.core.Context;
|
||||
//import org.beetl.core.Function;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//
|
||||
///**
|
||||
// * 忽略大小写的比较
|
||||
// */
|
||||
//@Component
|
||||
//public class EqualsIgnoreCaseFunction implements Function {
|
||||
//
|
||||
// @Override
|
||||
// public Object call(Object[] objects, Context context) {
|
||||
// try{
|
||||
// if(objects != null && objects.length == 2){
|
||||
// String left = objects[0].toString();
|
||||
// String right = objects[1].toString();
|
||||
// return left.equalsIgnoreCase(right);
|
||||
// }
|
||||
// }catch (Exception e){
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
//}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,33 @@
|
||||
package com.ibeetl.jlw.enums;
|
||||
|
||||
import cn.jlw.util.EnumUtil;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 进行中 ING
|
||||
* 已结束 END
|
||||
* 未开始 READY
|
||||
*/
|
||||
public enum StartStatusEnum {
|
||||
// 进行中
|
||||
ING(0, "进行中"),
|
||||
// 已结束
|
||||
END(1, "已结束"),
|
||||
// 未开始
|
||||
READY(-1, "未开始");
|
||||
@Getter
|
||||
// 可以转换成中文
|
||||
// @JsonValue
|
||||
private String text;
|
||||
@Getter
|
||||
private Integer code;
|
||||
|
||||
StartStatusEnum(Integer code, String text) {
|
||||
this.text = text;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public static StartStatusEnum getByCode(Integer code) {
|
||||
return EnumUtil.getByFieldWithValue(StartStatusEnum.class, "code", code);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue