mybatis Example多条件查询 StudentExample studentExample = new StudentExample();studentExample.setOrderByClause("create_time DESC");String[] trainingType = userList.get(0).getTrainingType().split(",");//教育筛选if(trainingType.lengt
StudentExample studentExample = new StudentExample(); studentExample.setOrderByClause("create_time DESC"); String[] trainingType = userList.get(0).getTrainingType().split(","); //教育筛选 if(trainingType.length > 0 && StringUtils.isNotBlank(userList.get(0).getBusinessCircle())){ for(int i = 0;i < trainingType.length;i++){ studentExample.or().andBusinessCircleEqualTo(userList.get(0).getBusinessCircle()).andTrainingTypeLike("%"+trainingType[i]+"%"); } } ListstudentList = studentService.selectByExample(studentExample);