Pu Zhibing
2025-03-31 97d99b76bdde8952cf257c3c85c1a8a080927af4
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/ShoppingCartController.java
@@ -1,6 +1,7 @@
package com.ruoyi.order.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.account.api.feignClient.AppUserClient;
import com.ruoyi.account.api.model.AppUser;
@@ -42,11 +43,7 @@
   
   @Resource
   private TokenService tokenService;
   @Resource
   private GoodsShopClient goodsShopClient;
   @Resource
   private ShopClient shopClient;
   @Resource
   private AppUserClient appUserClient;
   
@@ -122,6 +119,9 @@
   @ResponseBody
   @GetMapping("/shoppingCartPaymentCallback")
   public void shoppingCartPaymentCallback(UniPayCallbackResult uniPayCallbackResult, HttpServletResponse response){
      String jsonString = JSONObject.toJSONString(uniPayCallbackResult);
      System.out.println("1111111111111111111111");
      System.out.println(jsonString);
      R callback = shoppingCartService.shoppingCartPaymentCallback(uniPayCallbackResult);
      if(callback.getCode() == 200){
         response.setStatus(200);
@@ -169,7 +169,7 @@
   @GetMapping("/getGoodsPrice")
   public R<Price> getGoodsPrice(Long appUserId, Integer goodsId, Integer shopId){
      AppUser appUser = appUserClient.getAppUserById(appUserId);
      Price price = shoppingCartService.getPrice(appUser, goodsId, shopId);
      Price price = shoppingCartService.getPrice(appUser, goodsId, 1, shopId);
      return R.ok(price);
   }