From b4fb054a7f0c4aff60a863f2324a7c3f2bc08583 Mon Sep 17 00:00:00 2001 From: hejinbo Date: Mon, 11 Sep 2023 14:45:44 +0800 Subject: [PATCH] 111 --- .../payment/CasePaymentController.java | 35 +++++++++++++++---- .../src/main/resources/application.yml | 2 +- .../system/mapper/CasePaymentMapper.java | 8 +++++ .../system/service/ICasePaymentService.java | 14 ++++++++ .../service/impl/CasePaymentServiceImpl.java | 21 ++++++++++- .../mapper/system/CasePaymentMapper.xml | 9 +++++ 6 files changed, 80 insertions(+), 9 deletions(-) create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/CasePaymentMapper.java create mode 100644 ruoyi-system/src/main/resources/mapper/system/CasePaymentMapper.xml diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/payment/CasePaymentController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/payment/CasePaymentController.java index 41d1e06..f8c256b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/payment/CasePaymentController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/payment/CasePaymentController.java @@ -1,15 +1,10 @@ package com.ruoyi.web.controller.payment; -import com.ruoyi.ElegentPay; -import com.ruoyi.constant.Platform; -import com.ruoyi.constant.TradeType; + import com.ruoyi.dto.PayRequest; -import com.ruoyi.dto.PayResponse; import com.ruoyi.system.service.ICasePaymentService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; /** * 缴费支付 @@ -22,8 +17,34 @@ public class CasePaymentController { public CasePaymentController(ICasePaymentService paymentService){ this.paymentService=paymentService; } + + /** + * 查询缴费列表 + */ + @GetMapping + public String queryPayList(){ + return paymentService.queryPayList(); + } + + /** + * 根据案件id查询缴费清单 + * @return + */ + @GetMapping + public String getPaymentListByCaseId(){ + return paymentService.getPaymentListByCaseId(); + } + /** + * 案件缴费 + * @param request + * @return + */ @PostMapping("/casePay") public String casePay(PayRequest request) { return paymentService.casePay(request); } + @PutMapping + public String payConfirm(){ + return paymentService.payConfirm(); + } } diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 4ee8d89..e032281 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -141,6 +141,6 @@ elegent: alipay: appId: 2021003141676135 callback: - domain: https://2d3ac179.r5.cpolar.top + domain: http://121.40.189.20:9000/ watch: true cycle: 10 \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CasePaymentMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CasePaymentMapper.java new file mode 100644 index 0000000..b7d80fc --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CasePaymentMapper.java @@ -0,0 +1,8 @@ +package com.ruoyi.system.mapper; + +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface CasePaymentMapper { + void queryPayList(); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ICasePaymentService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ICasePaymentService.java index c28efab..ffc81c8 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ICasePaymentService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ICasePaymentService.java @@ -3,5 +3,19 @@ package com.ruoyi.system.service; import com.ruoyi.dto.PayRequest; public interface ICasePaymentService { + /** + * 案件缴费 + * @param request + * @return + */ String casePay(PayRequest request); + /** + * 查询缴费列表 + */ + String queryPayList(); + + String getPaymentListByCaseId(); + + String payConfirm(); + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CasePaymentServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CasePaymentServiceImpl.java index 9d8c339..0a5c454 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CasePaymentServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CasePaymentServiceImpl.java @@ -5,6 +5,7 @@ import com.ruoyi.constant.Platform; import com.ruoyi.constant.TradeType; import com.ruoyi.dto.PayRequest; import com.ruoyi.dto.PayResponse; +import com.ruoyi.system.mapper.CasePaymentMapper; import com.ruoyi.system.service.ICasePaymentService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -12,9 +13,11 @@ import org.springframework.stereotype.Service; @Service public class CasePaymentServiceImpl implements ICasePaymentService { private final ElegentPay elegentPay; + private final CasePaymentMapper paymentMapper; @Autowired - public CasePaymentServiceImpl(ElegentPay elegentPay){ + public CasePaymentServiceImpl(ElegentPay elegentPay,CasePaymentMapper paymentMapper ){ this.elegentPay=elegentPay; + this.paymentMapper=paymentMapper; } @Override public String casePay(PayRequest request) { @@ -24,4 +27,20 @@ public class CasePaymentServiceImpl implements ICasePaymentService { } return null; } + + @Override + public String queryPayList() { + paymentMapper.queryPayList(); + return null; + } + + @Override + public String getPaymentListByCaseId() { + return null; + } + + @Override + public String payConfirm() { + return null; + } } diff --git a/ruoyi-system/src/main/resources/mapper/system/CasePaymentMapper.xml b/ruoyi-system/src/main/resources/mapper/system/CasePaymentMapper.xml new file mode 100644 index 0000000..6a77419 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/CasePaymentMapper.xml @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file