| | |
| | | import com.yeshi.fanli.service.inter.tlj.DeviceTaoLiJinRecordService;
|
| | | import com.yeshi.fanli.service.inter.tlj.GoodsTaoLiJinRateService;
|
| | | import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinOriginService;
|
| | | import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.ShamUserService;
|
| | | import com.yeshi.fanli.service.inter.user.TBPidService;
|
| | | import com.yeshi.fanli.service.inter.user.UserCustomSettingsService;
|
| | |
| | |
|
| | | @Resource
|
| | | private DeviceSexService deviceSexService;
|
| | | |
| | | @Resource
|
| | | private UserTaoLiJinRecordService userTaoLiJinRecordService;
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
| | |
|
| | | // 推广红包
|
| | | if (from != null && from.equals("taolijin")) {
|
| | | BigDecimal spreadMoney = goodsTaoLiJinRateService.getGoodsSpreadMoney(goods);
|
| | | // 推广红包 不能小于1
|
| | | if (spreadMoney.compareTo(new BigDecimal(1)) < 0) {
|
| | | out.print(JsonUtil.loadFalseResult(2, "商品不存在"));
|
| | | return;
|
| | | }
|
| | | |
| | | // 是否为新用户
|
| | | boolean isNewUser = userInfoExtraService.isNewUser(uid);
|
| | | if (!isNewUser) {
|
| | | if (isNewUser) {
|
| | | // 判定为老用户: 新人只要使用了新人红包,也就是那1块钱,那么,他看到的分享爆款中的商品-就只能分享。
|
| | | long countRecord = userTaoLiJinRecordService.countRecordByUid(uid);
|
| | | if (countRecord > 0) {
|
| | | isNewUser = false;
|
| | | }
|
| | | }
|
| | | |
| | | SpreadHongBao spreadHongBao = new SpreadHongBao();
|
| | | if (isNewUser) {
|
| | | spreadHongBao.setMoney("1");
|
| | | } else {
|
| | | spreadHongBao.setMoney(spreadMoney.toString());
|
| | | |
| | | moneyType = 2;
|
| | | fanliValid = false;
|
| | | ClientTextStyleVO textStyleVO1 = new ClientTextStyleVO();
|
| | |
| | |
|
| | | data.put("listTip", listText);
|
| | | }
|
| | | |
| | | BigDecimal spreadMoney = goodsTaoLiJinRateService.getGoodsSpreadMoney(goods);
|
| | | // 推广红包 不能小于1
|
| | | if (spreadMoney.compareTo(new BigDecimal(1)) < 0) {
|
| | | out.print(JsonUtil.loadFalseResult(2, "商品不存在"));
|
| | | return;
|
| | | }
|
| | | SpreadHongBao spreadHongBao = new SpreadHongBao();
|
| | | spreadHongBao.setMoney(spreadMoney.toString());
|
| | | spreadHongBao.setTip("当日领取,两天内使用,过时无效");
|
| | | goodsJson.put("spreadHongBao", spreadHongBao);
|
| | | |
| | |
|
| | | // 用户剩余可以淘礼金验证
|
| | | UserMoneyExtra userMoneyExtra = userMoneyExtraService.selectByPrimaryKey(uid);
|