常量定义
public class TestCfg {
public static final String LX_ID = "lx_id";
public static boolean isLxId (String lxId){
return LX_ID_WBDWJKF.equals(lxId);
}
}
mybaits 引用
<if test="@com.test.constant.TestCfg@isLxId (lxId)">
判断数字
private int intNum;
<if test="intNum == 1 "> </if>
判断数字字符串
private String strNum;
<if test="strNum == '1'.toString() "> </if>