| | |
| | |
|
| | | @Resource
|
| | | private BanLiShopGoodsSetService banLiShopGoodsSetService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private RedPackForbidService redPackForbidService;
|
| | |
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "goodsList")
|
| | | public void goodsList(AcceptData acceptData, int page,Long uid, String callback, PrintWriter out) {
|
| | | public void goodsList(AcceptData acceptData, int page, Long uid, String callback, PrintWriter out) {
|
| | | if (page <= 0)
|
| | | page = 1;
|
| | | List<BanLiShopGoods> goodsList = banLiShopGoodsService.listGoods(null, BanLiShopGoods.STATE_ONLINE, page,
|
| | | Constant.PAGE_SIZE);
|
| | | long count = banLiShopGoodsService.countGoods(null, BanLiShopGoods.STATE_ONLINE);
|
| | | // 获取banner
|
| | | List<SwiperPicture> pictureList = swiperPictureService.getByBannerCard("hongbao_exchange_goods_list");
|
| | | List<SwiperPicture> pictureList = swiperPictureService.getByBannerCardAndVersion("hongbao_exchange_goods_list",
|
| | | acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | if (pictureList != null && pictureList.size() > 0) {
|
| | |
| | | data.put("data", goodsList);
|
| | | data.put("count", count);
|
| | | data.put("redPackLock", redPackForbidService.verifyForbid(uid));
|
| | | |
| | |
|
| | | if (!StringUtil.isNullOrEmpty(callback))
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
|
| | | else
|
| | |
| | | }
|
| | | }
|
| | | BigDecimal money = redPackBalanceService.getBalance(uid);
|
| | | |
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("goods", goods);
|
| | | data.put("hongBaoBalance", money);
|