| | |
| | | import com.yeshi.fanli.service.inter.order.HongBaoOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.HongBaoV2Service;
|
| | | import com.yeshi.fanli.service.inter.order.InviteOrderSubsidyService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserSystemCouponRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserSystemCouponService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserVIPInfoService userVIPInfoService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | | // 奖励订单图片
|
| | | public final static String PIC_REWARD = "http://img.flqapp.com/resource/order/order_state_reward.png";
|
| | |
| | |
|
| | | return listOrder;
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 订单信息加工
|
| | |
| | | if (sourceType == null) {
|
| | | couponFactory(order, hasRewardCoupon, hongBaoState, hongBaoType, null, uid, vip, acceptData);
|
| | | } else if (sourceType == Constant.SOURCE_TYPE_TAOBAO) {
|
| | | couponFactory(order, hasRewardCoupon, hongBaoState, hongBaoType,
|
| | | listRecordTB, uid, vip, acceptData);
|
| | | couponFactory(order, hasRewardCoupon, hongBaoState, hongBaoType, listRecordTB, uid, vip,
|
| | | acceptData);
|
| | | } else if (sourceType == Constant.SOURCE_TYPE_JD) {
|
| | | couponFactory(order, hasRewardCoupon, hongBaoState, hongBaoType,
|
| | | listRecordJD, uid, vip, acceptData);
|
| | | couponFactory(order, hasRewardCoupon, hongBaoState, hongBaoType, listRecordJD, uid, vip,
|
| | | acceptData);
|
| | | } else if (sourceType == Constant.SOURCE_TYPE_PDD) {
|
| | | couponFactory(order, hasRewardCoupon, hongBaoState, hongBaoType,
|
| | | listRecordPDD, uid, vip, acceptData);
|
| | | couponFactory(order, hasRewardCoupon, hongBaoState, hongBaoType, listRecordPDD, uid, vip,
|
| | | acceptData);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 订单: 免单标识 奖励标识
|
| | | *
|
| | |
| | | * @param list
|
| | | * @param signList
|
| | | */
|
| | | private void couponFactory(CommonOrderVO order, boolean hasRewardCoupon, Integer hongBaoState,
|
| | | Integer hongBaoType, List<UserSystemCouponRecord> list, Long uid, boolean vip, AcceptData acceptData) throws Exception{
|
| | | private void couponFactory(CommonOrderVO order, boolean hasRewardCoupon, Integer hongBaoState, Integer hongBaoType,
|
| | | List<UserSystemCouponRecord> list, Long uid, boolean vip, AcceptData acceptData) throws Exception {
|
| | |
|
| | | // 是否免单商品
|
| | | boolean freeOrder = false;
|
| | |
| | | rewardMap.put("jump", jump);
|
| | | order.setRewardDetail(rewardMap);
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | public Map<String, BigDecimal> countHistoryOrder(Long uid, Integer day, Integer source) {
|
| | |
| | | if (oldCommonOrder == null)// 新增
|
| | | {
|
| | | commonOrder.setCreateTime(new Date());
|
| | | // 查询是否为vip
|
| | | boolean isVIP = userVIPInfoService.isVIP(commonOrder.getUserInfo().getId());
|
| | | if (isVIP)
|
| | | commonOrder.setUrank(100);// VIP订单
|
| | | else {
|
| | | UserInfo user = userInfoService.selectAvailableByPrimaryKey(commonOrder.getUserInfo().getId());
|
| | | if (user != null)
|
| | | commonOrder.setUrank(user.getRank());
|
| | | }
|
| | |
|
| | | commonOrderMapper.insertSelective(commonOrder);
|
| | | // 插入映射,保证交易ID的完整性
|
| | | commonOrderTradeIdMapMapper.insertSelective(new CommonOrderTradeIdMap(commonOrder.getId(),
|