| | |
| | | import com.yeshi.fanli.service.inter.goods.CommonGoodsService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.msg.UserOtherMsgNotificationService;
|
| | | import com.yeshi.fanli.service.inter.tlj.GoodsTaoLiJinRateService;
|
| | | import com.yeshi.fanli.service.inter.tlj.ConfigTaoLiJinService;
|
| | | import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinDetailService;
|
| | | import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinOriginService;
|
| | | import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinRecordService;
|
| | | import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinReportService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserMoneyExtraService;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.factory.CommonGoodsFactory;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoLiJinUtil;
|
| | | import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
|
| | | import com.yeshi.fanli.vo.user.UserTaoLiJinRecordVO;
|
| | |
|
| | |
| | | private UserTaoLiJinOriginService userTaoLiJinOriginService;
|
| | |
|
| | | @Resource
|
| | | private GoodsTaoLiJinRateService goodsTaoLiJinRateService;
|
| | | private ConfigTaoLiJinService configTaoLiJinService;
|
| | |
|
| | | @Resource
|
| | | private UserOtherMsgNotificationService userOtherMsgNotificationService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | |
|
| | |
|
| | | @Override
|
| | |
| | | } catch (ParseException e2) {
|
| | | e2.printStackTrace();
|
| | | }
|
| | | BigDecimal perface = goodsTaoLiJinRateService.getGoodsSpreadMoney(goods);
|
| | | // 新人红包 自购一元
|
| | | BigDecimal perface = new BigDecimal(1);
|
| | |
|
| | | return createUserTaoLiJin(1, uid, goods.getAuctionId(), perface, 1, name, sendStartTime,
|
| | | sendEndTime, null, useEndTime);
|
| | |
| | | e2.printStackTrace();
|
| | | }
|
| | |
|
| | | BigDecimal perface = goodsTaoLiJinRateService.getGoodsSpreadMoney(goods);
|
| | | boolean isNewUser = userInfoExtraService.isNewUser(uid);
|
| | | if (isNewUser) {
|
| | | // 判定为老用户: 新人只要使用了新人红包,也就是那1块钱,那么,他看到的分享爆款中的商品-就只能分享。
|
| | | long countRecord = userTaoLiJinRecordMapper.countRecordByUid(uid);
|
| | | if (countRecord > 0) {
|
| | | isNewUser = false;
|
| | | }
|
| | | }
|
| | | |
| | | BigDecimal perface = null;
|
| | | if (isNewUser) {
|
| | | perface = new BigDecimal(1);
|
| | | } else {
|
| | | // 计算推广红包
|
| | | String warningRate = configTaoLiJinService.getValueByKey("warning_value");
|
| | | perface = TaoLiJinUtil.getSpreadMoney(warningRate, goods);
|
| | | }
|
| | |
|
| | | return createUserTaoLiJin(2, uid, goods.getAuctionId(), perface, totalNum, name, sendStartTime,
|
| | | sendEndTime, null, useEndTime);
|
| | |
| | | } else {
|
| | | userTaoLiJinRecordVO.setUserType(1);
|
| | | }
|
| | | |
| | | listGoods.remove(i);
|
| | | break;
|
| | | }
|
| | | }
|