From af06d9e0951de410c16f24c6b247f69225741d48 Mon Sep 17 00:00:00 2001 From: xiao-fajia <1665375861@qq.com> Date: Fri, 23 Aug 2024 20:58:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=91=E6=8F=B4APP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/RescuePayController.java | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/controller/admin/RescuePayController.java diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/controller/admin/RescuePayController.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/controller/admin/RescuePayController.java new file mode 100644 index 00000000..e0b8f93b --- /dev/null +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/controller/admin/RescuePayController.java @@ -0,0 +1,40 @@ +package cn.iocoder.yudao.module.rescue.controller.admin; + + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.rescue.core.controller.BaseController; +import cn.iocoder.yudao.module.rescue.domain.RescueInfo; +import cn.iocoder.yudao.module.rescue.service.IRescueOrderInfoService; +import com.alibaba.fastjson.JSONObject; +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 java.util.Map; + +@RequestMapping("/rescuePayApi") +@RestController +public class RescuePayController extends BaseController { + @Autowired + private IRescueOrderInfoService rescueOrderInfoService; + + + + @PostMapping("/createOrder") + public CommonResult createOrder(RescueInfo orderInfo) throws Exception { + return success(rescueOrderInfoService.createOrder(orderInfo)); + } +// @ApiOperation(value = "支付回调", notes = "支付回调") + @PostMapping("/payNotify") + public Map payNotify(@RequestBody JSONObject jsonObject) { + return rescueOrderInfoService.payNotify(jsonObject); + } + //评论商品和星级 + @PostMapping("/reviewOrder") + public CommonResult reviewOrder(String rescueId, Integer starLevel, String reviewStr) throws Exception { + rescueOrderInfoService.reviewOrder(rescueId, starLevel, reviewStr); + return success(); + } +}