admin
2019-11-12 0cf8c0bf5649b0b7269f78f6eae7c09cffea75cd
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/BanLiShopController.java
@@ -15,6 +15,7 @@
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.redpack.RedPackBalance;
import com.yeshi.fanli.entity.shop.BanLiShopGoods;
import com.yeshi.fanli.entity.shop.BanLiShopGoodsSets;
import com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay;
@@ -76,7 +77,7 @@
    * @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,
@@ -91,6 +92,14 @@
      }
      data.put("data", goodsList);
      data.put("count", count);
      RedPackBalance redPackBalance = redPackBalanceService.selectByPrimaryKey(uid);
      if (redPackBalance != null && redPackBalance.getState() == RedPackBalance.STATE_LOCKED) {
         data.put("redPackLock", true);
      } else {
         data.put("redPackLock", false);
      }
      if (!StringUtil.isNullOrEmpty(callback))
         out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
      else
@@ -174,7 +183,12 @@
               pay.setName(getPayName(pay.getPayType()));
            }
         }
      BigDecimal money = redPackBalanceService.getBalance(uid);
      BigDecimal money = new BigDecimal(0);
      try {
         money = redPackBalanceService.getBalance(uid);
      } catch (RedPackBalanceException e) {
         e.printStackTrace();
      }
      JSONObject data = new JSONObject();
      data.put("goods", goods);
      data.put("hongBaoBalance", money);
@@ -218,7 +232,7 @@
         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, "微信支付创建失败")));