if(!StringUtils.isBlank(startDate) && !StringUtils.isBlank(endDate)) {
cnd.and("subscribeAt", "between", "'"+startDate+"' AND '"+endDate+"'");
}
3 回复
用这个Criteria cri = Cnd.cri(); 怎么完成查询列表的这个操作
public Object data(String wxid, @Param("nickname") String nickname,
@Param("startDate") String startDate, @Param("endDate") String endDate,
@Param("length") int length, @Param("start") int start, @Param("draw") int draw,
@Param("::order") List<DataTableOrder> order, @Param("::columns") List<DataTableColumn> columns) {
Cnd cnd = Cnd.NEW();
Criteria cri = Cnd.cri();
if (!Strings.isBlank(wxid)) {
cri.where().and("wxid", "=", wxid);
}
if (!Strings.isBlank(nickname)) {
cri.where().and("nickname", "like", "%" + nickname + "%");
}
if(!StringUtils.isBlank(startDate) && !StringUtils.isBlank(endDate)) {
//String Str=" and subscribeAt between"+" '"+startDate+"' AND '"+endDate+"'";
cri.where().andBetween("subscribeAt", startDate, endDate);
}
return wxUserService.data(length, start, draw, order, columns, cri, null);
}
添加回复
请先登陆