AND fc.facility_type NOT IN (
'停车场',
'旅客服务中心',
'购物场所',
'旅游厕所'
)
AND fc.facility_type='酒店'
6 回复
params.put("fc.facility_type", FunctionUtils.Cond("not in", facilityTypeList));
params.put("fc.facility_type", FunctionUtils.Cond("=", facilityTyp));
public static Cnd MapToCnd(Map<String, CndType> map) {
Cnd result = Cnd.where("1", "=", 1);
map.forEach((k, v) -> {
if (v.getType().equals("likeRight")) {
result.and(k, "like", v.getDate() + "%");
}else if (v.getType().equals("like")) {
result.and(k, "like", "%" + v.getDate() + "%");
} else if (v.getType().equals("desc")) {
result.desc(k);
} else if (v.getType().equals("asc")) {
result.asc(k);
} else if (v.getType().equals("in")) {
result.and(k, "in", v.getDate());
} else if (v.getType().equals("or")) {
result.or(k, "=", v.getDate());
} else if (v.getType().equals("between")) {
result.and(k, ">=", "1").and(k, "<=", v.getDate());
} else if (v.getType().equals("lessThan")) {
result.and(k, "<=", v.getDate());
} else if (v.getType().equals("not in")) {
result.and(k, "not in", v.getDate());
} else {
result.and(k, v.getType(), v.getDate());
}
});
return result;
}
添加回复
请先登陆