Commit 51f76235ffa22f965c2633d076469518ef0ca5ba
1 parent
3cac2984
feat: 新增查看评价详情
Showing
3 changed files
with
17 additions
and
1 deletions
trash-garbage/src/main/java/com/trash/garbage/controller/GarbageOrderController.java
| @@ -118,9 +118,14 @@ public class GarbageOrderController { | @@ -118,9 +118,14 @@ public class GarbageOrderController { | ||
| 118 | return Result.OK(garOrderService.queryOrderWebDetail(id)); | 118 | return Result.OK(garOrderService.queryOrderWebDetail(id)); |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | + @GetMapping("/evaluate/detail/{orderId}") | ||
| 122 | + public Result<?> queryEvaluateDetail(@PathVariable("orderId") String orderId) { | ||
| 123 | + return Result.OK(garOrderService.queryEvaluateDetail(orderId)); | ||
| 124 | + } | ||
| 125 | + | ||
| 121 | 126 | ||
| 122 | @GetMapping("/company") | 127 | @GetMapping("/company") |
| 123 | - public Result<?> queryEnterpriseList(TransportationEnterprise enterprise){ | 128 | + public Result<?> queryEnterpriseList(TransportationEnterprise enterprise) { |
| 124 | startPage(); | 129 | startPage(); |
| 125 | return Result.OK(garOrderService.queryEnterpriseList(enterprise)); | 130 | return Result.OK(garOrderService.queryEnterpriseList(enterprise)); |
| 126 | } | 131 | } |
trash-garbage/src/main/java/com/trash/garbage/service/GarOrderService.java
| @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; | @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; | ||
| 4 | import com.github.pagehelper.PageInfo; | 4 | import com.github.pagehelper.PageInfo; |
| 5 | import com.trash.enterprise.domain.TransportationEnterprise; | 5 | import com.trash.enterprise.domain.TransportationEnterprise; |
| 6 | import com.trash.garbage.pojo.domain.GarOrder; | 6 | import com.trash.garbage.pojo.domain.GarOrder; |
| 7 | +import com.trash.garbage.pojo.domain.GarOrderEvaluate; | ||
| 7 | import com.trash.garbage.pojo.dto.*; | 8 | import com.trash.garbage.pojo.dto.*; |
| 8 | import com.trash.garbage.pojo.vo.OrderDetailVo; | 9 | import com.trash.garbage.pojo.vo.OrderDetailVo; |
| 9 | 10 | ||
| @@ -63,4 +64,6 @@ public interface GarOrderService extends IService<GarOrder> { | @@ -63,4 +64,6 @@ public interface GarOrderService extends IService<GarOrder> { | ||
| 63 | OrderDetailVo queryOrderWebDetail(String id); | 64 | OrderDetailVo queryOrderWebDetail(String id); |
| 64 | 65 | ||
| 65 | PageInfo queryEnterpriseList(TransportationEnterprise enterprise); | 66 | PageInfo queryEnterpriseList(TransportationEnterprise enterprise); |
| 67 | + | ||
| 68 | + List<GarOrderEvaluate> queryEvaluateDetail(String orderId); | ||
| 66 | } | 69 | } |
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarOrderServiceImpl.java
| @@ -355,6 +355,14 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> | @@ -355,6 +355,14 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> | ||
| 355 | return pageInfo; | 355 | return pageInfo; |
| 356 | } | 356 | } |
| 357 | 357 | ||
| 358 | + @Override | ||
| 359 | + public List<GarOrderEvaluate> queryEvaluateDetail(String orderId) { | ||
| 360 | + LambdaQueryWrapper<GarOrderEvaluate> qw = new LambdaQueryWrapper<>(); | ||
| 361 | + qw.eq(GarOrderEvaluate::getGarOrderId,orderId); | ||
| 362 | + List<GarOrderEvaluate> evaluateList = garOrderEvaluateService.list(qw); | ||
| 363 | + return evaluateList; | ||
| 364 | + } | ||
| 365 | + | ||
| 358 | private void handleCleanNumber(TransportationEnterpriseVo vo, List<GarOrder> orderList) { | 366 | private void handleCleanNumber(TransportationEnterpriseVo vo, List<GarOrder> orderList) { |
| 359 | Long cleanNumber = 0L; | 367 | Long cleanNumber = 0L; |
| 360 | for (GarOrder order : orderList) { | 368 | for (GarOrder order : orderList) { |