| | |
| | | import com.yeshi.fanli.exception.shop.BanLiShopOrderException;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackBalanceService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackForbidService;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsService;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsSetPayService;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsSetService;
|
| | |
| | |
|
| | | @Resource
|
| | | private BanLiShopGoodsSetService banLiShopGoodsSetService;
|
| | | |
| | | @Resource
|
| | | private RedPackForbidService redPackForbidService;
|
| | |
|
| | | /**
|
| | | * 商品列表
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "goodsList")
|
| | | public void goodsList(AcceptData acceptData, int page, 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,
|
| | |
| | | }
|
| | | 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
|
| | |
| | | try {
|
| | | banLiShopOrderPayService.payOrderByMoney(latestOrder.getId(),
|
| | | latestOrder.getMoneyPayment());
|
| | | orderList = banLiShopOrderService.listByUid(uid, page, Constant.PAGE_SIZE);
|
| | | } catch (BanLiShopOrderException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | List<BanLiShopOrderVO> voList = new ArrayList<>();
|
| | |
| | | }
|
| | | }
|
| | | BigDecimal money = redPackBalanceService.getBalance(uid);
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("goods", goods);
|
| | | data.put("hongBaoBalance", money);
|
| | |
| | | if (order.getMoneyPayment() != null && order.getMoneyPayment().compareTo(new BigDecimal(0)) > 0) {
|
| | | // 走微信支付
|
| | | String payUrl = BanLiShopWXPayUtil.getWXH5PayUrl(order.getOrderNo(), request.getRemoteAddr(),
|
| | | order.getOrderGoods().getGoodsName(), order.getMoneyPayment());
|
| | | order.getOrderGoods().getGoodsName(), order.getMoneyPayment(), acceptData.getPlatform());
|
| | | if (StringUtil.isNullOrEmpty(payUrl)) {
|
| | | if (!StringUtil.isNullOrEmpty(callback))
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult(102, "微信支付创建失败")));
|