ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/TEvaluationTagClient.java
@@ -31,7 +31,7 @@ * 获取标签列表 * @return */ @PostMapping("/t-evaluation-tag/getList") @GetMapping("/t-evaluation-tag/getList") R<List<TEvaluationTagVO>> getList(); ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
@@ -1452,7 +1452,7 @@ @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "订单id", required = true) }) public AjaxResult<EndOfChargePageInfo> getEndOfChargePageInfo(String id){ public AjaxResult<EndOfChargePageInfo> getEndOfChargePageInfo(@PathVariable("id") String id){ EndOfChargePageInfo endOfChargePageInfo = chargingOrderService.getEndOfChargePageInfo(id); return AjaxResult.success(endOfChargePageInfo); } ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderEvaluateServiceImpl.java
@@ -120,12 +120,18 @@ List<Integer> tagIds = tagList.stream().map(TEvaluationTagVO::getId).collect(Collectors.toList()); // 统计标签使用数量 List<TEvaluationTagVO> counts = orderEvaluateTagMapper.getCountByTagIds(tagIds); List<Integer> ids = counts.stream().map(TEvaluationTagVO::getId).collect(Collectors.toList()); tagList.forEach(tag -> { counts.forEach(count -> { if (tag.getId().equals(count.getId())) { tag.setTagCount(count.getTagCount()); } }); if(ids.contains(tag.getId())){ counts.forEach(count -> { if (tag.getId().equals(count.getId())) { tag.setTagCount(count.getTagCount()); } }); }else{ tag.setTagCount(0); } }); tagList = tagList.stream().sorted(Comparator.comparing(TEvaluationTagVO::getTagCount).reversed()).collect(Collectors.toList()); // 统计有图,好评,中差评数量 ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TOrderEvaluateTagMapper.xml
@@ -14,7 +14,7 @@ id, order_evaluate_id, evaluation_tag_id </sql> <select id="getCountByTagIds" resultType="com.ruoyi.other.api.vo.TEvaluationTagVO"> SELECT evaluation_tag_id,count(id) AS tagCount FROM t_order_evaluate_tag SELECT evaluation_tag_id as id,count(id) AS tagCount FROM t_order_evaluate_tag <where> <if test="tagIds != null and tagIds.size() > 0"> AND evaluation_tag_id IN