| | |
| | | import com.yeshi.fanli.entity.admin.UserInfoAdmin;
|
| | | import com.yeshi.fanli.entity.bus.user.BindingAccount;
|
| | | import com.yeshi.fanli.entity.bus.user.InviteUser;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.WeiXinUser;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | | import com.yeshi.fanli.exception.ThreeSaleException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | |
| | |
|
| | | @Resource
|
| | | private ShareMapper shareMapper;
|
| | | |
| | | @Resource
|
| | | private HongBaoV2CountService hongBaoV2CountService;
|
| | | |
| | |
|
| | | public UserInfo getUserByLoginTypeAndOpenId(int loginType, String openid, String appid) {
|
| | | List<UserInfo> list = null;
|
| | |
| | | }
|
| | |
|
| | | // 最后一次下单时间
|
| | | Long lastOrderTime = hongBaoService.getLastOrderTime(uid);
|
| | | Date lastOrderTime = hongBaoV2CountService.getLastHongBaoTime(uid);
|
| | | if (lastOrderTime == null) {
|
| | | userInfoAdmin.setLastOrderTime(0);
|
| | | } else {
|
| | | userInfoAdmin.setLastOrderTime(lastOrderTime);
|
| | | userInfoAdmin.setLastOrderTime(lastOrderTime.getTime());
|
| | | }
|
| | |
|
| | | // 历史总订单
|
| | | long totalOrder = hongBaoService.countByUidSelf(uid, null, null);
|
| | | long totalOrder = hongBaoV2CountService.countValidNumberByUid(uid, null);
|
| | | |
| | | // 今日总订单
|
| | | long todayOrder = hongBaoService.countByUidSelf(uid, 1, null);
|
| | | long todayOrder = hongBaoV2CountService.countValidNumberByUid(uid, 1);
|
| | | // 本月总订单
|
| | | long monthOrder = hongBaoService.countByUidSelf(uid, null, 1);
|
| | | long monthOrder = hongBaoV2CountService.countValidNumberByUid(uid, 2);
|
| | |
|
| | | userInfoAdmin.setTotalOrder(totalOrder);
|
| | | userInfoAdmin.setTodayOrder(todayOrder);
|
| | | userInfoAdmin.setMonthOrder(monthOrder);
|
| | | |
| | | |
| | | // 未领取红包 待入账金额
|
| | | BigDecimal unaccountedMoney = hongBaoV2CountService.countWillGetMoneyByUid(uid);
|
| | | if (unaccountedMoney ==null) {
|
| | | unaccountedMoney = new BigDecimal(0);
|
| | | }
|
| | | userInfoAdmin.setUnaccountedMoney(unaccountedMoney.toString());
|
| | |
|
| | | // 历史总收益
|
| | | BigDecimal totalMoneyHistory = hongBaoV2CountService.countMoneyByUidAndState(uid,3);
|
| | | if (totalMoneyHistory ==null) {
|
| | | totalMoneyHistory = new BigDecimal(0);
|
| | | }
|
| | | userInfoAdmin.setTotalMoneyHistory(totalMoneyHistory.toString());
|
| | | |
| | | |
| | | |
| | |
|
| | | // 支付宝账号 累计转账总金额
|
| | | double totalMoney = payInfoMapper.sumMoneyByUid(uid);
|
| | |
| | |
|
| | | // 累计提现 (暂未计入微信)
|
| | | userInfoAdmin.setTotalExtract(totalMoney);
|
| | |
|
| | | // 未领取红包 待入账金额
|
| | | double unaccountedMoney = hongBaoService.countForecastMoneysByUid(uid);
|
| | | userInfoAdmin.setUnaccountedMoney(unaccountedMoney);
|
| | |
|
| | | // 历史总收益
|
| | | double totalMoneyHistory = hongBaoService.countReceiveMoneysByUid(uid);
|
| | | userInfoAdmin.setTotalMoneyHistory(totalMoneyHistory);
|
| | |
|
| | | // 统计分享个数
|
| | | long countUserShares = userShareGoodsHistoryMapper.countUserShares(uid);
|
| | |
| | | return userInfoMapper.longTimeNoLogin(daysNum, list);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 根据电话号码、邀请码获取邀请用户
|
| | | * @param phone
|
| | | * @param inviteCode
|
| | | * @return
|
| | | */
|
| | | @Override
|
| | | public UserInfo getInfoByPhoneOrInviteCode(String phone, String inviteCode) {
|
| | | return userInfoMapper.getInfoByPhoneOrInviteCode(phone, inviteCode);
|
| | | }
|
| | | |
| | | }
|