| | |
| | | import com.yeshi.fanli.entity.bus.user.UserInviteValidNum;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInviteValidRecord;
|
| | | import com.yeshi.fanli.entity.bus.user.WeiXinUser;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.TeamDailyRecord;
|
| | | import com.yeshi.fanli.entity.bus.user.invite.TeamDailyRecord;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.TeamUserLevelStatistic;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.TearcherInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserCustomSettingsService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.TeamDailyRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.TeamFansInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleExtraInfoSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleSerivce;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.invite.UserInviteValidNumService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.UserInviteValidRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.TeamDailyRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.TeamUserLevelStatisticService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.TearcherService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
|
| | |
| | | highVIP.put("total", statistic.getHighFirstCount() + statistic.getHighSecondCount());
|
| | | superVIP.put("total", statistic.getSuperFirstCount() + statistic.getSuperSecondCount());
|
| | | }
|
| | | // 统计达人
|
| | | long darenToday = threeSaleSerivce.countFirstTeamByDate(uid, 1) + threeSaleSerivce.countSecondTeamByDate(uid, 1);
|
| | | long darenMonth = threeSaleSerivce.countFirstTeamByDate(uid, 2) + threeSaleSerivce.countSecondTeamByDate(uid, 2);
|
| | | |
| | |
|
| | | int darenToday = 0;
|
| | | int highVIPToday = 0;
|
| | | int superVIPToday = 0;
|
| | | String createId = teamDailyRecordService.createId(uid, new Date());
|
| | | TeamDailyRecord record = teamDailyRecordService.getById(createId);
|
| | | if (record != null) {
|
| | | if (record.getFirstDaRen() != null) |
| | | darenToday += record.getFirstDaRen();
|
| | | if (record.getSecondDaRen() != null)
|
| | | darenToday += record.getSecondDaRen(); |
| | | if (record.getFirstHighVIP() != null)
|
| | | highVIPToday += record.getFirstHighVIP();
|
| | | if (record.getSecondHighVIP() != null)
|
| | | highVIPToday += record.getSecondHighVIP();
|
| | | if (record.getFirstSuperVIP() != null)
|
| | | superVIPToday += record.getFirstSuperVIP();
|
| | | if (record.getSecondSuperVIP() != null)
|
| | | superVIPToday += record.getSecondSuperVIP();
|
| | | }
|
| | | |
| | | |
| | | // 获取当月第一天和最后一天 |
| | | Calendar cale = Calendar.getInstance();
|
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String firstday, lastday; |
| | | // 获取前月的第一天 |
| | | cale = Calendar.getInstance(); |
| | | cale.add(Calendar.MONTH, 0); |
| | | cale.set(Calendar.DAY_OF_MONTH, 1); |
| | | firstday = format.format(cale.getTime()); |
| | | // 获取前月的最后一天 |
| | | cale = Calendar.getInstance(); |
| | | cale.add(Calendar.MONTH, 1); |
| | | cale.set(Calendar.DAY_OF_MONTH, 0); |
| | | lastday = format.format(cale.getTime()); |
| | | |
| | | int darenMonth = 0;
|
| | | int highVIPMonth = 0;
|
| | | int superVIPMonth = 0;
|
| | | Date date = new Date();
|
| | | Date minTime = TimeUtil.parseYYYYMMDD(firstday);
|
| | | Date maxTime = TimeUtil.parseYYYYMMDD_HHMMSS(lastday + " 23:59:59");
|
| | | List<TeamDailyRecord> listMonth = teamDailyRecordService.sumGroupByYearMonth(uid, minTime, maxTime);
|
| | | if (listMonth != null && listMonth.size() > 0) {
|
| | | TeamDailyRecord teamRecord = listMonth.get(0);
|
| | | if (teamRecord.getFirstDaRen() != null) |
| | | darenMonth += teamRecord.getFirstDaRen();
|
| | | if (teamRecord.getSecondDaRen() != null)
|
| | | darenMonth += teamRecord.getSecondDaRen(); |
| | | if (teamRecord.getFirstHighVIP() != null)
|
| | | highVIPMonth += teamRecord.getFirstHighVIP();
|
| | | if (teamRecord.getSecondHighVIP() != null)
|
| | | highVIPMonth += teamRecord.getSecondHighVIP();
|
| | | if (teamRecord.getFirstSuperVIP() != null)
|
| | | superVIPMonth += teamRecord.getFirstSuperVIP();
|
| | | if (teamRecord.getSecondSuperVIP() != null)
|
| | | superVIPMonth += teamRecord.getSecondSuperVIP();
|
| | | }
|
| | | // 达人
|
| | | daren.put("today", darenToday);
|
| | | daren.put("month", darenMonth);
|
| | |
|
| | | SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
|
| | | String today = sd.format(new Date());
|
| | | // 当月1号
|
| | | Calendar calendar1 = Calendar.getInstance();
|
| | | calendar1.set(Calendar.DAY_OF_MONTH, 1);
|
| | | Date minTime = sd.parse(sd.format(calendar1.getTime()));
|
| | |
|
| | | int highVIPToday = 0;
|
| | | int highVIPMonth = 0;
|
| | | // TODO 统计高级会员数量
|
| | | // 高级会会员
|
| | | highVIP.put("today", highVIPToday);
|
| | | highVIP.put("month", highVIPMonth);
|
| | | |
| | | |
| | | int superVIPToday = 0;
|
| | | int superVIPMonth = 0;
|
| | | // 统计超级会员数量
|
| | | superVIP.put("today", superVIPToday);
|
| | | superVIP.put("month", superVIPMonth);
|
| | |
| | | TeamDailyRecord monthRecord = new TeamDailyRecord(0,0,0);
|
| | | TeamDailyRecord totalityRecord = new TeamDailyRecord(0,0,0);
|
| | |
|
| | | List<TeamDailyRecord> list = teamDailyRecordService.getbyUid(uid);
|
| | | List<TeamDailyRecord> list = teamDailyRecordService.getByUid(uid);
|
| | | if (list != null && list.size() > 0) {
|
| | | for (TeamDailyRecord record: list) {
|
| | | Date statisticDay = record.getCountDay();
|