去LIST里面随机值

   List<Integer> listUser = bqManagerMapper.getBqManagerList();
   int userid = listUser.get(getRandomInt(listUser.size()));

  

 public static int getRandomInt(int max) {   return getRandom().nextInt(max);  }

 public static ThreadLocalRandom getRandom() {   return ThreadLocalRandom.current();

 }

posted @ 2017-06-08 15:26  JLCUI  阅读(228)  评论(0编辑  收藏  举报