| | |
| | | import java.io.PrintWriter;
|
| | | import java.math.BigDecimal;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
| | | // 推广红包
|
| | | if (from != null && from.equals("taolijin")) {
|
| | | // 计算推广红包
|
| | | String warningRate = configTaoLiJinService.getValueByKey("warning_value");
|
| | | String warningRate = configTaoLiJinService.getValueByKey("warning_value", new Date());
|
| | | BigDecimal spreadMoney = TaoLiJinUtil.getSpreadMoney(warningRate, goods);
|
| | |
|
| | | // 推广红包 不能小于1
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | // 是否为新用户
|
| | | boolean isNewUser = userInfoExtraService.isNewUser(uid);
|
| | | // 取消新用户自购
|
| | | boolean isNewUser = false;// userInfoExtraService.isNewUser(uid);
|
| | | if (isNewUser) {
|
| | | // 判定为老用户: 新人只要使用了新人红包,也就是那1块钱,那么,他看到的分享爆款中的商品-就只能分享。
|
| | | long countRecord = userTaoLiJinRecordService.countRecordByUid(uid);
|
| | |
| | | otherInfo.setSpreadHongBao(spreadHongBao);
|
| | | goodsDetail.setOtherInfo(otherInfo);
|
| | |
|
| | | goodsDetail.getMoneyInfo().setFanliMoney(TaoBaoUtil.getGoodsHongBaoInfo(goods,
|
| | | hongBaoManageService.getTLJShareRate(System.currentTimeMillis())));
|
| | | goodsDetail.getMoneyInfo().setShareMoney(TaoBaoUtil.getGoodsHongBaoInfo(goods,
|
| | | hongBaoManageService.getTLJShareRate(System.currentTimeMillis())));
|
| | |
|
| | | // 用户淘礼金
|
| | | UserMoneyExtra userMoneyExtra = userMoneyExtraService.selectByPrimaryKey(uid);
|
| | | if (userMoneyExtra == null || userMoneyExtra.getTlj() == null) {
|
| | |
| | | } else {
|
| | | extraVO.setUserTLJ(userMoneyExtra.getTlj().setScale(2).toString());
|
| | | }
|
| | | helpLink = configTaoLiJinService.getValueByKey("share_goods_help_link");
|
| | | helpLink = configTaoLiJinService.getValueByKey("share_goods_help_link", new Date());
|
| | |
|
| | | } else if (from != null && from.equals("taolijin_buy")) {
|
| | | // 查询分享库
|
| | |
| | | extraVO.setShare(shareInfoVO);
|
| | |
|
| | | if (convertUrl != null) {
|
| | | extraVO.setCouponJumpLink(convertUrl.getShortUrl());
|
| | | extraVO.setCouponJumpLink(convertUrl.getUrl());
|
| | | extraVO.setNativeCouponJumpLink(PinDuoDuoUtil.getAndroidNativeURI(convertUrl.getUrl()));
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | goodsList = TaoKeApiUtil.getBatchGoodsInfo(ids);
|
| | | } catch (TaoKeApiException e1) {
|
| | | e1.printStackTrace();
|
| | | } catch (TaobaoGoodsDownException e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | |
|
| | | if (goodsList != null && goodsList.size() > 0) {
|