Merge remote-tracking branch 'origin/master'
| | |
| | | * 获取标签列表 |
| | | * @return |
| | | */ |
| | | @PostMapping("/t-evaluation-tag/getList") |
| | | @GetMapping("/t-evaluation-tag/getList") |
| | | R<List<TEvaluationTagVO>> getList(); |
| | | |
| | | |
| | |
| | | @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); |
| | | } |
| | |
| | | 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 -> { |
| | | 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()); |
| | | // 统计有图,好评,中差评数量 |
| | |
| | | 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 |