コード例 #1
0
  private void getMatchInfo(List<LtLotteryHomeRecommendVo> list, Paging p) {
    if (list != null && list.size() > 0) {

      for (int i = 0; i < list.size(); i++) {
        LtLotteryHomeRecommendVo v = list.get(i);
        if (LotteryId.JCZQ.name().equals(v.getReLotteryId())) {
          FBMatchPO fb = fbMatchDao.get(v.getMatchId());
          if (fb != null) {

            v.setHomeTeamName(fb.getHomeTeamName());
            v.setGuestTeamName(fb.getGuestTeamName());
            v.setPlayingTime(fb.getPlayingTime());
            v.setLeagueName(fb.getLeagueName());
            v.setConcedePoints(fb.getConcedePoints() + "");
          }
        } else if (LotteryId.JCLQ.name().equals(v.getReLotteryId())) {
          BBMatchPO bb = bbMatchDao.get(v.getMatchId());
          if (bb != null) {
            v.setHomeTeamName(bb.getHomeTeamName());
            v.setGuestTeamName(bb.getGuestTeamName());
            v.setPlayingTime(bb.getPlayingTime());
            v.setLeagueName(bb.getLeagueName());
          }
          String points = bbMatchPlayDao.getPointsById(v.getMatchId() + v.getPlayId());
          v.setConcedePoints(points + "");
        } else if (LotteryId.BJDC.name().equals(v.getReLotteryId())
            || LotteryId.BDSF.name().equals(v.getReLotteryId())) {
          BJDCMatchPO bjdc = bjdcMatchDao.get(v.getMatchId());
          if (bjdc != null) {
            v.setHomeTeamName(bjdc.getHomeTeamName());
            v.setGuestTeamName(bjdc.getGuestTeamName());
            v.setPlayingTime(bjdc.getPlayingTime());
            v.setLeagueName(bjdc.getLeagueName());
          }
          String points = bjdcMatchPlayDao.getPoints(v.getMatchId() + v.getPlayId());
          v.setConcedePoints(points + "");
        }

        String sponsor = betSchemeRecDao.getSponsorById(v.getSchemeId());
        v.setSponsor(sponsor);
      }
      p.setResults(list);
    }
  }
コード例 #2
0
 /**
  * 反解赛事串集合到比赛ID
  *
  * @param weiboMsg
  * @return
  */
 protected List<MatchIdInfo> reversionMatchId(List<String> matchStrList) {
   List<MatchIdInfo> matchIdList = new ArrayList<MatchIdInfo>();
   for (String matchStr : matchStrList) {
     MatchIdInfo matchIdInfo = new MatchIdInfo();
     String matchId = null;
     if (matchStr.startsWith(LotteryLetter.JZ.name())) {
       matchId = prefix + matchStr.substring(2);
       matchIdInfo.setLottery(LotteryId.JCZQ.name());
     } else if (matchStr.startsWith(LotteryLetter.JL.name())) {
       matchId = prefix + matchStr.substring(2);
       matchIdInfo.setLottery(LotteryId.JCLQ.name());
     } else if (matchStr.startsWith(LotteryLetter.CZ.name())) {
       matchId = split14MatchStr(matchStr);
       matchIdInfo.setLottery(LotteryId.CTZC.name());
     }
     matchIdInfo.setMatchId(matchId);
     matchIdList.add(matchIdInfo);
   }
   return matchIdList;
 }
コード例 #3
0
 @Transactional
 @Override
 public Paging getRecommendMatch(Paging p, String matchType) {
   // TODO Auto-generated method stub
   String mType = "";
   if (StringUtils.isNotBlank(matchType)) {
     if (MatchType.fb.name().equals(matchType)) {
       mType = LotteryId.JCZQ.name();
     } else if (MatchType.bb.name().equals(matchType)) {
       mType = LotteryId.JCLQ.name();
     } else if (MatchType.bjdc.name().equals(matchType)) {
       mType = LotteryId.BJDC.name();
     }
   }
   Integer count = lotteryHomeRecommendDao.getLtLotteryHomeRecommendCount(mType);
   p.setTotalCount(count);
   List<Object[]> relist = lotteryHomeRecommendDao.getLtLotteryHomeRecommendBy(p, mType);
   List<LtLotteryHomeRecommendVo> list = fillData(relist);
   getMatchInfo(list, p);
   return p;
 }