| | |
| | | import org.yeshi.utils.DateUtil;
|
| | |
|
| | | import com.yeshi.fanli.dao.user.count.DailyCountUserDao;
|
| | | import com.yeshi.fanli.dto.order.CountOrderDTO;
|
| | | import com.yeshi.fanli.entity.admin.count.DailyCountUser;
|
| | | import com.yeshi.fanli.entity.admin.count.DailyCountUser.DailyCountUserEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | |
| | | * @param typeEnum
|
| | | * @throws Exception
|
| | | */
|
| | | private void initData(DailyCountUserEnum typeEnum) throws Exception {
|
| | | @Override
|
| | | public void initData(DailyCountUserEnum typeEnum) throws Exception {
|
| | | Date lastDate = null;
|
| | | DailyCountUser lastRecord = dailyCountUserDao.getMaxDate(typeEnum);
|
| | | if (lastRecord != null) {
|
| | |
| | | for (UserInfoRegister register: listRegister) {
|
| | | String channel = register.getChannel();
|
| | | if (channelName.equalsIgnoreCase(channel)) {
|
| | | // 当日渠道用户
|
| | | totalDay ++ ;
|
| | | }
|
| | | |
| | | Long id = register.getId();
|
| | | // 判断当前用户是否今日下单
|
| | | for (Long uid: listOrder) {
|
| | | if (uid.longValue() == id.longValue()) {
|
| | | totalValid ++;
|
| | | break;
|
| | | |
| | | Long id = register.getId();
|
| | | // 判断当前用户是否今日下单
|
| | | for (Long uid: listOrder) {
|
| | | if (uid.longValue() == id.longValue()) {
|
| | | totalValid ++;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | |
|
| | | if (list != null && list.size() > 0) {
|
| | | System.out.println("***********************" +list.size()); |
| | | totalUser = list.size();
|
| | | for (UserInfoRegister user : list) {
|
| | | listUid.add(user.getId());
|
| | |
| | | if (listUid.size() > 0) {
|
| | | List<Long> listUidDown = commonOrderCountService.getDownOrderUserByListUidAndDate(limitDay, listUid);
|
| | | if (listUidDown != null && listUidDown.size() > 0) {
|
| | | System.out.println("***********************" +listUidDown.size()); |
| | | for (Long uid: listUid) {
|
| | | int total = 0;
|
| | | for (Long id: listUidDown) {
|
| | |
| | | }
|
| | |
|
| | | if (total > 0) {
|
| | | System.out.println("-----------------------------------------------------");
|
| | | totalWeek ++;
|
| | | System.out.println(totalWeek);
|
| | | System.out.println("-----------------------------------------------------");
|
| | | }
|
| | |
|
| | | if (total >= 3) {
|
| | | System.out.println("-----------------------------------------------------");
|
| | | totalWeek3 ++;
|
| | | System.out.println(totalWeek3);
|
| | | System.out.println("-----------------------------------------------------");
|
| | | }
|
| | | }
|
| | | }
|