ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/Order.java
@@ -143,6 +143,10 @@ @TableField("express_json") private String expressJson; @ApiModelProperty(value = "第三方快递结果") @TableField("express_result") private String expressResult; @ApiModelProperty(value = "收货地址信息") @TableField("address_json") private String addressJson; ruoyi-service/ruoyi-account/src/main/resources/mapper/account/UserPointMapper.xml
@@ -29,6 +29,7 @@ t_user_point tup LEFT JOIN t_app_user tau ON tup.app_user_id = tau.id <where> tup.type not in (8, 9, 14) <if test="userPoint.userName != null and userPoint.userName != ''"> AND tau.`name` LIKE concat('%',#{userPoint.userName},'%') </if> ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsEvaluateController.java
@@ -47,10 +47,13 @@ @Resource private TokenService tokenService; @GetMapping("/goodsList") @ApiOperation(value = "获取商品评价", tags = {"小程序-获取商品评价"}) public R<List<GoodsEvaluate>> goodsList(@ApiParam("商品id") Integer goodsId){ List<GoodsEvaluate> list = goodsEvaluateService.lambdaQuery().eq(GoodsEvaluate::getGoodsId, goodsId).list(); List<GoodsEvaluate> list = goodsEvaluateService.lambdaQuery().eq(GoodsEvaluate::getGoodsId, goodsId).eq(GoodsEvaluate::getDelFlag, 0).eq(GoodsEvaluate::getStatus, 2).list(); for (GoodsEvaluate goodsEvaluate : list) { AppUser appUserById = appUserClient.getAppUserById(goodsEvaluate.getAppUserId()); if(null != appUserById){ @@ -102,18 +105,7 @@ return R.ok(); } public static void main(String[] args) { List<Integer> integers = new ArrayList<>(); integers.add(1); integers.add(2); integers.add(3); integers.add(4); List<Integer> integers1 = new ArrayList<>(); integers.retainAll(integers1); System.err.println(integers); System.err.println(integers1); } /** * 评论列表 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -87,6 +87,8 @@ private GoodsBargainPriceDetailService goodsBargainPriceDetailService; @Resource private OrderClient orderClient; @Resource private GoodsEvaluateService goodsEvaluateService; @@ -258,6 +260,17 @@ } Integer integer = orderClient.getGoodsSaleNum(goods.getId(), 1).getData(); goodsVO.setSaleNum(integer); GoodsEvaluate goodsEvaluate = goodsEvaluateService.lambdaQuery().eq(GoodsEvaluate::getGoodsId, goodsId) .orderByDesc(GoodsEvaluate::getGrade).eq(GoodsEvaluate::getStatus, 2).eq(GoodsEvaluate::getDelFlag, 0).last(" limit 0, 1").one(); if (null != goodsEvaluate) { AppUser appUserById = appUserClient.getAppUserById(goodsEvaluate.getAppUserId()); if(null != appUserById){ goodsEvaluate.setUserName(appUserById.getName()); goodsEvaluate.setAvatar(appUserById.getAvatar()); goodsEvaluate.setIdStr(String.valueOf(goodsEvaluate.getId())); } } goodsVO.setGoodsEvaluate(goodsEvaluate); return goodsVO; } ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/SeckillActivityInfoServiceImpl.java
@@ -14,6 +14,7 @@ import com.ruoyi.other.mapper.GoodsShopMapper; import com.ruoyi.other.mapper.SeckillActivityInfoMapper; import com.ruoyi.other.mapper.ShopMapper; import com.ruoyi.other.service.GoodsEvaluateService; import com.ruoyi.other.service.GoodsSeckillService; import com.ruoyi.other.service.GoodsService; import com.ruoyi.other.service.SeckillActivityInfoService; @@ -57,6 +58,8 @@ private GoodsService goodsService; @Resource private OrderClient orderClient; @Resource private GoodsEvaluateService goodsEvaluateService; @Override public List<SeckillActivityVO> listSeckillActivity(Goods goods) { @@ -131,6 +134,17 @@ seckillActivityDetailVO.setShopList(shops); Integer integer = orderClient.getGoodsSaleNum(goods.getId(), 2).getData(); seckillActivityDetailVO.setSaleNum(integer); GoodsEvaluate goodsEvaluate = goodsEvaluateService.lambdaQuery().eq(GoodsEvaluate::getGoodsId, goodsId) .orderByDesc(GoodsEvaluate::getGrade).eq(GoodsEvaluate::getStatus, 2).eq(GoodsEvaluate::getDelFlag, 0).last(" limit 0, 1").one(); if (null != goodsEvaluate) { AppUser appUserById = appUserClient.getAppUserById(goodsEvaluate.getAppUserId()); if(null != appUserById){ goodsEvaluate.setUserName(appUserById.getName()); goodsEvaluate.setAvatar(appUserById.getAvatar()); goodsEvaluate.setIdStr(String.valueOf(goodsEvaluate.getId())); } } seckillActivityDetailVO.setGoodsEvaluate(goodsEvaluate); return seckillActivityDetailVO; } ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/GoodsVO.java
@@ -1,6 +1,7 @@ package com.ruoyi.other.vo; import com.baomidou.mybatisplus.annotation.TableField; import com.ruoyi.other.api.domain.GoodsEvaluate; import com.ruoyi.other.api.domain.Shop; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -62,5 +63,8 @@ @ApiModelProperty(value = "门店列表") private List<Shop> shopList; @ApiModelProperty("评价") private GoodsEvaluate goodsEvaluate; } ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/vo/SeckillActivityDetailVO.java
@@ -1,5 +1,6 @@ package com.ruoyi.other.vo; import com.ruoyi.other.api.domain.GoodsEvaluate; import com.ruoyi.other.api.domain.Shop; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -24,4 +25,7 @@ @ApiModelProperty(value = "商品详情") private String detail; @ApiModelProperty("评价") private GoodsEvaluate goodsEvaluate; }