| | |
| | | SimpleDateFormat formatday = new SimpleDateFormat("yyyy.MM.dd");
|
| | |
|
| | | // 是否存在奖励券
|
| | | boolean hasRewardCoupon = userSystemCouponService.hasRewardCoupon(uid);
|
| | | //boolean hasRewardCoupon = userSystemCouponService.hasRewardCoupon(uid);
|
| | | boolean hasRewardCoupon = userSystemCouponService.getIncludeNotExchange(uid);
|
| | | boolean exchangeCoupon = userSystemCouponService.getIncludeExchange(uid);
|
| | |
|
| | | // 2019.8.1开始返回维权信息
|
| | | Date august = null;
|
| | |
| | | } else {
|
| | | // 奖励订单、免单 使用记录
|
| | | if (sourceType == null) {
|
| | | setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, null, signList, acceptData);
|
| | | setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType, null, signList, acceptData);
|
| | | } else if (sourceType == Constant.SOURCE_TYPE_TAOBAO) {
|
| | | setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, listRecordTB, signList, acceptData);
|
| | | setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType, listRecordTB, signList, acceptData);
|
| | | } else if (sourceType == Constant.SOURCE_TYPE_JD) {
|
| | | setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, listRecordJD, signList, acceptData);
|
| | | setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType, listRecordJD, signList, acceptData);
|
| | | } else if (sourceType == Constant.SOURCE_TYPE_PDD) {
|
| | | setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, listRecordPDD, signList, acceptData);
|
| | | setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType, listRecordPDD, signList, acceptData);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | * @param list
|
| | | * @param signList
|
| | | */
|
| | | public void setSystemCouponRecord(CommonOrderVO order, boolean hasRewardCoupon, Integer hongBaoState,
|
| | | public void setSystemCouponRecord(CommonOrderVO order, boolean hasRewardCoupon, boolean exchangeCoupon, Integer hongBaoState,
|
| | | Integer hongBaoType, List<UserSystemCouponRecord> list, List<String> signList, AcceptData acceptData) {
|
| | |
|
| | | // 是否免单商品
|
| | |
| | | // 订单标识
|
| | | order.setSignList(signList);
|
| | |
|
| | | // 1.6.5 是否存在新兑换的券
|
| | | if (!hasRewardCoupon && exchangeCoupon) {
|
| | | try {
|
| | | String downTime = order.getDownTime();
|
| | | if (!StringUtil.isNullOrEmpty(downTime)) {
|
| | | long downOrderTime = TimeUtil.convertDateToTemp2(downTime);
|
| | | long limitDate = TimeUtil.convertDateToTemp("2019-09-01");
|
| | | if (downOrderTime > limitDate )
|
| | | hasRewardCoupon = true;
|
| | | }
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | boolean rewardOrder = false;
|
| | |
|
| | | int type = 1; // 1 常规跳转页面 2弹出选项(奖励券)
|
| | |
| | | // 有可用的奖励券 、非免单订单 、且已到账的 、返利订单
|
| | | type = 2;
|
| | | rewardOrder = true;
|
| | | }
|
| | | } |
| | |
|
| | | if (rewardOrder) {
|
| | | ClientTextStyleVO rewardStyleVO = new ClientTextStyleVO();
|
| | |
| | | return commonOrderMapper.listBySourceTypeAndStateAndThirdCrateTime(sourceType, state, minTime, maxTime,
|
| | | (page - 1) * pageSize, pageSize);
|
| | | }
|
| | | |
| | | @Override
|
| | | public List<CommonOrder> getByOrderNo(Long uid, String orderNO) {
|
| | | return commonOrderMapper.getByOrderNo(uid, orderNO);
|
| | | }
|
| | |
|
| | | }
|