| | |
| | |
|
| | | @Resource
|
| | | private DaTaoKeGoodsDetailService daTaoKeGoodsDetailService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private UserMoneyExtraService userMoneyExtraService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private UserTaoLiJinOriginService userTaoLiJinOriginService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private ConfigTaoLiJinService configTaoLiJinService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private DeviceTaoLiJinRecordService deviceTaoLiJinRecordService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private DeviceSexService deviceSexService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private UserTaoLiJinRecordService userTaoLiJinRecordService;
|
| | |
|
| | | |
| | | |
| | |
|
| | | @Resource
|
| | | private RecommendGoodsDeleteHistoryService recommendGoodsDeleteHistoryService;
|
| | |
| | | try {
|
| | | // 获取设备定义性别
|
| | | int deviceSex = deviceSexService.getDeviceSex(acceptData.getDevice());
|
| | | |
| | |
|
| | | // 1、专题模块
|
| | | JSONObject root = specialService.listCacheSpecialToIndex(acceptData, deviceSex);
|
| | |
|
| | |
| | | if (uid == null) {
|
| | | data.put("collected", false);
|
| | | } else {
|
| | | CollectionGoodsV2 collectionGoods = collectionGoodsV2Service.findByUidAndAuctionId(uid, id);
|
| | | CollectionGoodsV2 collectionGoods = collectionGoodsV2Service.findByUidAndAuctionId(uid, id);
|
| | | data.put("collected", collectionGoods != null ? true : false);
|
| | | }
|
| | |
|
| | |
| | | redisManager.saveCommonTaoToken(tb.getAuctionId(), token);
|
| | | }
|
| | | }
|
| | | // 测试
|
| | | if (!Constant.IS_TEST)
|
| | | if (!VersionUtil.greaterThan_1_5_60(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | tb.setCouponLinkTaoToken(token);
|
| | |
|
| | | // 服务端转链
|
| | |
| | | + tb.getCouponEffectiveEndTime().replace("-", "."));
|
| | | // 券的口令
|
| | |
|
| | | // 测试
|
| | | if (!Constant.IS_TEST)
|
| | | if (VersionUtil.greaterThan_1_5_60(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | couponInfo.put("couponToken", "");
|
| | | else
|
| | | couponInfo.put("couponToken", token);
|
| | | goodsJson.put("couponInfo", couponInfo);
|
| | |
|
| | |
| | | data.put("detailWebUrl", "http://apph5.yeshitv.com/apppage/goods_img.html?id=" + id);
|
| | |
|
| | | String noRebateHelpLink = null;
|
| | | |
| | |
|
| | | // 商品链接
|
| | | String h5Url = String.format("http://%s%s?id=%s&appType=flq", configService.getH5Host(),
|
| | |
| | | } catch (Exception e) {
|
| | | data.put("h5Url", h5Url);
|
| | | }
|
| | | |
| | |
|
| | | // 是否有返利
|
| | | boolean fanliValid = true;
|
| | | //资金类型 1-返 2-奖
|
| | | // 资金类型 1-返 2-奖
|
| | | int moneyType = 1;
|
| | | |
| | |
|
| | | // 推广红包
|
| | | if (from != null && from.equals("taolijin")) {
|
| | | // 计算推广红包
|
| | | String warningRate = configTaoLiJinService.getValueByKey("warning_value");
|
| | | BigDecimal spreadMoney = TaoLiJinUtil.getSpreadMoney(warningRate, goods);
|
| | | |
| | |
|
| | | // 推广红包 不能小于1
|
| | | if (spreadMoney.compareTo(new BigDecimal(1.1)) < 0) {
|
| | | out.print(JsonUtil.loadFalseResult(2, "商品不存在"));
|
| | | return;
|
| | | }
|
| | | |
| | |
|
| | | // 是否为新用户
|
| | | boolean isNewUser = userInfoExtraService.isNewUser(uid);
|
| | | if (isNewUser) {
|
| | |
| | | isNewUser = false;
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | SpreadHongBao spreadHongBao = new SpreadHongBao();
|
| | | if (isNewUser) {
|
| | | spreadHongBao.setMoney("1");
|
| | | } else {
|
| | | spreadHongBao.setMoney(spreadMoney.toString());
|
| | | |
| | |
|
| | | moneyType = 2;
|
| | | fanliValid = false;
|
| | | ClientTextStyleVO textStyleVO1 = new ClientTextStyleVO();
|
| | |
| | | ClientTextStyleVO textStyleVO4 = new ClientTextStyleVO();
|
| | | textStyleVO4.setContent("领红包!");
|
| | | textStyleVO4.setColor("#F14242");
|
| | | |
| | |
|
| | | List<ClientTextStyleVO> listText = new ArrayList<ClientTextStyleVO>();
|
| | | listText.add(textStyleVO1);
|
| | | listText.add(textStyleVO2);
|
| | | listText.add(textStyleVO3);
|
| | | listText.add(textStyleVO4);
|
| | | |
| | |
|
| | | data.put("listTip", listText);
|
| | | } |
| | | }
|
| | | spreadHongBao.setTip("当日领取,两天内使用,过时无效");
|
| | | goodsJson.put("spreadHongBao", spreadHongBao);
|
| | | |
| | |
|
| | | // 用户剩余可以淘礼金验证
|
| | | UserMoneyExtra userMoneyExtra = userMoneyExtraService.selectByPrimaryKey(uid);
|
| | | if (userMoneyExtra == null || userMoneyExtra.getTlj() == null) {
|
| | | if (userMoneyExtra == null || userMoneyExtra.getTlj() == null) {
|
| | | data.put("userHongbao", new BigDecimal(0).setScale(2).toString());
|
| | | } else {
|
| | | data.put("userHongbao", userMoneyExtra.getTlj().setScale(2).toString());
|
| | | }
|
| | | |
| | |
|
| | | noRebateHelpLink = configTaoLiJinService.getValueByKey("share_goods_help_link");
|
| | |
|
| | | if (Constant.IS_TEST) {
|
| | | fanliValid = true;
|
| | | goodsJson.put("shareValid", false);
|
| | | JSONObject tljNum = new JSONObject();
|
| | | tljNum.put("percent", "80");
|
| | | tljNum.put("num", "8825");
|
| | | goodsJson.put("tljNum", tljNum);
|
| | | }
|
| | |
|
| | | }
|
| | | |
| | |
|
| | | goodsJson.put("moneyType", moneyType);
|
| | | goodsJson.put("fanliValid", fanliValid);
|
| | | data.put("goods", goodsJson);
|
| | | |
| | |
|
| | | if (!StringUtil.isNullOrEmpty(noRebateHelpLink)) {
|
| | | data.put("noRebateHelpLink", noRebateHelpLink);
|
| | | } else {
|
| | | data.put("noRebateHelpLink", configService.get("no_rebate_help_link"));
|
| | | }
|
| | | |
| | | |
| | |
|
| | | // 取消分享活动
|
| | | // if (!StringUtil.isNullOrEmpty(uid)
|
| | | // &&
|
| | |
| | | public void run() {
|
| | | // 添加浏览记录
|
| | | try {
|
| | | scanHistoryV2Service.addScanHistory(uid, acceptData.getDevice(),goodsInfo);
|
| | | scanHistoryV2Service.addScanHistory(uid, acceptData.getDevice(), goodsInfo);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | |
| | |
|
| | | List<Special> list = new ArrayList<Special>();
|
| | | // 专题活动
|
| | | String specialCard = "special_activities";
|
| | |
| | | if (listSpecial != null) {
|
| | | list.addAll(listSpecial);
|
| | | }
|
| | | |
| | |
|
| | | for (int i = 0; i < list.size(); i++) {
|
| | | Special special = list.get(i);
|
| | | |
| | |
|
| | | JumpDetailV2 jumpDetail = special.getJumpDetail();
|
| | | if (jumpDetail != null) {
|
| | | jumpDetail.setNeedLogin(special.isJumpLogin());
|
| | | special.setJumpDetail(jumpDetail);
|
| | | }
|
| | | |
| | | |
| | |
|
| | | String name = special.getName();
|
| | | if (StringUtil.isNullOrEmpty(name)) {
|
| | | continue;
|
| | | }
|
| | | |
| | |
|
| | | // 是否需要弹出框
|
| | | if (name.equals("账户等级特权")) { |
| | | if (name.equals("账户等级特权")) {
|
| | | if (!VersionUtil.greaterThan_1_5_60(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | list.remove(i);
|
| | | i--;
|