Cnd cnd = Cnd.where("user_id", "=", userId)
                .and("current_id", "=", currentLineId)
                .and("device_id", "=", deviceId)
                .and("status","=",1);
        if (startTime != null && startTime.length()!=0) {
            cnd = cnd.and("createTime", ">", simpleDateFormat.parse(startTime).getTime());
        }
        if (endTime != null && endTime.length()!=0) {
            cnd = cnd.and("createTime", "<", simpleDateFormat.parse(endTime).getTime());
        }
    //二选一,就是传进来的是ip或者是src_ip
if (ipOrSrcIp != null && ipOrSrcIp.length()!=0) { SqlExpressionGroup sqlExpressionGroup = new SqlExpressionGroup(); sqlExpressionGroup.or("src_ip", "like", "%" + ipOrSrcIp + "%") .or("ip", "like", "%" + ipOrSrcIp + "%"); cnd.and(sqlExpressionGroup); }

相关文章:

  • 2021-07-13
  • 2022-02-11
  • 2021-08-29
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-24
  • 2022-12-23
  • 2022-02-14
  • 2021-04-26
  • 2022-12-23
相关资源
相似解决方案