Пример #1
0
 /**
  * 手机号码搜索用户姓名 searchMobileName
  *
  * @param userId
  * @return
  */
 public static String searchMobileName(String mobile) {
   String name = "";
   UserInfo userInfo = userInfoService.findByMobile(mobile);
   if (userInfo != null) {
     name = userInfo.getUserName();
   }
   return name;
 }
Пример #2
0
 /**
  * 团队人数 groupCount
  *
  * @param userId
  * @return
  */
 public static Integer loadUserGroupMount(Integer userId) {
   UserInfoBean userInfoBean = new UserInfoBean();
   userInfoBean.setInviteesId(userId);
   int count = 0;
   List<UserInfo> firstList = userInfoService.queryAll(userInfoBean);
   if (CollectionUtils.isNotEmpty(firstList)) {
     for (UserInfo userInfo : firstList) {
       count++;
       UserInfoBean userInfoBean2 = new UserInfoBean();
       userInfoBean2.setInviteesId(userInfo.getId());
       List<UserInfo> secondList = userInfoService.queryAll(userInfoBean2);
       if (secondList != null) {
         count += secondList.size();
       }
     }
   }
   return count;
 }
Пример #3
0
 /**
  * 得到的红包金额
  *
  * @return
  */
 public static double getRedPackCount(Integer id) {
   UserInfo userInfo = userInfoService.findOne(id);
   double sum = userInfo.getBalance() - userInfo.getReflectRed();
   return sum;
 }