From 34d18c08f04de78eccb42b88b7484b0531d263ff Mon Sep 17 00:00:00 2001 From: zhibing.pu <393733352@qq.com> Date: 星期一, 12 八月 2024 20:13:19 +0800 Subject: [PATCH] 新增加系统管理部分功能接口 --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderEvaluateController.java | 69 +++++++++++++++++++++++++++++++--- 1 files changed, 62 insertions(+), 7 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderEvaluateController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderEvaluateController.java index ec89086..20cc001 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderEvaluateController.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TOrderEvaluateController.java @@ -1,22 +1,21 @@ package com.ruoyi.order.controller; -import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.web.domain.AjaxResult; import com.ruoyi.common.core.web.page.PageInfo; +import com.ruoyi.order.api.model.TOrderEvaluate; import com.ruoyi.order.api.query.TOrderEvaluateQuery; import com.ruoyi.order.api.vo.TOrderEvaluateVO; +import com.ruoyi.order.dto.GetOrderEvaluatePageList; +import com.ruoyi.order.dto.GetOrderEvaluatePageListDTO; import com.ruoyi.order.service.TOrderEvaluateService; -import com.ruoyi.other.api.feignClient.TEvaluationTagClient; import com.ruoyi.other.api.vo.TEvaluationTagVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; +import java.time.LocalDateTime; import java.util.List; /** @@ -47,6 +46,62 @@ public AjaxResult<PageInfo<TOrderEvaluateVO>> pageList(@RequestBody TOrderEvaluateQuery query) { return AjaxResult.ok(orderEvaluateService.getTagList(query)); } - + + + + + + + + @GetMapping(value = "/getPageList") + @ApiOperation(value = "获取充电评价列表", tags = {"管理后台-充电评价"}) + public AjaxResult<PageInfo<GetOrderEvaluatePageListDTO>> getPageList(@RequestBody GetOrderEvaluatePageList pageList){ + PageInfo<GetOrderEvaluatePageListDTO> list = orderEvaluateService.getPageList(pageList); + return AjaxResult.success(list); + } + + + + @DeleteMapping(value = "/delOrderEvaluate") + @ApiOperation(value = "删除充电评价", tags = {"管理后台-充电评价"}) + public AjaxResult delOrderEvaluate(@PathVariable Long id){ + TOrderEvaluate orderEvaluate = orderEvaluateService.getById(id); + orderEvaluate.setDelFlag(true); + orderEvaluateService.updateById(orderEvaluate); + return AjaxResult.success(); + } + + + + + @PostMapping(value = "/replyEvaluation") + @ApiOperation(value = "充电评价回复", tags = {"管理后台-充电评价"}) + public AjaxResult replyEvaluation(@PathVariable("id") Long id, @RequestParam("reply") String reply){ + TOrderEvaluate orderEvaluate = orderEvaluateService.getById(id); + reply = reply.replaceAll("& #40;", "(") + .replaceAll("& #41;", ")") + .replaceAll("& #40;", "(") + .replaceAll("& #41;", ")") + .replaceAll("& #39;", "'") + .replaceAll("& lt;", "<") + .replaceAll("& gt;", ">"); + orderEvaluate.setEvaluationResponse(reply); + orderEvaluate.setResponseTime(LocalDateTime.now()); + orderEvaluateService.updateById(orderEvaluate); + return AjaxResult.success(); + } + + + + + @DeleteMapping(value = "/delOrderEvaluateReply") + @ApiOperation(value = "删除充电评价回复", tags = {"管理后台-充电评价"}) + public AjaxResult delOrderEvaluateReply(@PathVariable Long id){ + TOrderEvaluate orderEvaluate = orderEvaluateService.getById(id); + orderEvaluate.setEvaluationResponse(""); + orderEvaluateService.updateById(orderEvaluate); + return AjaxResult.success(); + } + } -- Gitblit v1.7.1