| | |
| | |
|
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | | |
| | | |
| | |
|
| | | @RequestMapping(value = "getrecommendsection")
|
| | | public void getRecommendSection(AcceptData acceptData, int index, PrintWriter out) {
|
| | |
| | |
|
| | | listswiper = swiperPictureService.getByBannerCard(swiperCard);
|
| | |
|
| | | if (listswiper != null && listswiper.size() > 0) {
|
| | | for (SwiperPicture swiperPicture : listswiper) {
|
| | | swiperPicture.setBannerId(null);
|
| | | swiperPicture.setCreatetime(null);
|
| | | swiperPicture.setUpdatetime(null);
|
| | | swiperPicture.setState(null);
|
| | | swiperPicture.setRemark(null);
|
| | | }
|
| | | if (listswiper == null) {
|
| | | listswiper = new ArrayList<SwiperPicture>();
|
| | | }
|
| | |
|
| | | } catch (Exception e) {
|
| | |
| | |
|
| | | if (listSpecial != null && listSpecial.size() > 0) {
|
| | | for (Special special : listSpecial) {
|
| | | special.setCreatetime(null);
|
| | | special.setUpdatetime(null);
|
| | | special.setState(null);
|
| | | special.setRemark(null);
|
| | | special.setCard(null);
|
| | | special.setCardId(null);
|
| | |
|
| | | if ("限时秒杀".equals(special.getName())) {
|
| | | miaoShaSpecial = special;
|
| | |
| | | // 其他专题
|
| | | specialList.add(special);
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("banner", listswiper);
|
| | | root.put("honest", honestList);
|
| | | root.put("special", specialList);
|
| | | |
| | | root.put("banner", JsonUtil.getApiCommonGson().toJson(listswiper));
|
| | | root.put("honest", JsonUtil.getApiCommonGson().toJson(honestList));
|
| | | root.put("special", JsonUtil.getApiCommonGson().toJson(specialList));
|
| | | root.put("miaoSha", msJSON);
|
| | | |
| | |
|
| | | // 增加邀请有奖
|
| | | JSONObject invite = new JSONObject();
|
| | |
| | | * @param acceptData
|
| | | * @param id
|
| | | * @param uid
|
| | | * @param pageSource 页面来源
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getgoodsinfo", method = RequestMethod.POST)
|
| | | public void getGoodsInfo(AcceptData acceptData, String id, String uid, PrintWriter out) {
|
| | | public void getGoodsInfo(AcceptData acceptData, String id, String uid, String from, PrintWriter out) {
|
| | |
|
| | | if ("0".equalsIgnoreCase(uid)) {
|
| | | uid = "";
|
| | |
| | | goods.put("price", tb.getReservePrice().toString());
|
| | | goods.put("zkPrice", tb.getZkPrice().toString());
|
| | |
|
| | | // 红包
|
| | | BigDecimal proportion = manageService.getFanLiRate();
|
| | | String hongBao = TaoBaoUtil.getGoodsHongBaoInfo(tb, proportion);
|
| | | goods.put("hongBao", hongBao);
|
| | | // 30天销量
|
| | | goods.put("saleCount", TaoBaoUtil.getSaleCount(tb.getBiz30day()));
|
| | |
|
| | |
| | |
|
| | | // 领券人列表
|
| | | List<ShamUser> listCouponUser = new ArrayList<ShamUser>();
|
| | |
|
| | | |
| | | String hongBao = null;
|
| | | |
| | | // 获取券信息
|
| | | if (!StringUtil.isNullOrEmpty(tb.getCouponInfo())) {
|
| | | BigDecimal quanPrice = TaoBaoUtil.getAfterUseCouplePrice(tb);
|
| | | JSONObject couponInfo = new JSONObject();
|
| | | couponInfo.put("couponPrice", quanPrice.toString());
|
| | |
|
| | | |
| | | if (from != null && from.equals("miandan")) {
|
| | | // 免单商品
|
| | | hongBao = "¥" + quanPrice.toString();
|
| | | }
|
| | | |
| | | |
| | | // 服务端转链
|
| | | if (convertInServer && !StringUtil.isNullOrEmpty(tb.getCouponLink())) {
|
| | | couponInfo.put("couponUrl", tb.getCouponLink());
|
| | |
| | | listCouponUser = shamUserService.listRandCouponUser(5, 1, 300);
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | // 红包
|
| | | if (hongBao == null) {
|
| | | BigDecimal proportion = manageService.getFanLiRate();
|
| | | hongBao = TaoBaoUtil.getGoodsHongBaoInfo(tb, proportion);
|
| | | }
|
| | | goods.put("hongBao", hongBao);
|
| | | |
| | | data.put("tbPidInfo", clientTBPid);
|
| | |
|
| | | String jumpUrl = "https://item.taobao.com/item.htm?id=" + tb.getAuctionId();
|
| | |
| | | data.put("couponUsers", listCouponUser);
|
| | | data.put("detailWebUrl", "http://apph5.yeshitv.com/apppage/goods_img.html?id=" + id);
|
| | |
|
| | | JSONObject shareActivity = new JSONObject();
|
| | | shareActivity.put("moneyDesc", "春节狂欢奖金:¥" + TaoBaoUtil.getGoodsHongBaoMoney(tb,
|
| | | new BigDecimal(hongBaoManageService.get("share_activity_proportion"))));
|
| | | shareActivity.put("ruleDescPicture", "http://img.flqapp.com/resource/share_activity_img.png");
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(uid)
|
| | | && shareGoodsActivityOrderService.countShareGoodsActivityOrder(Long.parseLong(uid)) > 0) {
|
| | | } else
|
| | | data.put("shareActivity", shareActivity);
|
| | |
|
| | | |
| | | // 取消分享活动
|
| | | // if (!StringUtil.isNullOrEmpty(uid)
|
| | | // && shareGoodsActivityOrderService.countShareGoodsActivityOrder(Long.parseLong(uid)) > 0) {
|
| | | // } else if(!"miandan".equals(from)) {
|
| | | // // 非免单商品
|
| | | // JSONObject shareActivity = new JSONObject();
|
| | | // shareActivity.put("moneyDesc", "春节狂欢奖金:¥" + TaoBaoUtil.getGoodsHongBaoMoney(tb,
|
| | | // new BigDecimal(hongBaoManageService.get("share_activity_proportion"))));
|
| | | // shareActivity.put("ruleDescPicture", "http://img.flqapp.com/resource/share_activity_img.png");
|
| | | // |
| | | // data.put("shareActivity", shareActivity);
|
| | | // } |
| | | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | | final String tempUid = uid;
|
| | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 活动列表
|
| | | * 活动列表
|
| | | *
|
| | | * @param acceptData
|
| | | * @param out
|
| | |
| | | out.print(JsonUtil.loadFalseResult(1, "系统不存在"));
|
| | | return;
|
| | | }
|
| | | |
| | |
|
| | | try {
|
| | | // 专题活动
|
| | | String specialCard = "special_activities";
|
| | | |
| | | List<Special> listSpecial = specialService.listPageBySystemAndCard(0, Integer.MAX_VALUE, |
| | | specialCard, system.getId());
|
| | |
|
| | | if (listSpecial != null && listSpecial.size() > 0) {
|
| | | for (Special special : listSpecial) {
|
| | | special.setCreatetime(null);
|
| | | special.setUpdatetime(null);
|
| | | special.setState(null);
|
| | | special.setRemark(null);
|
| | | special.setCard(null);
|
| | | special.setCardId(null);
|
| | | |
| | | JumpDetailV2 jumpDetail = special.getJumpDetail();
|
| | | if (jumpDetail != null) {
|
| | | jumpDetail.setId(null);
|
| | | jumpDetail.setName(null);
|
| | | }
|
| | | |
| | | // 邀请登陆验证
|
| | | if(jumpDetail.getType().equals("invite_web") && jumpDetail.getNeedLogin()
|
| | | && uid != null) {
|
| | | |
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
|
| | | if (userInfoExtra != null && userInfoExtra.getInviteCode() != null
|
| | | && userInfoExtra.getInviteCode().trim().length() > 0) {
|
| | | |
| | | JSONObject params = new JSONObject();
|
| | | params.put("url", configService.get("invite_activation_success_url"));
|
| | | special.setParams(params.toString());
|
| | | }
|
| | | }
|
| | | }
|
| | | List<Special> listSpecial = specialService.listPageBySystemAndCard(0, Integer.MAX_VALUE, specialCard,
|
| | | system.getId());
|
| | |
|
| | | if (listSpecial == null) {
|
| | | listSpecial = new ArrayList<Special>();
|
| | | }
|
| | |
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("special", listSpecial);
|
| | |
|
| | | root.put("special", JsonUtil.getApiCommonGson().toJson(listSpecial));
|
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | | |
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|