| | |
| | | @Resource
|
| | | private TaoBaoWeiQuanOrderService taoBaoWeiQuanOrderService;
|
| | |
|
| | | |
| | | @Resource
|
| | | private JumpDetailV2Service jumpDetailV2Service;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private ThreeSaleDetailService threeSaleDetailService;
|
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 订单列表
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | long count = 0L;
|
| | | List<CommonOrderVO> list = null;
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | list = commonOrderService.getOrderList(acceptData, page, uid, state, orderType,
|
| | | orderState, orderNo, startTime, endTime, dateType, listSource, notBackSuVip);
|
| | | |
| | | count = commonOrderService.countOrderList(uid, state, orderType, orderState, orderNo,
|
| | | list = commonOrderService.getOrderList(acceptData, page, uid, state, orderType, orderState, orderNo,
|
| | | startTime, endTime, dateType, listSource, notBackSuVip);
|
| | |
|
| | | count = commonOrderService.countOrderList(uid, state, orderType, orderState, orderNo, startTime,
|
| | | endTime, dateType, listSource, notBackSuVip);
|
| | | } else {
|
| | | list = commonOrderService.getOrderByUid(acceptData, page, uid, state, orderType,
|
| | | orderState, orderNo, startTime, endTime, dateType, listSource);
|
| | | count = commonOrderService.countGroupOrderNoByUid(uid, state, orderType, orderState, orderNo,
|
| | | list = commonOrderService.getOrderByUid(acceptData, page, uid, state, orderType, orderState, orderNo,
|
| | | startTime, endTime, dateType, listSource);
|
| | | count = commonOrderService.countGroupOrderNoByUid(uid, state, orderType, orderState, orderNo, startTime,
|
| | | endTime, dateType, listSource);
|
| | | }
|
| | |
|
| | | // 判断是否需要显示订单找回提示 8秒内请求3次触发
|
| | |
| | | long count = 0;
|
| | | List<CommonOrderVO> list = null;
|
| | | if (NumberUtil.isNumeric(key.replace("-", ""))) {
|
| | | list = commonOrderService.getOrderByUid(acceptData, page, uid, null, null, null, key, null, null, null,
|
| | | null);
|
| | | if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | commonOrderService.getOrderList(acceptData, page, uid, null, null, null, key, null, null, null,
|
| | | null, false);
|
| | | } else
|
| | | list = commonOrderService.getOrderByUid(acceptData, page, uid, null, null, null, key, null, null,
|
| | | null, null);
|
| | | }
|
| | |
|
| | | if (list == null || list.size() == 0) {
|
| | |
| | | teamMoney = hongBaoV2CountService.getRewardMoneyToCount(uid, dateType, 3, null);
|
| | | }
|
| | |
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("show", show);
|
| | | data.put("selfMoney", selfMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | |
| | | data.put("inviteMoney", teamMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 返利说明
|
| | |
| | | }
|
| | |
|
| | | // 红包信息
|
| | | List<HongBaoOrder> hoList = hongBaoOrderService.listDetailByOrderIdAndSourceTypeAndUid(orderNo, sourceType, uid);
|
| | | List<HongBaoOrder> hoList = hongBaoOrderService.listDetailByOrderIdAndSourceTypeAndUid(orderNo, sourceType,
|
| | | uid);
|
| | | HongBaoCountVO hongBaoCountVO = hongBaoOrderService.getHongBaoCountVO(hoList);
|
| | |
|
| | | Integer hongBaoState = hongBaoCountVO.getCurrentState();
|
| | |
| | | if (goodsList != null)
|
| | | for (CommonOrderGoods goods : goodsList)
|
| | | orderGoodsMap.put(goods.getId(), goods);
|
| | | |
| | |
|
| | | OrderRebateVO orderRebateVO = new OrderRebateVO();
|
| | | // 红包信息
|
| | |
| | | goodsVO.setSubsidy("¥" + fanli.subtract(commission).setScale(2, BigDecimal.ROUND_DOWN));
|
| | | // 达人补贴
|
| | | if (userLevel != UserLevelEnum.daRen) {
|
| | | BigDecimal darenFanli = orderHongBaoMoneyComputeService.computeFanliMoney(commonOrder, UserLevelEnum.daRen);
|
| | | BigDecimal darenFanli = orderHongBaoMoneyComputeService.computeFanliMoney(commonOrder,
|
| | | UserLevelEnum.daRen);
|
| | | goodsVO.setOriginSubsidy("¥" + darenFanli.subtract(commission).setScale(2, BigDecimal.ROUND_DOWN) + "");
|
| | | }
|
| | |
|
| | |
| | | voList.add(goodsVO);
|
| | |
|
| | | if (type == 1 ) {
|
| | | upperTotalMoney = upperTotalMoney.add(orderHongBaoMoneyComputeService.computeFanliMoney(commonOrder, upperLevel));
|
| | | upperTotalMoney = upperTotalMoney
|
| | | .add(orderHongBaoMoneyComputeService.computeFanliMoney(commonOrder, upperLevel));
|
| | | } else if (type == 2) {
|
| | | upperTotalMoney = upperTotalMoney.add(orderHongBaoMoneyComputeService.computeShareMoney(commonOrder, upperLevel));
|
| | | upperTotalMoney = upperTotalMoney
|
| | | .add(orderHongBaoMoneyComputeService.computeShareMoney(commonOrder, upperLevel));
|
| | | } else if (type == 3) {
|
| | | List<UserTeamLevel> bossLevelList = new ArrayList<>();
|
| | | if (hongBaoV2.getType() == HongBaoV2.TYPE_YIJI || hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_YIJI) {
|
| | | bossLevelList.add(new UserTeamLevel(null, UserLevelEnum.superVIP));
|
| | | upperTotalMoney = upperTotalMoney.add(orderHongBaoMoneyComputeService.computeFirstInviteMoney(commonOrder,
|
| | | buyer, bossLevelList));
|
| | | upperTotalMoney = upperTotalMoney.add(
|
| | | orderHongBaoMoneyComputeService.computeFirstInviteMoney(commonOrder, buyer, bossLevelList));
|
| | | } else {
|
| | | Integer bRank = hongBaoV2Service.getDirectBossUrankByPid(hongBaoOrder.getHongBaoV2().getParent().getId());
|
| | | Integer bRank = hongBaoV2Service
|
| | | .getDirectBossUrankByPid(hongBaoOrder.getHongBaoV2().getParent().getId());
|
| | | UserLevelEnum directBoss = UserLevelUtil.getByOrderRank(bRank);
|
| | | if (directBoss == null) {
|
| | | directBoss = UserLevelEnum.daRen;
|
| | | }
|
| | | bossLevelList.add(new UserTeamLevel(null, directBoss));
|
| | | bossLevelList.add(new UserTeamLevel(null, UserLevelEnum.superVIP));
|
| | | upperTotalMoney = upperTotalMoney.add(orderHongBaoMoneyComputeService.computeSecondInviteMoney(commonOrder,
|
| | | buyer, bossLevelList));
|
| | | upperTotalMoney = upperTotalMoney.add(orderHongBaoMoneyComputeService
|
| | | .computeSecondInviteMoney(commonOrder, buyer, bossLevelList));
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | orderRebateVO.setFanLiDesc(predictDesc + typeName);
|
| | | orderRebateVO.setFanLi("¥" + hongBao.setScale(2, BigDecimal.ROUND_DOWN));
|
| | |
| | | boolean rewardSuccess = false;
|
| | | List<String> listNo = new ArrayList<String>();
|
| | | listNo.add(orderNo);
|
| | | List<UserSystemCouponRecord> useRecord = userSystemCouponRecordService.getRecordByOrderNoList(sourceType, listNo);
|
| | | List<UserSystemCouponRecord> useRecord = userSystemCouponRecordService.getRecordByOrderNoList(sourceType,
|
| | | listNo);
|
| | | if (useRecord != null && useRecord.size() > 0) {
|
| | | for (UserSystemCouponRecord couponRecord : useRecord) {
|
| | | Integer state = couponRecord.getState();
|
| | | String cType = couponRecord.getCouponType();
|
| | | if (CouponTypeEnum.rebatePercentCoupon.name().equals(cType) && UserSystemCouponRecord.STATE_SUCCESS == state) {
|
| | | if (CouponTypeEnum.rebatePercentCoupon.name().equals(cType)
|
| | | && UserSystemCouponRecord.STATE_SUCCESS == state) {
|
| | | rewardSuccess = true;
|
| | | break;
|
| | | } else if (CouponTypeEnum.freeCoupon.name().equals(cType) || CouponTypeEnum.welfareFreeCoupon.name().equals(cType)
|
| | | } else if (CouponTypeEnum.freeCoupon.name().equals(cType)
|
| | | || CouponTypeEnum.welfareFreeCoupon.name().equals(cType)
|
| | | || CouponTypeEnum.freeCouponBuy.name().equals(cType)) {
|
| | | freeState = state;
|
| | | break;
|
| | |
| | | Date endDay = DateUtil.plusDayDate(Constant.COUPON_REWARD_LIMIT_DAY, accountTime);
|
| | | long currentTime = java.lang.System.currentTimeMillis();
|
| | | if (endDay.getTime() > currentTime && !vip) {
|
| | | UserSystemCouponRecord couponRecord = userSystemCouponRecordService.getRecordByOrderNo(orderNo, null);
|
| | | UserSystemCouponRecord couponRecord = userSystemCouponRecordService.getRecordByOrderNo(orderNo,
|
| | | null);
|
| | | if (couponRecord == null) {
|
| | | orderRebateVO.setCoupon(true);
|
| | | orderRebateVO.setCouponType(1);
|
| | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 用户订单统计
|
| | | *
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "teamOrderSearch")
|
| | | public void teamOrderSearch(String callback, AcceptData acceptData, Long uid, Integer page, String key, PrintWriter out) {
|
| | | public void teamOrderSearch(String callback, AcceptData acceptData, Long uid, Integer page, String key,
|
| | | PrintWriter out) {
|
| | | if (uid == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | return;
|
| | |
| | | if (page == null)
|
| | | page = 1;
|
| | |
|
| | | List<TeamOrderVO> list = teamDividentsSourceOrderUserMapService.searchByOrderNoOrSourceUid((page-1)*20, 20, uid, key);
|
| | | List<TeamOrderVO> list = teamDividentsSourceOrderUserMapService.searchByOrderNoOrSourceUid((page - 1) * 20,
|
| | | 20, uid, key);
|
| | | if (list == null) {
|
| | | list = new ArrayList<>();
|
| | | }
|
| | |
| | | teamVO.setNickName(userInfo.getNickName());
|
| | | teamVO.setPortrait(userInfo.getPortrait());
|
| | |
|
| | | |
| | | BigDecimal payment = BigDecimal.ZERO;
|
| | | List<CommonOrder> listOrder = commonOrderService.listBySourceTypeAndOrderId(teamVO.getSourceType(), teamVO.getOrderNo());
|
| | | List<CommonOrder> listOrder = commonOrderService.listBySourceTypeAndOrderId(teamVO.getSourceType(),
|
| | | teamVO.getOrderNo());
|
| | | if (listOrder != null && listOrder.size() > 0) {
|
| | | for (CommonOrder order: listOrder) {
|
| | | payment = payment.add(order.getPayment());
|
| | |
| | |
|
| | | // 维权信息
|
| | | Integer orderState = order.getState();
|
| | | if (!StringUtil.isNullOrEmpty(teamVO.getServiceTime()) && CommonOrder.STATE_WQ == orderState) {
|
| | | if (!StringUtil.isNullOrEmpty(teamVO.getServiceTime())
|
| | | && CommonOrder.STATE_WQ == orderState) {
|
| | | if (order.getSourceType() == Constant.SOURCE_TYPE_TAOBAO) {
|
| | | UserOrderWeiQuanRecord record = userOrderWeiQuanRecordService.selectByOrderInfoAndUid(uid, order.getTradeId(), order.getSourceType());
|
| | | UserOrderWeiQuanRecord record = userOrderWeiQuanRecordService
|
| | | .selectByOrderInfoAndUid(uid, order.getTradeId(), order.getSourceType());
|
| | | if (record != null) {
|
| | | teamVO.setServiceTime(TimeUtil.formatDate(record.getCreateTime()));
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | teamVO.setPayment(payment);
|
| | | |
| | |
|
| | | // 订单时间信息
|
| | | String orderTime = "下单" + teamVO.getDownTime() ;
|
| | |
| | | teamVO.setOrderTime(orderTime);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | GsonBuilder gsonBuilder = new GsonBuilder().excludeFieldsWithoutExposeAnnotation();
|
| | | gsonBuilder.registerTypeAdapter(BigDecimal.class, new JsonSerializer<BigDecimal>() {
|