1.
phpcjl
2024-12-09 fd9ee9caa17d4d722532f6536d53ce40254fa722
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsEvaluateController.java
@@ -7,6 +7,7 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.other.api.domain.GoodsEvaluate;
import com.ruoyi.other.service.GoodsEvaluateService;
import com.ruoyi.other.service.GoodsService;
import com.ruoyi.other.vo.GoodsEvaluateVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -32,6 +33,8 @@
    private GoodsEvaluateService goodsEvaluateService;
    @Resource
    private AppUserClient appUserClient;
    @Resource
    private GoodsService goodsService;
    @GetMapping("/goodsList")
    @ApiOperation(value = "获取商品评价", tags = {"小程序-获取商品评价"})
@@ -41,6 +44,7 @@
            AppUser appUserById = appUserClient.getAppUserById(goodsEvaluate.getAppUserId());
            goodsEvaluate.setUserName(appUserById.getName());
            goodsEvaluate.setAvatar(appUserById.getAvatar());
            goodsEvaluate.setIdStr(String.valueOf(goodsEvaluate.getId()));
        }
        return R.ok(list);
    }
@@ -64,6 +68,9 @@
        List<GoodsEvaluate> list = goodsEvaluateService.list(new LambdaQueryWrapper<GoodsEvaluate>()
                .eq(GoodsEvaluate::getStatus, 2)
                .eq(GoodsEvaluate::getOrderId, orderId));
        for (GoodsEvaluate goodsEvaluate : list) {
        }
        return R.ok(list);
    }