hejinbo 2 лет назад
Родитель
Сommit
b4fb054a7f

+ 28
- 7
ruoyi-admin/src/main/java/com/ruoyi/web/controller/payment/CasePaymentController.java Просмотреть файл

1
 package com.ruoyi.web.controller.payment;
1
 package com.ruoyi.web.controller.payment;
2
 
2
 
3
-import com.ruoyi.ElegentPay;
4
-import com.ruoyi.constant.Platform;
5
-import com.ruoyi.constant.TradeType;
3
+
6
 import com.ruoyi.dto.PayRequest;
4
 import com.ruoyi.dto.PayRequest;
7
-import com.ruoyi.dto.PayResponse;
8
 import com.ruoyi.system.service.ICasePaymentService;
5
 import com.ruoyi.system.service.ICasePaymentService;
9
 import org.springframework.beans.factory.annotation.Autowired;
6
 import org.springframework.beans.factory.annotation.Autowired;
10
-import org.springframework.web.bind.annotation.PostMapping;
11
-import org.springframework.web.bind.annotation.RequestMapping;
12
-import org.springframework.web.bind.annotation.RestController;
7
+import org.springframework.web.bind.annotation.*;
13
 
8
 
14
 /**
9
 /**
15
  * 缴费支付
10
  * 缴费支付
22
     public CasePaymentController(ICasePaymentService paymentService){
17
     public CasePaymentController(ICasePaymentService paymentService){
23
        this.paymentService=paymentService;
18
        this.paymentService=paymentService;
24
     }
19
     }
20
+
21
+    /**
22
+     * 查询缴费列表
23
+     */
24
+    @GetMapping
25
+    public String queryPayList(){
26
+        return paymentService.queryPayList();
27
+    }
28
+
29
+    /**
30
+     * 根据案件id查询缴费清单
31
+     * @return
32
+     */
33
+    @GetMapping
34
+    public String getPaymentListByCaseId(){
35
+        return paymentService.getPaymentListByCaseId();
36
+    }
37
+    /**
38
+     * 案件缴费
39
+     * @param request
40
+     * @return
41
+     */
25
     @PostMapping("/casePay")
42
     @PostMapping("/casePay")
26
     public String casePay(PayRequest request) {
43
     public String casePay(PayRequest request) {
27
         return paymentService.casePay(request);
44
         return paymentService.casePay(request);
28
     }
45
     }
46
+    @PutMapping
47
+    public String payConfirm(){
48
+        return paymentService.payConfirm();
49
+    }
29
 }
50
 }

+ 1
- 1
ruoyi-admin/src/main/resources/application.yml Просмотреть файл

141
     alipay:
141
     alipay:
142
       appId: 2021003141676135
142
       appId: 2021003141676135
143
     callback:
143
     callback:
144
-      domain: https://2d3ac179.r5.cpolar.top
144
+      domain: http://121.40.189.20:9000/
145
       watch: true
145
       watch: true
146
       cycle: 10
146
       cycle: 10

+ 8
- 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/CasePaymentMapper.java Просмотреть файл

1
+package com.ruoyi.system.mapper;
2
+
3
+import org.apache.ibatis.annotations.Mapper;
4
+
5
+@Mapper
6
+public interface CasePaymentMapper {
7
+    void queryPayList();
8
+}

+ 14
- 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ICasePaymentService.java Просмотреть файл

3
 import com.ruoyi.dto.PayRequest;
3
 import com.ruoyi.dto.PayRequest;
4
 
4
 
5
 public interface ICasePaymentService {
5
 public interface ICasePaymentService {
6
+    /**
7
+     * 案件缴费
8
+     * @param request
9
+     * @return
10
+     */
6
     String casePay(PayRequest request);
11
     String casePay(PayRequest request);
12
+    /**
13
+     * 查询缴费列表
14
+     */
15
+    String queryPayList();
16
+
17
+    String getPaymentListByCaseId();
18
+
19
+    String payConfirm();
20
+
7
 }
21
 }

+ 20
- 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CasePaymentServiceImpl.java Просмотреть файл

5
 import com.ruoyi.constant.TradeType;
5
 import com.ruoyi.constant.TradeType;
6
 import com.ruoyi.dto.PayRequest;
6
 import com.ruoyi.dto.PayRequest;
7
 import com.ruoyi.dto.PayResponse;
7
 import com.ruoyi.dto.PayResponse;
8
+import com.ruoyi.system.mapper.CasePaymentMapper;
8
 import com.ruoyi.system.service.ICasePaymentService;
9
 import com.ruoyi.system.service.ICasePaymentService;
9
 import org.springframework.beans.factory.annotation.Autowired;
10
 import org.springframework.beans.factory.annotation.Autowired;
10
 import org.springframework.stereotype.Service;
11
 import org.springframework.stereotype.Service;
12
 @Service
13
 @Service
13
 public class CasePaymentServiceImpl implements ICasePaymentService {
14
 public class CasePaymentServiceImpl implements ICasePaymentService {
14
     private final ElegentPay elegentPay;
15
     private final ElegentPay elegentPay;
16
+    private final CasePaymentMapper paymentMapper;
15
     @Autowired
17
     @Autowired
16
-    public CasePaymentServiceImpl(ElegentPay elegentPay){
18
+    public CasePaymentServiceImpl(ElegentPay elegentPay,CasePaymentMapper paymentMapper ){
17
         this.elegentPay=elegentPay;
19
         this.elegentPay=elegentPay;
20
+        this.paymentMapper=paymentMapper;
18
     }
21
     }
19
     @Override
22
     @Override
20
     public String casePay(PayRequest request) {
23
     public String casePay(PayRequest request) {
24
         }
27
         }
25
         return null;
28
         return null;
26
     }
29
     }
30
+
31
+    @Override
32
+    public String queryPayList() {
33
+        paymentMapper.queryPayList();
34
+        return null;
35
+    }
36
+
37
+    @Override
38
+    public String getPaymentListByCaseId() {
39
+        return null;
40
+    }
41
+
42
+    @Override
43
+    public String payConfirm() {
44
+        return null;
45
+    }
27
 }
46
 }

+ 9
- 0
ruoyi-system/src/main/resources/mapper/system/CasePaymentMapper.xml Просмотреть файл

1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.system.mapper.CasePaymentMapper">
6
+    <select id="queryPayList">
7
+
8
+    </select>
9
+</mapper>