| | |
| | | import com.yeshi.fanli.entity.bus.user.Order;
|
| | | import com.yeshi.fanli.entity.bus.user.ShamUser;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.common.ImageInfo;
|
| | | import com.yeshi.fanli.entity.common.JumpDetail;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | | |
| | |
|
| | | @RequestMapping(value = "getrecommendsection")
|
| | | public void getRecommendSection(AcceptData acceptData, int index, PrintWriter out) {
|
| | |
| | | * @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;
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getSpecialActivities")
|
| | | public void getSpecialActivities(AcceptData acceptData, PrintWriter out) {
|
| | | public void getSpecialActivities(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | |
|
| | | System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
|
| | | if (system == null) {
|
| | |
| | | special.setCard(null);
|
| | | special.setCardId(null);
|
| | |
|
| | | // 手动替换参数
|
| | | if (special.getName() != null && special.getName().contains("邀请")) {
|
| | | // userInfoExtraService
|
| | |
|
| | | }
|
| | |
|
| | | 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()); } }
|
| | | */
|
| | | |
| | | }
|
| | | } |
| | | |
| | | if (listSpecial == null) {
|
| | | listSpecial = new ArrayList<Special>();
|
| | | }
|
| | |
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("special", listSpecial);
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | | |
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|