Selaa lähdekoodia

支付接口,后台管理系统

liu_lake 6 kuukautta sitten
vanhempi
sitoutus
1474b2715f
100 muutettua tiedostoa jossa 2747 lisäystä ja 832 poistoa
  1. 2 0
      db/db-agent/src/main/java/pay/platform/domain/PayAggregation.java
  2. 11 5
      db/db-merchant/src/main/java/pay/platform/domain/PayAggregationStore.java
  3. 43 0
      db/db-merchant/src/main/java/pay/platform/domain/PayChannel.java
  4. 4 0
      db/db-merchant/src/main/java/pay/platform/domain/PayOrder.java
  5. 2 2
      db/db-merchant/src/main/java/pay/platform/mapper/PayAggregationStoreMapper.java
  6. 0 0
      db/db-merchant/src/main/java/pay/platform/mapper/PayChannelMapper.java
  7. 13 2
      pay/src/test/java/pay/platform/AlipayTest.java
  8. 18 18
      web/admin-api/src/main/java/pay/platform/api/system/controller/PayAgentController.java
  9. 115 115
      web/admin-api/src/main/java/pay/platform/api/system/controller/PayAggregationController.java
  10. 116 116
      web/admin-api/src/main/java/pay/platform/api/system/controller/PayChannelController.java
  11. 158 158
      web/admin-api/src/main/java/pay/platform/api/system/controller/PayMerchantAppKeyController.java
  12. 24 24
      web/admin-api/src/main/java/pay/platform/api/system/controller/PayMerchantController.java
  13. 24 24
      web/admin-api/src/main/java/pay/platform/api/system/controller/PayOrderController.java
  14. 24 24
      web/admin-api/src/main/java/pay/platform/api/system/controller/PayPlatformSettingController.java
  15. 28 0
      web/admin-api/src/main/java/pay/platform/api/system/model/query/PayAgentQuery.java
  16. 44 0
      web/admin-api/src/main/java/pay/platform/api/system/model/query/PayChannelQuery.java
  17. 38 0
      web/admin-api/src/main/java/pay/platform/api/system/model/query/PayMerchantQuery.java
  18. 106 0
      web/admin-api/src/main/java/pay/platform/api/system/model/query/PayOrderQuery.java
  19. 79 0
      web/admin-api/src/main/java/pay/platform/api/system/model/query/PayPlatformSettingQuery.java
  20. 26 5
      web/admin-api/src/main/java/pay/platform/api/system/model/vo/PayAgentVO.java
  21. 25 0
      web/admin-api/src/main/java/pay/platform/api/system/model/vo/PayAggregationVO.java
  22. 26 0
      web/admin-api/src/main/java/pay/platform/api/system/model/vo/PayChannelVO.java
  23. 25 5
      web/admin-api/src/main/java/pay/platform/api/system/model/vo/PayMerchantVO.java
  24. 25 0
      web/admin-api/src/main/java/pay/platform/api/system/model/vo/PayOrderVO.java
  25. 26 0
      web/admin-api/src/main/java/pay/platform/api/system/model/vo/PayPlatformSettingVO.java
  26. 5 0
      web/admin-api/src/main/java/pay/platform/api/system/servcie/PayAgentService.java
  27. 1 0
      web/admin-api/src/main/java/pay/platform/api/system/servcie/PayAggregationService.java
  28. 2 2
      web/admin-api/src/main/java/pay/platform/api/system/servcie/PayAggregationStoreService.java
  29. 4 1
      web/admin-api/src/main/java/pay/platform/api/system/servcie/PayChannelService.java
  30. 4 0
      web/admin-api/src/main/java/pay/platform/api/system/servcie/PayMerchantService.java
  31. 4 1
      web/admin-api/src/main/java/pay/platform/api/system/servcie/PayOrderService.java
  32. 4 1
      web/admin-api/src/main/java/pay/platform/api/system/servcie/PayPlatformSettingService.java
  33. 22 0
      web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayAgentServiceImpl.java
  34. 26 0
      web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayAggregationServiceImpl.java
  35. 19 0
      web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayAggregationStoreServiceImpl.java
  36. 21 0
      web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayChannelServiceImpl.java
  37. 22 15
      web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayMerchantServiceImpl.java
  38. 0 19
      web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayMerchantStoreServiceImpl.java
  39. 23 0
      web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayOrderServiceImpl.java
  40. 16 0
      web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayPlatformSettingServiceImpl.java
  41. 2 2
      web/admin-api/src/main/resources/application.yml
  42. 1 1
      web/admin-api/src/main/resources/logback-spring.xml
  43. 0 116
      web/agent-api/src/main/java/pay/platform/api/system/controller/PayAggregationController.java
  44. 116 0
      web/agent-api/src/main/java/pay/platform/api/system/controller/PayChannelController.java
  45. 25 31
      web/agent-api/src/main/java/pay/platform/api/system/controller/PayMerchantController.java
  46. 24 25
      web/agent-api/src/main/java/pay/platform/api/system/controller/PayOrderController.java
  47. 28 0
      web/agent-api/src/main/java/pay/platform/api/system/model/query/PayAgentQuery.java
  48. 51 0
      web/agent-api/src/main/java/pay/platform/api/system/model/query/PayChannelQuery.java
  49. 40 0
      web/agent-api/src/main/java/pay/platform/api/system/model/query/PayMerchantQuery.java
  50. 106 0
      web/agent-api/src/main/java/pay/platform/api/system/model/query/PayOrderQuery.java
  51. 79 0
      web/agent-api/src/main/java/pay/platform/api/system/model/query/PayPlatformSettingQuery.java
  52. 26 5
      web/agent-api/src/main/java/pay/platform/api/system/model/vo/PayAgentVO.java
  53. 25 0
      web/agent-api/src/main/java/pay/platform/api/system/model/vo/PayAggregationVO.java
  54. 26 0
      web/agent-api/src/main/java/pay/platform/api/system/model/vo/PayChannelVO.java
  55. 25 5
      web/agent-api/src/main/java/pay/platform/api/system/model/vo/PayMerchantVO.java
  56. 25 0
      web/agent-api/src/main/java/pay/platform/api/system/model/vo/PayOrderVO.java
  57. 26 0
      web/agent-api/src/main/java/pay/platform/api/system/model/vo/PayPlatformSettingVO.java
  58. 2 2
      web/agent-api/src/main/java/pay/platform/api/system/servcie/PayAggregationStoreService.java
  59. 20 0
      web/agent-api/src/main/java/pay/platform/api/system/servcie/PayChannelService.java
  60. 5 0
      web/agent-api/src/main/java/pay/platform/api/system/servcie/PayMerchantService.java
  61. 4 1
      web/agent-api/src/main/java/pay/platform/api/system/servcie/PayOrderService.java
  62. 19 0
      web/agent-api/src/main/java/pay/platform/api/system/servcie/impl/PayAggregationStoreServiceImpl.java
  63. 67 0
      web/agent-api/src/main/java/pay/platform/api/system/servcie/impl/PayChannelServiceImpl.java
  64. 24 17
      web/agent-api/src/main/java/pay/platform/api/system/servcie/impl/PayMerchantServiceImpl.java
  65. 0 19
      web/agent-api/src/main/java/pay/platform/api/system/servcie/impl/PayMerchantStoreServiceImpl.java
  66. 23 0
      web/agent-api/src/main/java/pay/platform/api/system/servcie/impl/PayOrderServiceImpl.java
  67. 2 2
      web/agent-api/src/main/resources/application.yml
  68. 1 1
      web/agent-api/src/main/resources/logback-spring.xml
  69. 25 26
      web/merchant-api/src/main/java/pay/platform/api/system/controller/PayOrderController.java
  70. 28 0
      web/merchant-api/src/main/java/pay/platform/api/system/model/query/PayAgentQuery.java
  71. 51 0
      web/merchant-api/src/main/java/pay/platform/api/system/model/query/PayChannelQuery.java
  72. 40 0
      web/merchant-api/src/main/java/pay/platform/api/system/model/query/PayMerchantQuery.java
  73. 106 0
      web/merchant-api/src/main/java/pay/platform/api/system/model/query/PayOrderQuery.java
  74. 79 0
      web/merchant-api/src/main/java/pay/platform/api/system/model/query/PayPlatformSettingQuery.java
  75. 26 5
      web/merchant-api/src/main/java/pay/platform/api/system/model/vo/PayAgentVO.java
  76. 25 0
      web/merchant-api/src/main/java/pay/platform/api/system/model/vo/PayAggregationVO.java
  77. 26 0
      web/merchant-api/src/main/java/pay/platform/api/system/model/vo/PayChannelVO.java
  78. 25 5
      web/merchant-api/src/main/java/pay/platform/api/system/model/vo/PayMerchantVO.java
  79. 25 0
      web/merchant-api/src/main/java/pay/platform/api/system/model/vo/PayOrderVO.java
  80. 26 0
      web/merchant-api/src/main/java/pay/platform/api/system/model/vo/PayPlatformSettingVO.java
  81. 4 1
      web/merchant-api/src/main/java/pay/platform/api/system/servcie/PayOrderService.java
  82. 22 1
      web/merchant-api/src/main/java/pay/platform/api/system/servcie/impl/PayOrderServiceImpl.java
  83. 2 2
      web/merchant-api/src/main/resources/application.yml
  84. 1 1
      web/merchant-api/src/main/resources/logback-spring.xml
  85. 5 0
      web/open-api/pom.xml
  86. 2 0
      web/open-api/src/main/java/pay/platform/ApiApplication.java
  87. 43 9
      web/open-api/src/main/java/pay/platform/api/controller/PayController.java
  88. 24 0
      web/open-api/src/main/java/pay/platform/api/model/request/OrderRequest.java
  89. 8 3
      web/open-api/src/main/java/pay/platform/api/model/request/PayRequest.java
  90. 42 0
      web/open-api/src/main/java/pay/platform/api/model/response/OrderResponse.java
  91. 20 0
      web/open-api/src/main/java/pay/platform/api/model/response/PayResponse.java
  92. 15 0
      web/open-api/src/main/java/pay/platform/api/servcie/PayAgentService.java
  93. 18 0
      web/open-api/src/main/java/pay/platform/api/servcie/PayAggregationStoreService.java
  94. 17 0
      web/open-api/src/main/java/pay/platform/api/servcie/PayChannelService.java
  95. 1 0
      web/open-api/src/main/java/pay/platform/api/servcie/PayMerchantAppKeyService.java
  96. 0 15
      web/open-api/src/main/java/pay/platform/api/servcie/PayMerchantStoreService.java
  97. 9 0
      web/open-api/src/main/java/pay/platform/api/servcie/PayOrderService.java
  98. 17 0
      web/open-api/src/main/java/pay/platform/api/servcie/PayService.java
  99. 19 0
      web/open-api/src/main/java/pay/platform/api/servcie/impl/PayAgentServiceImpl.java
  100. 29 0
      web/open-api/src/main/java/pay/platform/api/servcie/impl/PayAggregationStoreServiceImpl.java

+ 2 - 0
db/db-agent/src/main/java/pay/platform/domain/PayAggregation.java

@@ -54,6 +54,8 @@ public class PayAggregation {
     @Schema(description = "商户号ID")
     @Column(value = "p_id")
     private Long pId;
+    @Schema(description = "appId")
+    private String appId;
 
     /**
      * 密钥

+ 11 - 5
db/db-merchant/src/main/java/pay/platform/domain/PayMerchantStore.java → db/db-merchant/src/main/java/pay/platform/domain/PayAggregationStore.java

@@ -23,8 +23,8 @@ import java.util.Date;
 @NoArgsConstructor
 @AllArgsConstructor
 @Schema(name = "商户关联支付宝店铺")
-@Table(value = "t_pay_merchant_store")
-public class PayMerchantStore {
+@Table(value = "t_pay_aggregation_store")
+public class PayAggregationStore {
 
     /**
      * id
@@ -38,12 +38,18 @@ public class PayMerchantStore {
     @Schema(description = "代理id")
     @Column(value = "agent_id")
     private String agentId;
+//    /**
+//     * 商户id
+//     */
+//    @Schema(description = "聚合支付id")
+//    @Column(value = "aggregation_id")
+//    private String aggregationId;
     /**
      * 商户id
      */
-    @Schema(description = "商户id")
-    @Column(value = "merchant_id")
-    private String merchantId;
+    @Schema(description = "通道id")
+    @Column(value = "channel_id")
+    private String channelId;
 
     /**
      * 店铺id

+ 43 - 0
db/db-system/src/main/java/pay/platform/domain/PayChannel.java → db/db-merchant/src/main/java/pay/platform/domain/PayChannel.java

@@ -10,6 +10,7 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
 
 /**
@@ -47,6 +48,48 @@ public class PayChannel {
     @Column(value = "code")
     private String code;
 
+    @Schema(description = "代理商id")
+    @Column(value = "agent_id")
+    private String agentId;
+
+
+    @Schema(description = "appId")
+    private String appId;
+
+    /**
+     * 密钥
+     */
+    @Schema(description = "密钥")
+    @Column(value = "private_key")
+    private String privateKey;
+
+    /**
+     * 公钥
+     */
+    @Schema(description = "公钥")
+    @Column(value = "public_key")
+    private String publicKey;
+
+    /**
+     * 单笔限制金额
+     */
+    @Schema(description = "单笔限制金额")
+    @Column(value = "astrict_amount")
+    private BigDecimal astrictAmount;
+
+    /**
+     * 限制流水
+     */
+    @Schema(description = "限制流水")
+    @Column(value = "astrict_trade")
+    private BigDecimal astrictTrade;
+
+    /**
+     * 统一费率
+     */
+    @Schema(description = "统一费率")
+    @Column(value = "rate")
+    private BigDecimal rate;
     /**
      * 状态
      */

+ 4 - 0
db/db-merchant/src/main/java/pay/platform/domain/PayOrder.java

@@ -96,6 +96,10 @@ public class PayOrder {
     @Schema(description = "创建人")
     @Column(value = "create_user")
     private String createUser;
+    @Schema(description = "备注")
+    private String remark;
+    @Schema(description = "商品主题")
+    private String subject;
 
     /**
      * 创建时间

+ 2 - 2
db/db-merchant/src/main/java/pay/platform/mapper/PayMerchantStoreMapper.java → db/db-merchant/src/main/java/pay/platform/mapper/PayAggregationStoreMapper.java

@@ -2,7 +2,7 @@ package pay.platform.mapper;
 
 import com.mybatisflex.core.BaseMapper;
 import org.apache.ibatis.annotations.Mapper;
-import pay.platform.domain.PayMerchantStore;
+import pay.platform.domain.PayAggregationStore;
 
 /**
  * 商户关联支付宝店铺 映射层。
@@ -11,7 +11,7 @@ import pay.platform.domain.PayMerchantStore;
  * @since 1.0
  */
 @Mapper
-public interface PayMerchantStoreMapper extends BaseMapper<PayMerchantStore> {
+public interface PayAggregationStoreMapper extends BaseMapper<PayAggregationStore> {
 
 
 }

+ 0 - 0
db/db-system/src/main/java/pay/platform/mapper/PayChannelMapper.java → db/db-merchant/src/main/java/pay/platform/mapper/PayChannelMapper.java


+ 13 - 2
pay/src/test/java/pay/platform/AlipayTest.java

@@ -56,8 +56,18 @@ public class AlipayTest {
     @Test
     public void testQuery() {
         try {
+//            {
+//                "outTradeNo": "1716450272073",
+//                    "subject": "购买商品",
+//                    "totalAmount": "0.01",
+//                    "storeId": "0001025104489",
+//                    "undiscountableAmount": "0",
+//                    "sellerId": "",
+//                    "body": "测试下单",
+//                    "operatorId": "990001"
+//            }
             // 商户订单号
-            String outTradeNo = "1540262464959";
+            String outTradeNo = "1716450272073";
             AlipayQueryResponse response = AlipayClient.query(outTradeNo, alipayCore);
             log.debug(STR."response=\{JsonUtil.format(response)}");
             assertTrue(response.isSuccess());
@@ -98,9 +108,10 @@ public class AlipayTest {
             request.setOperatorId(operatorId);
             request.setStoreId(storeId);
             request.setTotalAmount(totalAmount);
-
+            System.out.println(request);
             AlipayQrcodeResponse response = AlipayClient.preCreate(request, alipayCore);
             log.debug(STR."response=\{JsonUtil.format(response)}");
+            log.debug(STR."request=\{JsonUtil.format(request)}");
             if (response.isSuccess()) {
                 String qrCodeUrl = response.getQrCode();
                 QRCodeUtil.writeQRCodePrint(qrCodeUrl);

+ 18 - 18
web/admin-api/src/main/java/pay/platform/api/system/controller/PayAgentController.java

@@ -1,13 +1,17 @@
 package pay.platform.api.system.controller;
 
-import com.mybatisflex.core.paginate.Page;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.Parameters;
 import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springdoc.core.annotations.ParameterObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import pay.platform.api.system.model.query.PayAgentQuery;
+import pay.platform.api.system.model.vo.PayAgentVO;
 import pay.platform.api.system.servcie.PayAgentService;
+import pay.platform.core.common.Result;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.domain.PayAgent;
 
 import java.io.Serializable;
@@ -36,8 +40,8 @@ public class PayAgentController {
     @PostMapping("/save")
     @Operation(summary = "添加代理")
 
-    public boolean save(@RequestBody PayAgent PayAgent) {
-        return payAgentService.saveAgent(PayAgent);
+    public Result<Boolean> save(@RequestBody PayAgent PayAgent) {
+        return Result.OK(payAgentService.saveAgent(PayAgent));
     }
 
 
@@ -52,8 +56,8 @@ public class PayAgentController {
     @Parameters(value = {
             @Parameter(name = "id", description = "id", required = true)
     })
-    public boolean remove(@PathVariable Serializable id) {
-        return payAgentService.removeById(id);
+    public Result<Boolean> remove(@PathVariable Serializable id) {
+        return Result.OK(payAgentService.removeById(id));
     }
 
 
@@ -65,8 +69,8 @@ public class PayAgentController {
      */
     @PutMapping("/update")
     @Operation(summary = "根据主键更新代理")
-    public boolean update(@RequestBody PayAgent PayAgent) {
-        return payAgentService.updateById(PayAgent);
+    public Result<Boolean> update(@RequestBody PayAgent PayAgent) {
+        return Result.OK(payAgentService.updateById(PayAgent));
     }
 
 
@@ -77,8 +81,8 @@ public class PayAgentController {
      */
     @GetMapping("/list")
     @Operation(summary = "查询所有代理")
-    public List<PayAgent> list() {
-        return payAgentService.list();
+    public Result<List<PayAgent>> list() {
+        return Result.OK(payAgentService.list());
     }
 
 
@@ -93,24 +97,20 @@ public class PayAgentController {
     @Parameters(value = {
             @Parameter(name = "id", description = "id", required = true)
     })
-    public PayAgent getInfo(@PathVariable Serializable id) {
-        return payAgentService.getById(id);
+    public Result<PayAgent> getInfo(@PathVariable Serializable id) {
+        return Result.OK(payAgentService.getById(id));
     }
 
 
     /**
      * 分页查询代理
      *
-     * @param page 分页对象
+     * @param query 分页对象
      * @return 分页对象
      */
     @GetMapping("/page")
     @Operation(summary = "分页查询代理")
-    @Parameters(value = {
-            @Parameter(name = "pageNumber", description = "页码", required = true),
-            @Parameter(name = "pageSize", description = "每页大小", required = true)
-    })
-    public Page<PayAgent> page(Page<PayAgent> page) {
-        return payAgentService.page(page);
+    public Result<BasePage<PayAgentVO>> page(@ParameterObject PayAgentQuery query) {
+        return Result.OK(payAgentService.queryPage(query));
     }
 }

+ 115 - 115
web/admin-api/src/main/java/pay/platform/api/system/controller/PayAggregationController.java

@@ -1,115 +1,115 @@
-package pay.platform.api.system.controller;
-
-import com.mybatisflex.core.paginate.Page;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import pay.platform.api.system.servcie.PayAggregationService;
-import pay.platform.domain.PayAggregation;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * 聚合支付 控制层。
- *
- * @author mybatis-flex-helper automatic generation
- * @since 1.0
- */
-@RestController
-@RequestMapping("/sys/pay/aggregation")
-@Tag(name = "聚合支付控制层")
-public class PayAggregationController {
-
-    @Autowired
-    private PayAggregationService payAggregationService;
-
-    /**
-     * 添加 聚合支付
-     *
-     * @param PayAggregation 聚合支付
-     * @return {@code true} 添加成功,{@code false} 添加失败
-     */
-    @PostMapping("/save")
-    @Operation(summary = "添加聚合支付")
-    public boolean save(@RequestBody PayAggregation PayAggregation) {
-        return payAggregationService.save(PayAggregation);
-    }
-
-
-    /**
-     * 根据主键删除聚合支付
-     *
-     * @param id 主键
-     * @return {@code true} 删除成功,{@code false} 删除失败
-     */
-    @DeleteMapping("/remove/{id}")
-    @Operation(summary = "根据主键删除聚合支付")
-    @Parameters(value = {
-            @Parameter(name = "id", description = "id", required = true)
-    })
-    public boolean remove(@PathVariable Serializable id) {
-        return payAggregationService.removeById(id);
-    }
-
-
-    /**
-     * 根据主键更新聚合支付
-     *
-     * @param PayAggregation 聚合支付
-     * @return {@code true} 更新成功,{@code false} 更新失败
-     */
-    @PutMapping("/update")
-    @Operation(summary = "根据主键更新聚合支付")
-    public boolean update(@RequestBody PayAggregation PayAggregation) {
-        return payAggregationService.updateById(PayAggregation);
-    }
-
-
-    /**
-     * 查询所有聚合支付
-     *
-     * @return 所有数据
-     */
-    @GetMapping("/list")
-    @Operation(summary = "查询所有聚合支付")
-    public List<PayAggregation> list() {
-        return payAggregationService.list();
-    }
-
-
-    /**
-     * 根据聚合支付主键获取详细信息。
-     *
-     * @param id PayAggregation主键
-     * @return 聚合支付详情
-     */
-    @GetMapping("/getInfo/{id}")
-    @Operation(summary = "根据聚合支付主键获取详细信息")
-    @Parameters(value = {
-            @Parameter(name = "id", description = "id", required = true)
-    })
-    public PayAggregation getInfo(@PathVariable Serializable id) {
-        return payAggregationService.getById(id);
-    }
-
-
-    /**
-     * 分页查询聚合支付
-     *
-     * @param page 分页对象
-     * @return 分页对象
-     */
-    @GetMapping("/page")
-    @Operation(summary = "分页查询聚合支付")
-    @Parameters(value = {
-            @Parameter(name = "pageNumber", description = "页码", required = true),
-            @Parameter(name = "pageSize", description = "每页大小", required = true)
-    })
-    public Page<PayAggregation> page(Page<PayAggregation> page) {
-        return payAggregationService.page(page);
-    }
-}
+//package pay.platform.api.system.controller;
+//
+//import com.mybatisflex.core.paginate.Page;
+//import io.swagger.v3.oas.annotations.Operation;
+//import io.swagger.v3.oas.annotations.Parameter;
+//import io.swagger.v3.oas.annotations.Parameters;
+//import io.swagger.v3.oas.annotations.tags.Tag;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.*;
+//import pay.platform.api.system.servcie.PayAggregationService;
+//import pay.platform.domain.PayAggregation;
+//
+//import java.io.Serializable;
+//import java.util.List;
+//
+///**
+// * 聚合支付 控制层。
+// *
+// * @author mybatis-flex-helper automatic generation
+// * @since 1.0
+// */
+//@RestController
+//@RequestMapping("/sys/pay/aggregation")
+//@Tag(name = "聚合支付控制层")
+//public class PayAggregationController {
+//
+//    @Autowired
+//    private PayAggregationService payAggregationService;
+//
+//    /**
+//     * 添加 聚合支付
+//     *
+//     * @param PayAggregation 聚合支付
+//     * @return {@code true} 添加成功,{@code false} 添加失败
+//     */
+//    @PostMapping("/save")
+//    @Operation(summary = "添加聚合支付")
+//    public boolean save(@RequestBody PayAggregation PayAggregation) {
+//        return payAggregationService.savePayAggregation(PayAggregation);
+//    }
+//
+//
+//    /**
+//     * 根据主键删除聚合支付
+//     *
+//     * @param id 主键
+//     * @return {@code true} 删除成功,{@code false} 删除失败
+//     */
+//    @DeleteMapping("/remove/{id}")
+//    @Operation(summary = "根据主键删除聚合支付")
+//    @Parameters(value = {
+//            @Parameter(name = "id", description = "id", required = true)
+//    })
+//    public boolean remove(@PathVariable Serializable id) {
+//        return payAggregationService.removeById(id);
+//    }
+//
+//
+//    /**
+//     * 根据主键更新聚合支付
+//     *
+//     * @param PayAggregation 聚合支付
+//     * @return {@code true} 更新成功,{@code false} 更新失败
+//     */
+//    @PutMapping("/update")
+//    @Operation(summary = "根据主键更新聚合支付")
+//    public boolean update(@RequestBody PayAggregation PayAggregation) {
+//        return payAggregationService.updateById(PayAggregation);
+//    }
+//
+//
+//    /**
+//     * 查询所有聚合支付
+//     *
+//     * @return 所有数据
+//     */
+//    @GetMapping("/list")
+//    @Operation(summary = "查询所有聚合支付")
+//    public List<PayAggregation> list() {
+//        return payAggregationService.list();
+//    }
+//
+//
+//    /**
+//     * 根据聚合支付主键获取详细信息。
+//     *
+//     * @param id PayAggregation主键
+//     * @return 聚合支付详情
+//     */
+//    @GetMapping("/getInfo/{id}")
+//    @Operation(summary = "根据聚合支付主键获取详细信息")
+//    @Parameters(value = {
+//            @Parameter(name = "id", description = "id", required = true)
+//    })
+//    public PayAggregation getInfo(@PathVariable Serializable id) {
+//        return payAggregationService.getById(id);
+//    }
+//
+//
+//    /**
+//     * 分页查询聚合支付
+//     *
+//     * @param page 分页对象
+//     * @return 分页对象
+//     */
+//    @GetMapping("/page")
+//    @Operation(summary = "分页查询聚合支付")
+//    @Parameters(value = {
+//            @Parameter(name = "pageNumber", description = "页码", required = true),
+//            @Parameter(name = "pageSize", description = "每页大小", required = true)
+//    })
+//    public Page<PayAggregation> page(Page<PayAggregation> page) {
+//        return payAggregationService.page(page);
+//    }
+//}

+ 116 - 116
web/admin-api/src/main/java/pay/platform/api/system/controller/PayChannelController.java

@@ -1,116 +1,116 @@
-package pay.platform.api.system.controller;
-
-import com.mybatisflex.core.paginate.Page;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import pay.platform.api.system.servcie.PayChannelService;
-import pay.platform.domain.PayChannel;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * 通道 控制层。
- *
- * @author mybatis-flex-helper automatic generation
- * @since 1.0
- */
-@RestController
-@RequestMapping("/sys/pay/channel")
-@Tag(name = "通道控制层")
-public class PayChannelController {
-
-    @Autowired
-    private PayChannelService PayChannelService;
-
-    /**
-     * 添加 通道
-     *
-     * @param PayChannel 通道
-     * @return {@code true} 添加成功,{@code false} 添加失败
-     */
-    @PostMapping("/save")
-    @Operation(summary = "添加通道")
-
-    public boolean save(@RequestBody PayChannel PayChannel) {
-        return PayChannelService.save(PayChannel);
-    }
-
-
-    /**
-     * 根据主键删除通道
-     *
-     * @param id 主键
-     * @return {@code true} 删除成功,{@code false} 删除失败
-     */
-    @DeleteMapping("/remove/{id}")
-    @Operation(summary = "根据主键删除通道")
-    @Parameters(value = {
-            @Parameter(name = "id", description = "id", required = true)
-    })
-    public boolean remove(@PathVariable Serializable id) {
-        return PayChannelService.removeById(id);
-    }
-
-
-    /**
-     * 根据主键更新通道
-     *
-     * @param PayChannel 通道
-     * @return {@code true} 更新成功,{@code false} 更新失败
-     */
-    @PutMapping("/update")
-    @Operation(summary = "根据主键更新通道")
-    public boolean update(@RequestBody PayChannel PayChannel) {
-        return PayChannelService.updateById(PayChannel);
-    }
-
-
-    /**
-     * 查询所有通道
-     *
-     * @return 所有数据
-     */
-    @GetMapping("/list")
-    @Operation(summary = "查询所有通道")
-    public List<PayChannel> list() {
-        return PayChannelService.list();
-    }
-
-
-    /**
-     * 根据通道主键获取详细信息。
-     *
-     * @param id PayChannel主键
-     * @return 通道详情
-     */
-    @GetMapping("/getInfo/{id}")
-    @Operation(summary = "根据通道主键获取详细信息")
-    @Parameters(value = {
-            @Parameter(name = "id", description = "id", required = true)
-    })
-    public PayChannel getInfo(@PathVariable Serializable id) {
-        return PayChannelService.getById(id);
-    }
-
-
-    /**
-     * 分页查询通道
-     *
-     * @param page 分页对象
-     * @return 分页对象
-     */
-    @GetMapping("/page")
-    @Operation(summary = "分页查询通道")
-    @Parameters(value = {
-            @Parameter(name = "pageNumber", description = "页码", required = true),
-            @Parameter(name = "pageSize", description = "每页大小", required = true)
-    })
-    public Page<PayChannel> page(Page<PayChannel> page) {
-        return PayChannelService.page(page);
-    }
-}
+//package pay.platform.api.system.controller;
+//
+//import com.mybatisflex.core.paginate.Page;
+//import io.swagger.v3.oas.annotations.Operation;
+//import io.swagger.v3.oas.annotations.Parameter;
+//import io.swagger.v3.oas.annotations.Parameters;
+//import io.swagger.v3.oas.annotations.tags.Tag;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.*;
+//import pay.platform.api.system.servcie.PayChannelService;
+//import pay.platform.domain.PayChannel;
+//
+//import java.io.Serializable;
+//import java.util.List;
+//
+///**
+// * 通道 控制层。
+// *
+// * @author mybatis-flex-helper automatic generation
+// * @since 1.0
+// */
+//@RestController
+//@RequestMapping("/sys/pay/channel")
+//@Tag(name = "通道控制层")
+//public class PayChannelController {
+//
+//    @Autowired
+//    private PayChannelService PayChannelService;
+//
+//    /**
+//     * 添加 通道
+//     *
+//     * @param PayChannel 通道
+//     * @return {@code true} 添加成功,{@code false} 添加失败
+//     */
+//    @PostMapping("/save")
+//    @Operation(summary = "添加通道")
+//
+//    public boolean save(@RequestBody PayChannel PayChannel) {
+//        return PayChannelService.save(PayChannel);
+//    }
+//
+//
+//    /**
+//     * 根据主键删除通道
+//     *
+//     * @param id 主键
+//     * @return {@code true} 删除成功,{@code false} 删除失败
+//     */
+//    @DeleteMapping("/remove/{id}")
+//    @Operation(summary = "根据主键删除通道")
+//    @Parameters(value = {
+//            @Parameter(name = "id", description = "id", required = true)
+//    })
+//    public boolean remove(@PathVariable Serializable id) {
+//        return PayChannelService.removeById(id);
+//    }
+//
+//
+//    /**
+//     * 根据主键更新通道
+//     *
+//     * @param PayChannel 通道
+//     * @return {@code true} 更新成功,{@code false} 更新失败
+//     */
+//    @PutMapping("/update")
+//    @Operation(summary = "根据主键更新通道")
+//    public boolean update(@RequestBody PayChannel PayChannel) {
+//        return PayChannelService.updateById(PayChannel);
+//    }
+//
+//
+//    /**
+//     * 查询所有通道
+//     *
+//     * @return 所有数据
+//     */
+//    @GetMapping("/list")
+//    @Operation(summary = "查询所有通道")
+//    public List<PayChannel> list() {
+//        return PayChannelService.list();
+//    }
+//
+//
+//    /**
+//     * 根据通道主键获取详细信息。
+//     *
+//     * @param id PayChannel主键
+//     * @return 通道详情
+//     */
+//    @GetMapping("/getInfo/{id}")
+//    @Operation(summary = "根据通道主键获取详细信息")
+//    @Parameters(value = {
+//            @Parameter(name = "id", description = "id", required = true)
+//    })
+//    public PayChannel getInfo(@PathVariable Serializable id) {
+//        return PayChannelService.getById(id);
+//    }
+//
+//
+//    /**
+//     * 分页查询通道
+//     *
+//     * @param page 分页对象
+//     * @return 分页对象
+//     */
+//    @GetMapping("/page")
+//    @Operation(summary = "分页查询通道")
+//    @Parameters(value = {
+//            @Parameter(name = "pageNumber", description = "页码", required = true),
+//            @Parameter(name = "pageSize", description = "每页大小", required = true)
+//    })
+//    public Page<PayChannel> page(Page<PayChannel> page) {
+//        return PayChannelService.page(page);
+//    }
+//}

+ 158 - 158
web/admin-api/src/main/java/pay/platform/api/system/controller/PayMerchantAppKeyController.java

@@ -1,158 +1,158 @@
-package pay.platform.api.system.controller;
-
-import com.mybatisflex.core.paginate.Page;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import pay.platform.api.system.servcie.PayMerchantAppKeyService;
-import pay.platform.domain.PayMerchantAppKey;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * 商户扩展信息,提供外部应用 控制层。
- *
- * @author mybatis-flex-helper automatic generation
- * @since 1.0
- */
-@RestController
-@RequestMapping("/PayMerchantAppKey")
-@Tag(name = "商户扩展信息,提供外部应用控制层")
-public class PayMerchantAppKeyController {
-
-    @Autowired
-    private PayMerchantAppKeyService PayMerchantAppKeyService;
-
-    /**
-     * 添加 商户扩展信息,提供外部应用
-     *
-     * @param PayMerchantAppKey 商户扩展信息,提供外部应用
-     * @return {@code true} 添加成功,{@code false} 添加失败
-     */
-    @PostMapping("/save")
-    @Operation(summary = "添加商户扩展信息,提供外部应用")
-    @Parameters(value = {
-            @Parameter(name = "id", description = "id"),
-
-            @Parameter(name = "merchantId", description = "商户id"),
-
-            @Parameter(name = "appId", description = "app_id"),
-
-            @Parameter(name = "appKey", description = "app_key"),
-
-            @Parameter(name = "appSecret", description = "app_secret"),
-
-            @Parameter(name = "status", description = "状态"),
-
-            @Parameter(name = "createUser", description = "创建人"),
-
-            @Parameter(name = "createTime", description = "创建时间"),
-
-            @Parameter(name = "updateUser", description = "修改人"),
-
-            @Parameter(name = "updateTime", description = "修改时间")
-    })
-
-    public boolean save(@RequestBody PayMerchantAppKey PayMerchantAppKey) {
-        return PayMerchantAppKeyService.save(PayMerchantAppKey);
-    }
-
-
-    /**
-     * 根据主键删除商户扩展信息,提供外部应用
-     *
-     * @param id 主键
-     * @return {@code true} 删除成功,{@code false} 删除失败
-     */
-    @DeleteMapping("/remove/{id}")
-    @Operation(summary = "根据主键删除商户扩展信息,提供外部应用")
-    @Parameters(value = {
-            @Parameter(name = "id", description = "id", required = true)
-    })
-    public boolean remove(@PathVariable Serializable id) {
-        return PayMerchantAppKeyService.removeById(id);
-    }
-
-
-    /**
-     * 根据主键更新商户扩展信息,提供外部应用
-     *
-     * @param PayMerchantAppKey 商户扩展信息,提供外部应用
-     * @return {@code true} 更新成功,{@code false} 更新失败
-     */
-    @PutMapping("/update")
-    @Operation(summary = "根据主键更新商户扩展信息,提供外部应用")
-    @Parameters(value = {
-            @Parameter(name = "id", description = "id", required = true),
-
-            @Parameter(name = "merchantId", description = "商户id"),
-
-            @Parameter(name = "appId", description = "app_id"),
-
-            @Parameter(name = "appKey", description = "app_key"),
-
-            @Parameter(name = "appSecret", description = "app_secret"),
-
-            @Parameter(name = "status", description = "状态"),
-
-            @Parameter(name = "createUser", description = "创建人"),
-
-            @Parameter(name = "createTime", description = "创建时间"),
-
-            @Parameter(name = "updateUser", description = "修改人"),
-
-            @Parameter(name = "updateTime", description = "修改时间")
-    })
-    public boolean update(@RequestBody PayMerchantAppKey PayMerchantAppKey) {
-        return PayMerchantAppKeyService.updateById(PayMerchantAppKey);
-    }
-
-
-    /**
-     * 查询所有商户扩展信息,提供外部应用
-     *
-     * @return 所有数据
-     */
-    @GetMapping("/list")
-    @Operation(summary = "查询所有商户扩展信息,提供外部应用")
-    public List<PayMerchantAppKey> list() {
-        return PayMerchantAppKeyService.list();
-    }
-
-
-    /**
-     * 根据商户扩展信息,提供外部应用主键获取详细信息。
-     *
-     * @param id PayMerchantAppKey主键
-     * @return 商户扩展信息,提供外部应用详情
-     */
-    @GetMapping("/getInfo/{id}")
-    @Operation(summary = "根据商户扩展信息,提供外部应用主键获取详细信息")
-    @Parameters(value = {
-            @Parameter(name = "id", description = "id", required = true)
-    })
-    public PayMerchantAppKey getInfo(@PathVariable Serializable id) {
-        return PayMerchantAppKeyService.getById(id);
-    }
-
-
-    /**
-     * 分页查询商户扩展信息,提供外部应用
-     *
-     * @param page 分页对象
-     * @return 分页对象
-     */
-    @GetMapping("/page")
-    @Operation(summary = "分页查询商户扩展信息,提供外部应用")
-    @Parameters(value = {
-            @Parameter(name = "pageNumber", description = "页码", required = true),
-            @Parameter(name = "pageSize", description = "每页大小", required = true)
-    })
-    public Page<PayMerchantAppKey> page(Page<PayMerchantAppKey> page) {
-        return PayMerchantAppKeyService.page(page);
-    }
-}
+//package pay.platform.api.system.controller;
+//
+//import com.mybatisflex.core.paginate.Page;
+//import io.swagger.v3.oas.annotations.Operation;
+//import io.swagger.v3.oas.annotations.Parameter;
+//import io.swagger.v3.oas.annotations.Parameters;
+//import io.swagger.v3.oas.annotations.tags.Tag;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.web.bind.annotation.*;
+//import pay.platform.api.system.servcie.PayMerchantAppKeyService;
+//import pay.platform.domain.PayMerchantAppKey;
+//
+//import java.io.Serializable;
+//import java.util.List;
+//
+///**
+// * 商户扩展信息,提供外部应用 控制层。
+// *
+// * @author mybatis-flex-helper automatic generation
+// * @since 1.0
+// */
+//@RestController
+//@RequestMapping("/PayMerchantAppKey")
+//@Tag(name = "商户扩展信息,提供外部应用控制层")
+//public class PayMerchantAppKeyController {
+//
+//    @Autowired
+//    private PayMerchantAppKeyService PayMerchantAppKeyService;
+//
+//    /**
+//     * 添加 商户扩展信息,提供外部应用
+//     *
+//     * @param PayMerchantAppKey 商户扩展信息,提供外部应用
+//     * @return {@code true} 添加成功,{@code false} 添加失败
+//     */
+//    @PostMapping("/save")
+//    @Operation(summary = "添加商户扩展信息,提供外部应用")
+//    @Parameters(value = {
+//            @Parameter(name = "id", description = "id"),
+//
+//            @Parameter(name = "merchantId", description = "商户id"),
+//
+//            @Parameter(name = "appId", description = "app_id"),
+//
+//            @Parameter(name = "appKey", description = "app_key"),
+//
+//            @Parameter(name = "appSecret", description = "app_secret"),
+//
+//            @Parameter(name = "status", description = "状态"),
+//
+//            @Parameter(name = "createUser", description = "创建人"),
+//
+//            @Parameter(name = "createTime", description = "创建时间"),
+//
+//            @Parameter(name = "updateUser", description = "修改人"),
+//
+//            @Parameter(name = "updateTime", description = "修改时间")
+//    })
+//
+//    public boolean save(@RequestBody PayMerchantAppKey PayMerchantAppKey) {
+//        return PayMerchantAppKeyService.save(PayMerchantAppKey);
+//    }
+//
+//
+//    /**
+//     * 根据主键删除商户扩展信息,提供外部应用
+//     *
+//     * @param id 主键
+//     * @return {@code true} 删除成功,{@code false} 删除失败
+//     */
+//    @DeleteMapping("/remove/{id}")
+//    @Operation(summary = "根据主键删除商户扩展信息,提供外部应用")
+//    @Parameters(value = {
+//            @Parameter(name = "id", description = "id", required = true)
+//    })
+//    public boolean remove(@PathVariable Serializable id) {
+//        return PayMerchantAppKeyService.removeById(id);
+//    }
+//
+//
+//    /**
+//     * 根据主键更新商户扩展信息,提供外部应用
+//     *
+//     * @param PayMerchantAppKey 商户扩展信息,提供外部应用
+//     * @return {@code true} 更新成功,{@code false} 更新失败
+//     */
+//    @PutMapping("/update")
+//    @Operation(summary = "根据主键更新商户扩展信息,提供外部应用")
+//    @Parameters(value = {
+//            @Parameter(name = "id", description = "id", required = true),
+//
+//            @Parameter(name = "merchantId", description = "商户id"),
+//
+//            @Parameter(name = "appId", description = "app_id"),
+//
+//            @Parameter(name = "appKey", description = "app_key"),
+//
+//            @Parameter(name = "appSecret", description = "app_secret"),
+//
+//            @Parameter(name = "status", description = "状态"),
+//
+//            @Parameter(name = "createUser", description = "创建人"),
+//
+//            @Parameter(name = "createTime", description = "创建时间"),
+//
+//            @Parameter(name = "updateUser", description = "修改人"),
+//
+//            @Parameter(name = "updateTime", description = "修改时间")
+//    })
+//    public boolean update(@RequestBody PayMerchantAppKey PayMerchantAppKey) {
+//        return PayMerchantAppKeyService.updateById(PayMerchantAppKey);
+//    }
+//
+//
+//    /**
+//     * 查询所有商户扩展信息,提供外部应用
+//     *
+//     * @return 所有数据
+//     */
+//    @GetMapping("/list")
+//    @Operation(summary = "查询所有商户扩展信息,提供外部应用")
+//    public List<PayMerchantAppKey> list() {
+//        return PayMerchantAppKeyService.list();
+//    }
+//
+//
+//    /**
+//     * 根据商户扩展信息,提供外部应用主键获取详细信息。
+//     *
+//     * @param id PayMerchantAppKey主键
+//     * @return 商户扩展信息,提供外部应用详情
+//     */
+//    @GetMapping("/getInfo/{id}")
+//    @Operation(summary = "根据商户扩展信息,提供外部应用主键获取详细信息")
+//    @Parameters(value = {
+//            @Parameter(name = "id", description = "id", required = true)
+//    })
+//    public PayMerchantAppKey getInfo(@PathVariable Serializable id) {
+//        return PayMerchantAppKeyService.getById(id);
+//    }
+//
+//
+//    /**
+//     * 分页查询商户扩展信息,提供外部应用
+//     *
+//     * @param page 分页对象
+//     * @return 分页对象
+//     */
+//    @GetMapping("/page")
+//    @Operation(summary = "分页查询商户扩展信息,提供外部应用")
+//    @Parameters(value = {
+//            @Parameter(name = "pageNumber", description = "页码", required = true),
+//            @Parameter(name = "pageSize", description = "每页大小", required = true)
+//    })
+//    public Page<PayMerchantAppKey> page(Page<PayMerchantAppKey> page) {
+//        return PayMerchantAppKeyService.page(page);
+//    }
+//}

+ 24 - 24
web/admin-api/src/main/java/pay/platform/api/system/controller/PayMerchantController.java

@@ -1,13 +1,17 @@
 package pay.platform.api.system.controller;
 
-import com.mybatisflex.core.paginate.Page;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.Parameters;
 import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springdoc.core.annotations.ParameterObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import pay.platform.api.system.model.query.PayMerchantQuery;
+import pay.platform.api.system.model.vo.PayMerchantVO;
 import pay.platform.api.system.servcie.PayMerchantService;
+import pay.platform.core.common.Result;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.domain.PayMerchant;
 
 import java.io.Serializable;
@@ -31,13 +35,13 @@ public class PayMerchantController {
      * 添加 商户
      *
      * @param PayMerchant 商户
-     * @return {@code true} 添加成功,{@code false} 添加失败
+     * @return Result.OK({ @ code true } 添加成功  { @ code false } 添加失败
      */
     @PostMapping("/save")
     @Operation(summary = "添加商户")
 
-    public boolean save(@RequestBody PayMerchant PayMerchant) {
-        return PayMerchantService.saveMerchant(PayMerchant);
+    public Result<Boolean> save(@RequestBody PayMerchant PayMerchant) {
+        return Result.OK(PayMerchantService.saveMerchant(PayMerchant));
     }
 
 
@@ -45,15 +49,15 @@ public class PayMerchantController {
      * 根据主键删除商户
      *
      * @param id 主键
-     * @return {@code true} 删除成功,{@code false} 删除失败
+     * @return Result.OK({ @ code true } 删除成功  { @ code false } 删除失败
      */
     @DeleteMapping("/remove/{id}")
     @Operation(summary = "根据主键删除商户")
     @Parameters(value = {
             @Parameter(name = "id", description = "id", required = true)
     })
-    public boolean remove(@PathVariable Serializable id) {
-        return PayMerchantService.removeById(id);
+    public Result<Boolean> remove(@PathVariable Serializable id) {
+        return Result.OK(PayMerchantService.removeById(id));
     }
 
 
@@ -61,24 +65,24 @@ public class PayMerchantController {
      * 根据主键更新商户
      *
      * @param PayMerchant 商户
-     * @return {@code true} 更新成功,{@code false} 更新失败
+     * @return Result.OK({ @ code true } 更新成功  { @ code false } 更新失败
      */
     @PutMapping("/update")
     @Operation(summary = "根据主键更新商户")
-    public boolean update(@RequestBody PayMerchant PayMerchant) {
-        return PayMerchantService.updateById(PayMerchant);
+    public Result<Boolean> update(@RequestBody PayMerchant PayMerchant) {
+        return Result.OK(PayMerchantService.updateById(PayMerchant));
     }
 
 
     /**
      * 查询所有商户
      *
-     * @return 所有数据
+     * @return Result.OK(所有数据
      */
     @GetMapping("/list")
     @Operation(summary = "查询所有商户")
-    public List<PayMerchant> list() {
-        return PayMerchantService.list();
+    public Result<List<PayMerchant>> list() {
+        return Result.OK(PayMerchantService.list());
     }
 
 
@@ -86,31 +90,27 @@ public class PayMerchantController {
      * 根据商户主键获取详细信息。
      *
      * @param id PayMerchant主键
-     * @return 商户详情
+     * @return Result.OK(商户详情
      */
     @GetMapping("/getInfo/{id}")
     @Operation(summary = "根据商户主键获取详细信息")
     @Parameters(value = {
             @Parameter(name = "id", description = "id", required = true)
     })
-    public PayMerchant getInfo(@PathVariable Serializable id) {
-        return PayMerchantService.getById(id);
+    public Result<PayMerchant> getInfo(@PathVariable Serializable id) {
+        return Result.OK(PayMerchantService.getById(id));
     }
 
 
     /**
      * 分页查询商户
      *
-     * @param page 分页对象
-     * @return 分页对象
+     * @param query 分页对象
+     * @return Result.OK(分页对象
      */
     @GetMapping("/page")
     @Operation(summary = "分页查询商户")
-    @Parameters(value = {
-            @Parameter(name = "pageNumber", description = "页码", required = true),
-            @Parameter(name = "pageSize", description = "每页大小", required = true)
-    })
-    public Page<PayMerchant> page(Page<PayMerchant> page) {
-        return PayMerchantService.page(page);
+    public Result<BasePage<PayMerchantVO>> page(@ParameterObject PayMerchantQuery query) {
+        return Result.OK(PayMerchantService.queryPage(query));
     }
 }

+ 24 - 24
web/admin-api/src/main/java/pay/platform/api/system/controller/PayOrderController.java

@@ -1,13 +1,17 @@
 package pay.platform.api.system.controller;
 
-import com.mybatisflex.core.paginate.Page;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.Parameters;
 import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springdoc.core.annotations.ParameterObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import pay.platform.api.system.model.query.PayOrderQuery;
+import pay.platform.api.system.model.vo.PayOrderVO;
 import pay.platform.api.system.servcie.PayOrderService;
+import pay.platform.core.common.Result;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.domain.PayOrder;
 
 import java.io.Serializable;
@@ -31,12 +35,12 @@ public class PayOrderController {
      * 添加 订单
      *
      * @param PayOrder 订单
-     * @return {@code true} 添加成功,{@code false} 添加失败
+     * @return Result.OK({ @ code true } 添加成功  { @ code false } 添加失败
      */
     @PostMapping("/save")
     @Operation(summary = "添加订单")
-    public boolean save(@RequestBody PayOrder PayOrder) {
-        return PayOrderService.save(PayOrder);
+    public Result<Boolean> save(@RequestBody PayOrder PayOrder) {
+        return Result.OK(PayOrderService.save(PayOrder));
     }
 
 
@@ -44,15 +48,15 @@ public class PayOrderController {
      * 根据主键删除订单
      *
      * @param id 主键
-     * @return {@code true} 删除成功,{@code false} 删除失败
+     * @return Result.OK({ @ code true } 删除成功  { @ code false } 删除失败
      */
     @DeleteMapping("/remove/{id}")
     @Operation(summary = "根据主键删除订单")
     @Parameters(value = {
             @Parameter(name = "id", description = "id", required = true)
     })
-    public boolean remove(@PathVariable Serializable id) {
-        return PayOrderService.removeById(id);
+    public Result<Boolean> remove(@PathVariable Serializable id) {
+        return Result.OK(PayOrderService.removeById(id));
     }
 
 
@@ -60,24 +64,24 @@ public class PayOrderController {
      * 根据主键更新订单
      *
      * @param PayOrder 订单
-     * @return {@code true} 更新成功,{@code false} 更新失败
+     * @return Result.OK({ @ code true } 更新成功  { @ code false } 更新失败
      */
     @PutMapping("/update")
     @Operation(summary = "根据主键更新订单")
-    public boolean update(@RequestBody PayOrder PayOrder) {
-        return PayOrderService.updateById(PayOrder);
+    public Result<Boolean> update(@RequestBody PayOrder PayOrder) {
+        return Result.OK(PayOrderService.updateById(PayOrder));
     }
 
 
     /**
      * 查询所有订单
      *
-     * @return 所有数据
+     * @return Result.OK(所有数据
      */
     @GetMapping("/list")
     @Operation(summary = "查询所有订单")
-    public List<PayOrder> list() {
-        return PayOrderService.list();
+    public Result<List<PayOrder>> list() {
+        return Result.OK(PayOrderService.list());
     }
 
 
@@ -85,31 +89,27 @@ public class PayOrderController {
      * 根据订单主键获取详细信息。
      *
      * @param id PayOrder主键
-     * @return 订单详情
+     * @return Result.OK(订单详情
      */
     @GetMapping("/getInfo/{id}")
     @Operation(summary = "根据订单主键获取详细信息")
     @Parameters(value = {
             @Parameter(name = "id", description = "id", required = true)
     })
-    public PayOrder getInfo(@PathVariable Serializable id) {
-        return PayOrderService.getById(id);
+    public Result<PayOrder> getInfo(@PathVariable Serializable id) {
+        return Result.OK(PayOrderService.getById(id));
     }
 
 
     /**
      * 分页查询订单
      *
-     * @param page 分页对象
-     * @return 分页对象
+     * @param query 分页对象
+     * @return Result.OK(分页对象
      */
     @GetMapping("/page")
     @Operation(summary = "分页查询订单")
-    @Parameters(value = {
-            @Parameter(name = "pageNumber", description = "页码", required = true),
-            @Parameter(name = "pageSize", description = "每页大小", required = true)
-    })
-    public Page<PayOrder> page(Page<PayOrder> page) {
-        return PayOrderService.page(page);
+    public Result<BasePage<PayOrderVO>> page(@ParameterObject PayOrderQuery query) {
+        return Result.OK(PayOrderService.queryPage(query));
     }
 }

+ 24 - 24
web/admin-api/src/main/java/pay/platform/api/system/controller/PayPlatformSettingController.java

@@ -1,13 +1,17 @@
 package pay.platform.api.system.controller;
 
-import com.mybatisflex.core.paginate.Page;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.Parameters;
 import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springdoc.core.annotations.ParameterObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import pay.platform.api.system.model.query.PayPlatformSettingQuery;
+import pay.platform.api.system.model.vo.PayPlatformSettingVO;
 import pay.platform.api.system.servcie.PayPlatformSettingService;
+import pay.platform.core.common.Result;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.domain.PayPlatformSetting;
 
 import java.io.Serializable;
@@ -31,12 +35,12 @@ public class PayPlatformSettingController {
      * 添加 平台配置
      *
      * @param PayPlatformSetting 平台配置
-     * @return {@code true} 添加成功,{@code false} 添加失败
+     * @ return Result.OK({@code true} 添加成功,{@code false} 添加失败
      */
     @PostMapping("/save")
     @Operation(summary = "添加平台配置")
-    public boolean save(@RequestBody PayPlatformSetting PayPlatformSetting) {
-        return PayPlatformSettingService.save(PayPlatformSetting);
+    public Result<Boolean> save(@RequestBody PayPlatformSetting PayPlatformSetting) {
+        return Result.OK(PayPlatformSettingService.save(PayPlatformSetting));
     }
 
 
@@ -44,15 +48,15 @@ public class PayPlatformSettingController {
      * 根据主键删除平台配置
      *
      * @param id 主键
-     * @return {@code true} 删除成功,{@code false} 删除失败
+     * @ return Result.OK({@code true} 删除成功,{@code false} 删除失败
      */
     @DeleteMapping("/remove/{id}")
     @Operation(summary = "根据主键删除平台配置")
     @Parameters(value = {
             @Parameter(name = "id", description = "id", required = true)
     })
-    public boolean remove(@PathVariable Serializable id) {
-        return PayPlatformSettingService.removeById(id);
+    public Result<Boolean> remove(@PathVariable Serializable id) {
+        return Result.OK(PayPlatformSettingService.removeById(id));
     }
 
 
@@ -60,24 +64,24 @@ public class PayPlatformSettingController {
      * 根据主键更新平台配置
      *
      * @param PayPlatformSetting 平台配置
-     * @return {@code true} 更新成功,{@code false} 更新失败
+     * @ return Result.OK({@code true} 更新成功,{@code false} 更新失败
      */
     @PutMapping("/update")
     @Operation(summary = "根据主键更新平台配置")
-    public boolean update(@RequestBody PayPlatformSetting PayPlatformSetting) {
-        return PayPlatformSettingService.updateById(PayPlatformSetting);
+    public Result<Boolean> update(@RequestBody PayPlatformSetting PayPlatformSetting) {
+        return Result.OK(PayPlatformSettingService.updateById(PayPlatformSetting));
     }
 
 
     /**
      * 查询所有平台配置
      *
-     * @return 所有数据
+     * @ return Result.OK(所有数据
      */
     @GetMapping("/list")
     @Operation(summary = "查询所有平台配置")
-    public List<PayPlatformSetting> list() {
-        return PayPlatformSettingService.list();
+    public Result<List<PayPlatformSetting>> list() {
+        return Result.OK(PayPlatformSettingService.list());
     }
 
 
@@ -85,31 +89,27 @@ public class PayPlatformSettingController {
      * 根据平台配置主键获取详细信息。
      *
      * @param id PayPlatformSetting主键
-     * @return 平台配置详情
+     * @ return Result.OK(平台配置详情
      */
     @GetMapping("/getInfo/{id}")
     @Operation(summary = "根据平台配置主键获取详细信息")
     @Parameters(value = {
             @Parameter(name = "id", description = "id", required = true)
     })
-    public PayPlatformSetting getInfo(@PathVariable Serializable id) {
-        return PayPlatformSettingService.getById(id);
+    public Result<PayPlatformSetting> getInfo(@PathVariable Serializable id) {
+        return Result.OK(PayPlatformSettingService.getById(id));
     }
 
 
     /**
      * 分页查询平台配置
      *
-     * @param page 分页对象
-     * @return 分页对象
+     * @param query 分页对象
+     * @ return Result.OK(分页对象
      */
     @GetMapping("/page")
     @Operation(summary = "分页查询平台配置")
-    @Parameters(value = {
-            @Parameter(name = "pageNumber", description = "页码", required = true),
-            @Parameter(name = "pageSize", description = "每页大小", required = true)
-    })
-    public Page<PayPlatformSetting> page(Page<PayPlatformSetting> page) {
-        return PayPlatformSettingService.page(page);
+    public Result<BasePage<PayPlatformSettingVO>> page(@ParameterObject PayPlatformSettingQuery query) {
+        return Result.OK(PayPlatformSettingService.queryPage(query));
     }
 }

+ 28 - 0
web/admin-api/src/main/java/pay/platform/api/system/model/query/PayAgentQuery.java

@@ -0,0 +1,28 @@
+package pay.platform.api.system.model.query;
+
+import io.swagger.v3.oas.annotations.Parameter;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+import pay.platform.core.common.domain.BasePageQuery;
+
+/**
+ *
+ **/
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString
+public class PayAgentQuery extends BasePageQuery {
+
+    /**
+     * 用户名
+     */
+    @Parameter(description = "用户名")
+    private String userName;
+
+    /**
+     * 状态
+     */
+    @Parameter(description = "状态 ")
+    private Integer status;
+}

+ 44 - 0
web/admin-api/src/main/java/pay/platform/api/system/model/query/PayChannelQuery.java

@@ -0,0 +1,44 @@
+package pay.platform.api.system.model.query;
+
+import com.mybatisflex.annotation.Table;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import pay.platform.core.common.domain.BasePageQuery;
+
+/**
+ * 通道管理 实体类。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "通道管理")
+@Table(value = "t_pay_channel")
+public class PayChannelQuery extends BasePageQuery {
+
+
+    /**
+     * 名称
+     */
+    @Schema(description = "名称")
+    private String name;
+
+    /**
+     * 编码
+     */
+    @Schema(description = "编码")
+    private String code;
+
+    /**
+     * 状态
+     */
+    @Schema(description = "状态 ")
+    private Integer status;
+
+}

+ 38 - 0
web/admin-api/src/main/java/pay/platform/api/system/model/query/PayMerchantQuery.java

@@ -0,0 +1,38 @@
+package pay.platform.api.system.model.query;
+
+import com.mybatisflex.annotation.Table;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import pay.platform.core.common.domain.BasePageQuery;
+
+/**
+ * 商户管理 实体类。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "商户管理")
+@Table(value = "t_pay_merchant")
+public class PayMerchantQuery extends BasePageQuery {
+
+    /**
+     * 用户名
+     */
+    @Schema(description = "用户名")
+    private String userName;
+
+
+    /**
+     * 状态
+     */
+    @Schema(description = "状态 ")
+    private Integer status;
+
+}

+ 106 - 0
web/admin-api/src/main/java/pay/platform/api/system/model/query/PayOrderQuery.java

@@ -0,0 +1,106 @@
+package pay.platform.api.system.model.query;
+
+import com.mybatisflex.annotation.Table;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import pay.platform.core.common.domain.BasePageQuery;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ * 通道管理 实体类。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "通道管理")
+@Table(value = "t_pay_order")
+public class PayOrderQuery extends BasePageQuery {
+
+    /**
+     * id
+     */
+    @Schema(description = "id")
+    private Long id;
+
+    /**
+     * 订单号
+     */
+    @Schema(description = "订单号")
+    private String orderNo;
+
+    /**
+     * 平台订单号
+     */
+    @Schema(description = "平台订单号")
+    private String platformOrderNo;
+
+    /**
+     * 代理用户ID
+     */
+    @Schema(description = "代理用户ID")
+    private Long agentId;
+
+    /**
+     * 商户用户ID
+     */
+    @Schema(description = "商户用户ID")
+    private Long merchantId;
+
+    /**
+     * 金额
+     */
+    @Schema(description = "金额")
+    private BigDecimal amount;
+
+    /**
+     * 手续费
+     */
+    @Schema(description = "手续费")
+    private BigDecimal fee;
+
+    /**
+     * 费率
+     */
+    @Schema(description = "费率")
+    private BigDecimal rate;
+
+    /**
+     * -1:支付失败 0:待支付 1:支付成功 2:退款
+     */
+    @Schema(description = "-1:支付失败 0:待支付 1:支付成功 2:退款")
+    private Integer status;
+
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
+}

+ 79 - 0
web/admin-api/src/main/java/pay/platform/api/system/model/query/PayPlatformSettingQuery.java

@@ -0,0 +1,79 @@
+package pay.platform.api.system.model.query;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import pay.platform.core.common.domain.BasePageQuery;
+
+import java.time.LocalDateTime;
+
+/**
+ * 平台配置 实体类。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "平台配置")
+public class PayPlatformSettingQuery extends BasePageQuery {
+
+    /**
+     * id
+     */
+    @Schema(description = "id")
+    private Long id;
+
+    /**
+     * 服务商ID
+     */
+    @Schema(description = "服务商ID")
+    private Long pId;
+
+    /**
+     * 密钥
+     */
+    @Schema(description = "密钥")
+    private String privateKey;
+
+    /**
+     * 公钥
+     */
+    @Schema(description = "公钥")
+    private String publicKey;
+
+    /**
+     * 状态
+     */
+    @Schema(description = "状态 ")
+    private Integer status;
+
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
+}

+ 26 - 5
web/admin-api/src/main/java/pay/platform/api/system/model/vo/PayAgentVO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
 
 /**
  * 代理系统 实体类。
@@ -30,11 +31,6 @@ public class PayAgentVO {
     @Schema(description = "用户名")
     private String userName;
 
-    /**
-     * 密码
-     */
-    @Schema(description = "密码")
-    private String password;
 
     /**
      * 余额
@@ -66,4 +62,29 @@ public class PayAgentVO {
     @Schema(description = "状态 ")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
+
 }

+ 25 - 0
web/admin-api/src/main/java/pay/platform/api/system/model/vo/PayAggregationVO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
 
 /**
  * 聚合支付 实体类。
@@ -83,4 +84,28 @@ public class PayAggregationVO {
     @Schema(description = "状态 ")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
 }

+ 26 - 0
web/admin-api/src/main/java/pay/platform/api/system/model/vo/PayChannelVO.java

@@ -7,6 +7,8 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.time.LocalDateTime;
+
 /**
  * 通道管理 实体类。
  *
@@ -45,4 +47,28 @@ public class PayChannelVO {
     @Schema(description = "状态 ")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
 }

+ 25 - 5
web/admin-api/src/main/java/pay/platform/api/system/model/vo/PayMerchantVO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
 
 /**
  * 商户管理 实体类。
@@ -35,11 +36,6 @@ public class PayMerchantVO {
     @Schema(description = "用户名")
     private String userName;
 
-    /**
-     * 密码
-     */
-    @Schema(description = "密码")
-    private String password;
 
     /**
      * 余额
@@ -71,4 +67,28 @@ public class PayMerchantVO {
     @Schema(description = "状态 ")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
 }

+ 25 - 0
web/admin-api/src/main/java/pay/platform/api/system/model/vo/PayOrderVO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
 
 /**
  * 通道管理 实体类。
@@ -77,4 +78,28 @@ public class PayOrderVO {
     @Schema(description = "-1:支付失败 0:待支付 1:支付成功 2:退款")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
 }

+ 26 - 0
web/admin-api/src/main/java/pay/platform/api/system/model/vo/PayPlatformSettingVO.java

@@ -7,6 +7,8 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.time.LocalDateTime;
+
 /**
  * 平台配置 实体类。
  *
@@ -51,4 +53,28 @@ public class PayPlatformSettingVO {
     @Schema(description = "状态 ")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
 }

+ 5 - 0
web/admin-api/src/main/java/pay/platform/api/system/servcie/PayAgentService.java

@@ -2,6 +2,9 @@ package pay.platform.api.system.servcie;
 
 
 import com.mybatisflex.core.service.IService;
+import pay.platform.api.system.model.query.PayAgentQuery;
+import pay.platform.api.system.model.vo.PayAgentVO;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.domain.PayAgent;
 
 /**
@@ -13,4 +16,6 @@ import pay.platform.domain.PayAgent;
 public interface PayAgentService extends IService<PayAgent> {
 
     boolean saveAgent(PayAgent payAgent);
+
+    BasePage<PayAgentVO> queryPage(PayAgentQuery query);
 }

+ 1 - 0
web/admin-api/src/main/java/pay/platform/api/system/servcie/PayAggregationService.java

@@ -12,4 +12,5 @@ import pay.platform.domain.PayAggregation;
  */
 public interface PayAggregationService extends IService<PayAggregation> {
 
+    boolean savePayAggregation(PayAggregation payAggregation);
 }

+ 2 - 2
web/agent-api/src/main/java/pay/platform/api/system/servcie/PayMerchantStoreService.java → web/admin-api/src/main/java/pay/platform/api/system/servcie/PayAggregationStoreService.java

@@ -2,7 +2,7 @@ package pay.platform.api.system.servcie;
 
 
 import com.mybatisflex.core.service.IService;
-import pay.platform.domain.PayMerchantStore;
+import pay.platform.domain.PayAggregationStore;
 
 /**
  * 商户关联支付宝店铺 服务层。
@@ -10,6 +10,6 @@ import pay.platform.domain.PayMerchantStore;
  * @author mybatis-flex-helper automatic generation
  * @since 1.0
  */
-public interface PayMerchantStoreService extends IService<PayMerchantStore> {
+public interface PayAggregationStoreService extends IService<PayAggregationStore> {
 
 }

+ 4 - 1
web/admin-api/src/main/java/pay/platform/api/system/servcie/PayChannelService.java

@@ -2,6 +2,9 @@ package pay.platform.api.system.servcie;
 
 
 import com.mybatisflex.core.service.IService;
+import pay.platform.api.system.model.query.PayChannelQuery;
+import pay.platform.api.system.model.vo.PayChannelVO;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.domain.PayChannel;
 
 /**
@@ -11,5 +14,5 @@ import pay.platform.domain.PayChannel;
  * @since 1.0
  */
 public interface PayChannelService extends IService<PayChannel> {
-
+    BasePage<PayChannelVO> queryPage(PayChannelQuery query);
 }

+ 4 - 0
web/admin-api/src/main/java/pay/platform/api/system/servcie/PayMerchantService.java

@@ -2,6 +2,9 @@ package pay.platform.api.system.servcie;
 
 
 import com.mybatisflex.core.service.IService;
+import pay.platform.api.system.model.query.PayMerchantQuery;
+import pay.platform.api.system.model.vo.PayMerchantVO;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.domain.PayMerchant;
 
 /**
@@ -14,4 +17,5 @@ public interface PayMerchantService extends IService<PayMerchant> {
 
     boolean saveMerchant(PayMerchant payMerchant);
 
+    BasePage<PayMerchantVO> queryPage(PayMerchantQuery query);
 }

+ 4 - 1
web/admin-api/src/main/java/pay/platform/api/system/servcie/PayOrderService.java

@@ -2,6 +2,9 @@ package pay.platform.api.system.servcie;
 
 
 import com.mybatisflex.core.service.IService;
+import pay.platform.api.system.model.query.PayOrderQuery;
+import pay.platform.api.system.model.vo.PayOrderVO;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.domain.PayOrder;
 
 /**
@@ -11,5 +14,5 @@ import pay.platform.domain.PayOrder;
  * @since 1.0
  */
 public interface PayOrderService extends IService<PayOrder> {
-
+    BasePage<PayOrderVO> queryPage(PayOrderQuery query);
 }

+ 4 - 1
web/admin-api/src/main/java/pay/platform/api/system/servcie/PayPlatformSettingService.java

@@ -2,6 +2,9 @@ package pay.platform.api.system.servcie;
 
 
 import com.mybatisflex.core.service.IService;
+import pay.platform.api.system.model.query.PayPlatformSettingQuery;
+import pay.platform.api.system.model.vo.PayPlatformSettingVO;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.domain.PayPlatformSetting;
 
 /**
@@ -11,5 +14,5 @@ import pay.platform.domain.PayPlatformSetting;
  * @since 1.0
  */
 public interface PayPlatformSettingService extends IService<PayPlatformSetting> {
-
+    BasePage<PayPlatformSettingVO> queryPage(PayPlatformSettingQuery query);
 }

+ 22 - 0
web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayAgentServiceImpl.java

@@ -1,13 +1,25 @@
 package pay.platform.api.system.servcie.impl;
 
 
+import cn.hutool.core.bean.BeanUtil;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
+import com.mybatisflex.core.util.StringUtil;
 import org.springframework.stereotype.Service;
+import pay.platform.api.system.model.query.PayAgentQuery;
+import pay.platform.api.system.model.vo.PayAgentVO;
 import pay.platform.api.system.servcie.PayAgentService;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.core.common.domain.BaseService;
 import pay.platform.core.util.PasswordUtil;
 import pay.platform.domain.PayAgent;
+import pay.platform.domain.table.PayAgentTableDef;
 import pay.platform.mapper.PayAgentMapper;
 
+import java.util.List;
+
+import static pay.platform.domain.table.PayAgentTableDef.PAY_AGENT;
+
 /**
  * 代理系统 服务层实现。
  *
@@ -22,4 +34,14 @@ public class PayAgentServiceImpl extends BaseService<PayAgentMapper, PayAgent> i
         payAgent.setPassword(PasswordUtil.encoder(payAgent.getPassword()));
         return save(payAgent);
     }
+
+    @Override
+    public BasePage<PayAgentVO> queryPage(PayAgentQuery query) {
+        QueryWrapper queryWrapper = QueryWrapper.create().from(PayAgentTableDef.PAY_AGENT).where("1 = 1")
+                .and(PayAgentTableDef.PAY_AGENT.USER_NAME.like(query.getUserName(), StringUtil.isNotBlank(query.getUserName())))
+                .and(PAY_AGENT.STATUS.eq(query.getStatus(), query.getStatus() != null));
+        Page<PayAgent> page = mapper.paginate(new Page<>(query.getCurrent(), query.getSize()), queryWrapper);
+        List<PayAgentVO> vos = BeanUtil.copyToList(page.getRecords(), PayAgentVO.class);
+        return new BasePage<>(page.getPageNumber(), page.getPageSize(), page.getTotalRow(), vos);
+    }
 }

+ 26 - 0
web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayAggregationServiceImpl.java

@@ -1,12 +1,19 @@
 package pay.platform.api.system.servcie.impl;
 
 
+import cn.hutool.core.util.RandomUtil;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 import pay.platform.api.system.servcie.PayAggregationService;
 import pay.platform.core.common.domain.BaseService;
 import pay.platform.domain.PayAggregation;
+import pay.platform.domain.PayAggregationStore;
 import pay.platform.mapper.PayAggregationMapper;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * 聚合支付 服务层实现。
  *
@@ -15,5 +22,24 @@ import pay.platform.mapper.PayAggregationMapper;
  */
 @Service
 public class PayAggregationServiceImpl extends BaseService<PayAggregationMapper, PayAggregation> implements PayAggregationService {
+    @Autowired
+    private pay.platform.api.system.servcie.PayAggregationStoreService PayAggregationStoreService;
+
+    @Override
+    @Transactional
+    public boolean savePayAggregation(PayAggregation payAggregation) {
+        save(payAggregation);
+        List<PayAggregationStore> storeList = new ArrayList<>();
+        for (int i = 0; i < 7; i++) {
+            PayAggregationStore PayAggregationStore = new PayAggregationStore();
+//            PayAggregationStore.setAggregationId(payAggregation.getId());
+            PayAggregationStore.setChannelId(payAggregation.getChannelId());
+            PayAggregationStore.setStoreId(RandomUtil.randomNumbers(13));
+            PayAggregationStore.setOperatorId(RandomUtil.randomNumbers(6));
+            storeList.add(PayAggregationStore);
 
+        }
+        PayAggregationStoreService.saveBatch(storeList);
+        return false;
+    }
 }

+ 19 - 0
web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayAggregationStoreServiceImpl.java

@@ -0,0 +1,19 @@
+package pay.platform.api.system.servcie.impl;
+
+
+import com.mybatisflex.spring.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import pay.platform.api.system.servcie.PayAggregationStoreService;
+import pay.platform.domain.PayAggregationStore;
+import pay.platform.mapper.PayAggregationStoreMapper;
+
+/**
+ * 商户关联支付宝店铺 服务层实现。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Service
+public class PayAggregationStoreServiceImpl extends ServiceImpl<PayAggregationStoreMapper, PayAggregationStore> implements PayAggregationStoreService {
+
+}

+ 21 - 0
web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayChannelServiceImpl.java

@@ -1,12 +1,23 @@
 package pay.platform.api.system.servcie.impl;
 
 
+import cn.hutool.core.bean.BeanUtil;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
+import com.mybatisflex.core.util.StringUtil;
 import org.springframework.stereotype.Service;
+import pay.platform.api.system.model.query.PayChannelQuery;
+import pay.platform.api.system.model.vo.PayChannelVO;
 import pay.platform.api.system.servcie.PayChannelService;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.core.common.domain.BaseService;
 import pay.platform.domain.PayChannel;
 import pay.platform.mapper.PayChannelMapper;
 
+import java.util.List;
+
+import static pay.platform.domain.table.PayChannelTableDef.PAY_CHANNEL;
+
 /**
  * 通道管理 服务层实现。
  *
@@ -16,4 +27,14 @@ import pay.platform.mapper.PayChannelMapper;
 @Service
 public class PayChannelServiceImpl extends BaseService<PayChannelMapper, PayChannel> implements PayChannelService {
 
+    @Override
+    public BasePage<PayChannelVO> queryPage(PayChannelQuery query) {
+        QueryWrapper queryWrapper = QueryWrapper.create().from(PAY_CHANNEL).where("1 = 1")
+                .and(PAY_CHANNEL.NAME.like(query.getName(), StringUtil.isNotBlank(query.getName())))
+                .and(PAY_CHANNEL.CODE.like(query.getCode(), StringUtil.isNotBlank(query.getCode())))
+                .and(PAY_CHANNEL.STATUS.eq(query.getStatus(), query.getStatus() != null));
+        Page<PayChannel> page = mapper.paginate(new Page<>(query.getCurrent(), query.getSize()), queryWrapper);
+        List<PayChannelVO> vos = BeanUtil.copyToList(page.getRecords(), PayChannelVO.class);
+        return new BasePage<>(page.getPageNumber(), page.getPageSize(), page.getTotalRow(), vos);
+    }
 }

+ 22 - 15
web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayMerchantServiceImpl.java

@@ -1,23 +1,29 @@
 package pay.platform.api.system.servcie.impl;
 
 
+import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.RandomUtil;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
+import com.mybatisflex.core.util.StringUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import pay.platform.api.system.model.query.PayMerchantQuery;
+import pay.platform.api.system.model.vo.PayMerchantVO;
 import pay.platform.api.system.servcie.PayMerchantAppKeyService;
 import pay.platform.api.system.servcie.PayMerchantService;
-import pay.platform.api.system.servcie.PayMerchantStoreService;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.core.common.domain.BaseService;
 import pay.platform.core.util.PasswordUtil;
 import pay.platform.domain.PayMerchant;
 import pay.platform.domain.PayMerchantAppKey;
-import pay.platform.domain.PayMerchantStore;
 import pay.platform.mapper.PayMerchantMapper;
 
-import java.util.ArrayList;
 import java.util.List;
 
+import static pay.platform.domain.table.PayMerchantTableDef.PAY_MERCHANT;
+
 /**
  * 商户管理 服务层实现。
  *
@@ -26,8 +32,7 @@ import java.util.List;
  */
 @Service
 public class PayMerchantServiceImpl extends BaseService<PayMerchantMapper, PayMerchant> implements PayMerchantService {
-    @Autowired
-    private PayMerchantStoreService payMerchantStoreService;
+
     @Autowired
     private PayMerchantAppKeyService payMerchantAppKeyService;
 
@@ -36,20 +41,22 @@ public class PayMerchantServiceImpl extends BaseService<PayMerchantMapper, PayMe
     public boolean saveMerchant(PayMerchant payMerchant) {
         payMerchant.setPassword(PasswordUtil.encoder(payMerchant.getPassword()));
         save(payMerchant);
-        List<PayMerchantStore> storeList = new ArrayList<>();
-        for (int i = 0; i < 7; i++) {
-            PayMerchantStore payMerchantStore = new PayMerchantStore();
-            payMerchantStore.setMerchantId(payMerchant.getId());
-            payMerchantStore.setStoreId(RandomUtil.randomNumbers(13));
-            payMerchantStore.setOperatorId(RandomUtil.randomNumbers(6));
-            storeList.add(payMerchantStore);
-
-        }
-        payMerchantStoreService.saveBatch(storeList);
+
         PayMerchantAppKey payMerchantAppKey = PayMerchantAppKey.builder().appId(RandomUtil.randomString(18)).appSecret(RandomUtil.randomString(32))
                 .appKey(RandomUtil.randomString(12))
                 .merchantId(payMerchant.getId()).build();
         payMerchantAppKeyService.save(payMerchantAppKey);
         return true;
     }
+
+
+    @Override
+    public BasePage<PayMerchantVO> queryPage(PayMerchantQuery query) {
+        QueryWrapper queryWrapper = QueryWrapper.create().from(PAY_MERCHANT).where("1 = 1")
+                .and(PAY_MERCHANT.USER_NAME.like(query.getUserName(), StringUtil.isNotBlank(query.getUserName())))
+                .and(PAY_MERCHANT.STATUS.eq(query.getStatus(), query.getStatus() != null));
+        Page<PayMerchant> page = mapper.paginate(new Page<>(query.getCurrent(), query.getSize()), queryWrapper);
+        List<PayMerchantVO> vos = BeanUtil.copyToList(page.getRecords(), PayMerchantVO.class);
+        return new BasePage<>(page.getPageNumber(), page.getPageSize(), page.getTotalRow(), vos);
+    }
 }

+ 0 - 19
web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayMerchantStoreServiceImpl.java

@@ -1,19 +0,0 @@
-package pay.platform.api.system.servcie.impl;
-
-
-import com.mybatisflex.spring.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-import pay.platform.api.system.servcie.PayMerchantStoreService;
-import pay.platform.domain.PayMerchantStore;
-import pay.platform.mapper.PayMerchantStoreMapper;
-
-/**
- * 商户关联支付宝店铺 服务层实现。
- *
- * @author mybatis-flex-helper automatic generation
- * @since 1.0
- */
-@Service
-public class PayMerchantStoreServiceImpl extends ServiceImpl<PayMerchantStoreMapper, PayMerchantStore> implements PayMerchantStoreService {
-
-}

+ 23 - 0
web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayOrderServiceImpl.java

@@ -1,12 +1,22 @@
 package pay.platform.api.system.servcie.impl;
 
 
+import cn.hutool.core.bean.BeanUtil;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
+import com.mybatisflex.core.util.StringUtil;
 import org.springframework.stereotype.Service;
+import pay.platform.api.system.model.query.PayOrderQuery;
+import pay.platform.api.system.model.vo.PayOrderVO;
 import pay.platform.api.system.servcie.PayOrderService;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.core.common.domain.BaseService;
 import pay.platform.domain.PayOrder;
+import pay.platform.domain.table.PayOrderTableDef;
 import pay.platform.mapper.PayOrderMapper;
 
+import java.util.List;
+
 /**
  * 通道管理 服务层实现。
  *
@@ -16,4 +26,17 @@ import pay.platform.mapper.PayOrderMapper;
 @Service
 public class PayOrderServiceImpl extends BaseService<PayOrderMapper, PayOrder> implements PayOrderService {
 
+
+    @Override
+    public BasePage<PayOrderVO> queryPage(PayOrderQuery query) {
+        QueryWrapper queryWrapper = QueryWrapper.create().from(PayOrderTableDef.PAY_ORDER).where("1 = 1")
+                .and(PayOrderTableDef.PAY_ORDER.ORDER_NO.like(query.getOrderNo(), StringUtil.isNotBlank(query.getOrderNo())))
+                .and(PayOrderTableDef.PAY_ORDER.PLATFORM_ORDER_NO.like(query.getPlatformOrderNo(), StringUtil.isNotBlank(query.getPlatformOrderNo())))
+                .and(PayOrderTableDef.PAY_ORDER.MERCHANT_ID.like(query.getMerchantId(), query.getMerchantId() != null)
+                        .and(PayOrderTableDef.PAY_ORDER.AGENT_ID.like(query.getAgentId(), query.getAgentId() != null)
+                                .and(PayOrderTableDef.PAY_ORDER.STATUS.eq(query.getStatus(), query.getStatus() != null))));
+        Page<PayOrder> page = mapper.paginate(new Page<>(query.getCurrent(), query.getSize()), queryWrapper);
+        List<PayOrderVO> vos = BeanUtil.copyToList(page.getRecords(), PayOrderVO.class);
+        return new BasePage<>(page.getPageNumber(), page.getPageSize(), page.getTotalRow(), vos);
+    }
 }

+ 16 - 0
web/admin-api/src/main/java/pay/platform/api/system/servcie/impl/PayPlatformSettingServiceImpl.java

@@ -1,12 +1,21 @@
 package pay.platform.api.system.servcie.impl;
 
 
+import cn.hutool.core.bean.BeanUtil;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
 import org.springframework.stereotype.Service;
+import pay.platform.api.system.model.query.PayPlatformSettingQuery;
+import pay.platform.api.system.model.vo.PayPlatformSettingVO;
 import pay.platform.api.system.servcie.PayPlatformSettingService;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.core.common.domain.BaseService;
 import pay.platform.domain.PayPlatformSetting;
+import pay.platform.domain.table.PayPlatformSettingTableDef;
 import pay.platform.mapper.PayPlatformSettingMapper;
 
+import java.util.List;
+
 /**
  * 平台配置 服务层实现。
  *
@@ -16,4 +25,11 @@ import pay.platform.mapper.PayPlatformSettingMapper;
 @Service
 public class PayPlatformSettingServiceImpl extends BaseService<PayPlatformSettingMapper, PayPlatformSetting> implements PayPlatformSettingService {
 
+    @Override
+    public BasePage<PayPlatformSettingVO> queryPage(PayPlatformSettingQuery query) {
+        QueryWrapper queryWrapper = QueryWrapper.create().from(PayPlatformSettingTableDef.PAY_PLATFORM_SETTING).where("1 = 1");
+        Page<PayPlatformSetting> page = mapper.paginate(new Page<>(query.getCurrent(), query.getSize()), queryWrapper);
+        List<PayPlatformSettingVO> vos = BeanUtil.copyToList(page.getRecords(), PayPlatformSettingVO.class);
+        return new BasePage<>(page.getPageNumber(), page.getPageSize(), page.getTotalRow(), vos);
+    }
 }

+ 2 - 2
web/admin-api/src/main/resources/application.yml

@@ -16,13 +16,13 @@ spring:
     type: com.zaxxer.hikari.HikariDataSource
     url: jdbc:mysql://${IP:43.155.3.249}:3306/pay-platform?characterEncoding=UTF-8&useSSL=false&useUnicode=true&serverTimezone=GMT%2b8&allowPublicKeyRetrieval=true
     username: root
-    password: ${PWD:open@2023}
+    password: ${PASSWORD:open@2023}
   data:
     redis:
       host: ${IP:43.155.3.249}
       port: 6379
       database: 0
-      password: ${PWD:open@2023}
+      password: ${PASSWORD:open@2023}
   threads:
     virtual:
       enabled: true

+ 1 - 1
web/admin-api/src/main/resources/logback-spring.xml

@@ -6,7 +6,7 @@
     <!--默认配置-->
     <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
     <!--定义日志文件的存储地址 -->
-    <property name="LOG_HOME" value="${logfileTarget:-/var/log}"/>
+    <property name="LOG_HOME" value="${logfileTarget:-log}"/>
     <!--日志输出格式 -->
     <property name="FILE_LOG_PATTERN"
               value="%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} - [%t] %logger{150} #%M L%L %n%m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}%n"/>

+ 0 - 116
web/agent-api/src/main/java/pay/platform/api/system/controller/PayAggregationController.java

@@ -1,116 +0,0 @@
-package pay.platform.api.system.controller;
-
-import com.mybatisflex.core.paginate.Page;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import pay.platform.api.system.servcie.PayAggregationService;
-import pay.platform.domain.PayAggregation;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * 聚合支付 控制层。
- *
- * @author mybatis-flex-helper automatic generation
- * @since 1.0
- */
-@RestController
-@RequestMapping("/agent/pay/aggregation")
-@Tag(name = "聚合支付控制层")
-public class PayAggregationController {
-
-    @Autowired
-    private PayAggregationService payAggregationService;
-
-    /**
-     * 添加 聚合支付
-     *
-     * @param PayAggregation 聚合支付
-     * @return {@code true} 添加成功,{@code false} 添加失败
-     */
-    @PostMapping("/save")
-    @Operation(summary = "添加聚合支付")
-    public boolean save(@RequestBody PayAggregation PayAggregation) {
-
-        return payAggregationService.save(PayAggregation);
-    }
-
-
-    /**
-     * 根据主键删除聚合支付
-     *
-     * @param id 主键
-     * @return {@code true} 删除成功,{@code false} 删除失败
-     */
-    @DeleteMapping("/remove/{id}")
-    @Operation(summary = "根据主键删除聚合支付")
-    @Parameters(value = {
-            @Parameter(name = "id", description = "id", required = true)
-    })
-    public boolean remove(@PathVariable Serializable id) {
-        return payAggregationService.removeById(id);
-    }
-
-
-    /**
-     * 根据主键更新聚合支付
-     *
-     * @param PayAggregation 聚合支付
-     * @return {@code true} 更新成功,{@code false} 更新失败
-     */
-    @PutMapping("/update")
-    @Operation(summary = "根据主键更新聚合支付")
-    public boolean update(@RequestBody PayAggregation PayAggregation) {
-        return payAggregationService.updateById(PayAggregation);
-    }
-
-
-    /**
-     * 查询所有聚合支付
-     *
-     * @return 所有数据
-     */
-    @GetMapping("/list")
-    @Operation(summary = "查询所有聚合支付")
-    public List<PayAggregation> list() {
-        return payAggregationService.list();
-    }
-
-
-    /**
-     * 根据聚合支付主键获取详细信息。
-     *
-     * @param id PayAggregation主键
-     * @return 聚合支付详情
-     */
-    @GetMapping("/getInfo/{id}")
-    @Operation(summary = "根据聚合支付主键获取详细信息")
-    @Parameters(value = {
-            @Parameter(name = "id", description = "id", required = true)
-    })
-    public PayAggregation getInfo(@PathVariable Serializable id) {
-        return payAggregationService.getById(id);
-    }
-
-
-    /**
-     * 分页查询聚合支付
-     *
-     * @param page 分页对象
-     * @return 分页对象
-     */
-    @GetMapping("/page")
-    @Operation(summary = "分页查询聚合支付")
-    @Parameters(value = {
-            @Parameter(name = "pageNumber", description = "页码", required = true),
-            @Parameter(name = "pageSize", description = "每页大小", required = true)
-    })
-    public Page<PayAggregation> page(Page<PayAggregation> page) {
-        return payAggregationService.page(page);
-    }
-}

+ 116 - 0
web/agent-api/src/main/java/pay/platform/api/system/controller/PayChannelController.java

@@ -0,0 +1,116 @@
+package pay.platform.api.system.controller;
+
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springdoc.core.annotations.ParameterObject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import pay.platform.api.system.model.query.PayChannelQuery;
+import pay.platform.api.system.model.vo.PayChannelVO;
+import pay.platform.api.system.servcie.PayChannelService;
+import pay.platform.core.common.Result;
+import pay.platform.core.common.domain.BasePage;
+import pay.platform.domain.PayChannel;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 通道 控制层。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@RestController
+@RequestMapping("/sys/pay/channel")
+@Tag(name = "通道控制层")
+public class PayChannelController {
+
+    @Autowired
+    private PayChannelService PayChannelService;
+
+    /**
+     * 添加 通道
+     *
+     * @param PayChannel 通道
+     * @return Result.OK({ @ code true } 添加成功 , { @ code false } 添加失败
+     */
+    @PostMapping("/save")
+    @Operation(summary = "添加通道")
+
+    public Result<Boolean> save(@RequestBody PayChannel PayChannel) {
+        return Result.OK(PayChannelService.savePayChannel(PayChannel));
+    }
+
+
+    /**
+     * 根据主键删除通道
+     *
+     * @param id 主键
+     * @return Result.OK({ @ code true } 删除成功 , { @ code false } 删除失败
+     */
+    @DeleteMapping("/remove/{id}")
+    @Operation(summary = "根据主键删除通道")
+    @Parameters(value = {
+            @Parameter(name = "id", description = "id", required = true)
+    })
+    public Result<Boolean> remove(@PathVariable Serializable id) {
+        return Result.OK(PayChannelService.removeById(id));
+    }
+
+
+    /**
+     * 根据主键更新通道
+     *
+     * @param PayChannel 通道
+     * @return Result.OK({ @ code true } 更新成功 , { @ code false } 更新失败
+     */
+    @PutMapping("/update")
+    @Operation(summary = "根据主键更新通道")
+    public Result<Boolean> update(@RequestBody PayChannel PayChannel) {
+        return Result.OK(PayChannelService.updateById(PayChannel));
+    }
+
+
+    /**
+     * 查询所有通道
+     *
+     * @return Result.OK(所有数据
+     */
+    @GetMapping("/list")
+    @Operation(summary = "查询所有通道")
+    public Result<List<PayChannel>> list() {
+        return Result.OK(PayChannelService.list());
+    }
+
+
+    /**
+     * 根据通道主键获取详细信息。
+     *
+     * @param id PayChannel主键
+     * @return Result.OK(通道详情
+     */
+    @GetMapping("/getInfo/{id}")
+    @Operation(summary = "根据通道主键获取详细信息")
+    @Parameters(value = {
+            @Parameter(name = "id", description = "id", required = true)
+    })
+    public Result<PayChannel> getInfo(@PathVariable Serializable id) {
+        return Result.OK(PayChannelService.getById(id));
+    }
+
+
+    /**
+     * 分页查询通道
+     *
+     * @param query 分页对象
+     * @return Result.OK(分页对象
+     */
+    @GetMapping("/page")
+    @Operation(summary = "分页查询通道")
+    public Result<BasePage<PayChannelVO>> page(@ParameterObject PayChannelQuery query) {
+        return Result.OK(PayChannelService.queryPage(query));
+    }
+}

+ 25 - 31
web/agent-api/src/main/java/pay/platform/api/system/controller/PayMerchantController.java

@@ -1,17 +1,18 @@
 package pay.platform.api.system.controller;
 
-import com.mybatisflex.core.paginate.Page;
-import com.mybatisflex.core.query.QueryWrapper;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.Parameters;
 import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springdoc.core.annotations.ParameterObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import pay.platform.api.system.model.query.PayMerchantQuery;
+import pay.platform.api.system.model.vo.PayMerchantVO;
 import pay.platform.api.system.servcie.PayMerchantService;
-import pay.platform.core.security.util.SecurityUtil;
+import pay.platform.core.common.Result;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.domain.PayMerchant;
-import pay.platform.domain.table.PayMerchantTableDef;
 
 import java.io.Serializable;
 import java.util.List;
@@ -23,7 +24,7 @@ import java.util.List;
  * @since 1.0
  */
 @RestController
-@RequestMapping("/agent/pay/merchant")
+@RequestMapping("/sys/pay/merchant")
 @Tag(name = "商户控制层")
 public class PayMerchantController {
 
@@ -34,14 +35,13 @@ public class PayMerchantController {
      * 添加 商户
      *
      * @param PayMerchant 商户
-     * @return {@code true} 添加成功,{@code false} 添加失败
+     * @return Result.OK({ @ code true } 添加成功  { @ code false } 添加失败
      */
     @PostMapping("/save")
     @Operation(summary = "添加商户")
 
-    public boolean save(@RequestBody PayMerchant PayMerchant) {
-
-        return PayMerchantService.saveMerchant(PayMerchant);
+    public Result<Boolean> save(@RequestBody PayMerchant PayMerchant) {
+        return Result.OK(PayMerchantService.saveMerchant(PayMerchant));
     }
 
 
@@ -49,15 +49,15 @@ public class PayMerchantController {
      * 根据主键删除商户
      *
      * @param id 主键
-     * @return {@code true} 删除成功,{@code false} 删除失败
+     * @return Result.OK({ @ code true } 删除成功  { @ code false } 删除失败
      */
     @DeleteMapping("/remove/{id}")
     @Operation(summary = "根据主键删除商户")
     @Parameters(value = {
             @Parameter(name = "id", description = "id", required = true)
     })
-    public boolean remove(@PathVariable Serializable id) {
-        return PayMerchantService.removeById(id);
+    public Result<Boolean> remove(@PathVariable Serializable id) {
+        return Result.OK(PayMerchantService.removeById(id));
     }
 
 
@@ -65,25 +65,24 @@ public class PayMerchantController {
      * 根据主键更新商户
      *
      * @param PayMerchant 商户
-     * @return {@code true} 更新成功,{@code false} 更新失败
+     * @return Result.OK({ @ code true } 更新成功  { @ code false } 更新失败
      */
     @PutMapping("/update")
     @Operation(summary = "根据主键更新商户")
-    public boolean update(@RequestBody PayMerchant PayMerchant) {
-        return PayMerchantService.updateById(PayMerchant);
+    public Result<Boolean> update(@RequestBody PayMerchant PayMerchant) {
+        return Result.OK(PayMerchantService.updateById(PayMerchant));
     }
 
 
     /**
      * 查询所有商户
      *
-     * @return 所有数据
+     * @return Result.OK(所有数据
      */
     @GetMapping("/list")
     @Operation(summary = "查询所有商户")
-    public List<PayMerchant> list() {
-        QueryWrapper queryWrapper = new QueryWrapper().eq(String.valueOf(PayMerchantTableDef.PAY_MERCHANT.AGENT_ID), SecurityUtil.getCurrentUser().getUserid());
-        return PayMerchantService.list(queryWrapper);
+    public Result<List<PayMerchant>> list() {
+        return Result.OK(PayMerchantService.list());
     }
 
 
@@ -91,32 +90,27 @@ public class PayMerchantController {
      * 根据商户主键获取详细信息。
      *
      * @param id PayMerchant主键
-     * @return 商户详情
+     * @return Result.OK(商户详情
      */
     @GetMapping("/getInfo/{id}")
     @Operation(summary = "根据商户主键获取详细信息")
     @Parameters(value = {
             @Parameter(name = "id", description = "id", required = true)
     })
-    public PayMerchant getInfo(@PathVariable Serializable id) {
-        return PayMerchantService.getById(id);
+    public Result<PayMerchant> getInfo(@PathVariable Serializable id) {
+        return Result.OK(PayMerchantService.getById(id));
     }
 
 
     /**
      * 分页查询商户
      *
-     * @param page 分页对象
-     * @return 分页对象
+     * @param query 分页对象
+     * @return Result.OK(分页对象
      */
     @GetMapping("/page")
     @Operation(summary = "分页查询商户")
-    @Parameters(value = {
-            @Parameter(name = "pageNumber", description = "页码", required = true),
-            @Parameter(name = "pageSize", description = "每页大小", required = true)
-    })
-    public Page<PayMerchant> page(Page<PayMerchant> page) {
-        QueryWrapper queryWrapper = new QueryWrapper().eq(String.valueOf(PayMerchantTableDef.PAY_MERCHANT.AGENT_ID), SecurityUtil.getCurrentUser().getUserid());
-        return PayMerchantService.page(page, queryWrapper);
+    public Result<BasePage<PayMerchantVO>> page(@ParameterObject PayMerchantQuery query) {
+        return Result.OK(PayMerchantService.queryPage(query));
     }
 }

+ 24 - 25
web/agent-api/src/main/java/pay/platform/api/system/controller/PayOrderController.java

@@ -1,14 +1,18 @@
 package pay.platform.api.system.controller;
 
-import com.mybatisflex.core.paginate.Page;
 import com.mybatisflex.core.query.QueryWrapper;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.Parameters;
 import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springdoc.core.annotations.ParameterObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import pay.platform.api.system.model.query.PayOrderQuery;
+import pay.platform.api.system.model.vo.PayOrderVO;
 import pay.platform.api.system.servcie.PayOrderService;
+import pay.platform.core.common.Result;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.core.security.util.SecurityUtil;
 import pay.platform.domain.PayOrder;
 import pay.platform.domain.table.PayOrderTableDef;
@@ -34,13 +38,13 @@ public class PayOrderController {
      * 添加 订单
      *
      * @param PayOrder 订单
-     * @return {@code true} 添加成功,{@code false} 添加失败
+     * @return Result<{ @ code true } 添加成功  { @ code false } 添加失败
      */
     @PostMapping("/save")
     @Operation(summary = "添加订单")
-    public boolean save(@RequestBody PayOrder PayOrder) {
+    public Result<Boolean> save(@RequestBody PayOrder PayOrder) {
         PayOrder.setAgentId(SecurityUtil.getCurrentUser().getUserid());
-        return PayOrderService.save(PayOrder);
+        return Result.OK(PayOrderService.save(PayOrder));
     }
 
 
@@ -48,15 +52,15 @@ public class PayOrderController {
      * 根据主键删除订单
      *
      * @param id 主键
-     * @return {@code true} 删除成功,{@code false} 删除失败
+     * @return Result<{ @ code true } 删除成功  { @ code false } 删除失败
      */
     @DeleteMapping("/remove/{id}")
     @Operation(summary = "根据主键删除订单")
     @Parameters(value = {
             @Parameter(name = "id", description = "id", required = true)
     })
-    public boolean remove(@PathVariable Serializable id) {
-        return PayOrderService.removeById(id);
+    public Result<Boolean> remove(@PathVariable Serializable id) {
+        return Result.OK(PayOrderService.removeById(id));
     }
 
 
@@ -64,25 +68,25 @@ public class PayOrderController {
      * 根据主键更新订单
      *
      * @param PayOrder 订单
-     * @return {@code true} 更新成功,{@code false} 更新失败
+     * @return Result<{ @ code true } 更新成功  { @ code false } 更新失败
      */
     @PutMapping("/update")
     @Operation(summary = "根据主键更新订单")
-    public boolean update(@RequestBody PayOrder PayOrder) {
-        return PayOrderService.updateById(PayOrder);
+    public Result<Boolean> update(@RequestBody PayOrder PayOrder) {
+        return Result.OK(PayOrderService.updateById(PayOrder));
     }
 
 
     /**
      * 查询所有订单
      *
-     * @return 所有数据
+     * @return Result<所有数据
      */
     @GetMapping("/list")
     @Operation(summary = "查询所有订单")
-    public List<PayOrder> list() {
+    public Result<List<PayOrder>> list() {
         QueryWrapper queryWrapper = new QueryWrapper().eq(String.valueOf(PayOrderTableDef.PAY_ORDER.AGENT_ID), SecurityUtil.getCurrentUser().getUserid());
-        return PayOrderService.list(queryWrapper);
+        return Result.OK(PayOrderService.list(queryWrapper));
     }
 
 
@@ -90,32 +94,27 @@ public class PayOrderController {
      * 根据订单主键获取详细信息。
      *
      * @param id PayOrder主键
-     * @return 订单详情
+     * @return Result<订单详情
      */
     @GetMapping("/getInfo/{id}")
     @Operation(summary = "根据订单主键获取详细信息")
     @Parameters(value = {
             @Parameter(name = "id", description = "id", required = true)
     })
-    public PayOrder getInfo(@PathVariable Serializable id) {
-        return PayOrderService.getById(id);
+    public Result<PayOrder> getInfo(@PathVariable Serializable id) {
+        return Result.OK(PayOrderService.getById(id));
     }
 
 
     /**
      * 分页查询订单
      *
-     * @param page 分页对象
-     * @return 分页对象
+     * @param query 分页对象
+     * @return Result<分页对象
      */
     @GetMapping("/page")
     @Operation(summary = "分页查询订单")
-    @Parameters(value = {
-            @Parameter(name = "pageNumber", description = "页码", required = true),
-            @Parameter(name = "pageSize", description = "每页大小", required = true)
-    })
-    public Page<PayOrder> page(Page<PayOrder> page) {
-        QueryWrapper queryWrapper = new QueryWrapper().eq(String.valueOf(PayOrderTableDef.PAY_ORDER.AGENT_ID), SecurityUtil.getCurrentUser().getUserid());
-        return PayOrderService.page(page, queryWrapper);
+    public Result<BasePage<PayOrderVO>> page(@ParameterObject PayOrderQuery query) {
+        return Result.OK(PayOrderService.queryPage(query));
     }
 }

+ 28 - 0
web/agent-api/src/main/java/pay/platform/api/system/model/query/PayAgentQuery.java

@@ -0,0 +1,28 @@
+package pay.platform.api.system.model.query;
+
+import io.swagger.v3.oas.annotations.Parameter;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+import pay.platform.core.common.domain.BasePageQuery;
+
+/**
+ *
+ **/
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString
+public class PayAgentQuery extends BasePageQuery {
+
+    /**
+     * 用户名
+     */
+    @Parameter(description = "用户名")
+    private String userName;
+
+    /**
+     * 状态
+     */
+    @Parameter(description = "状态 ")
+    private Integer status;
+}

+ 51 - 0
web/agent-api/src/main/java/pay/platform/api/system/model/query/PayChannelQuery.java

@@ -0,0 +1,51 @@
+package pay.platform.api.system.model.query;
+
+import com.mybatisflex.annotation.Column;
+import com.mybatisflex.annotation.Table;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import pay.platform.core.common.domain.BasePageQuery;
+
+/**
+ * 通道管理 实体类。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "通道管理")
+@Table(value = "t_pay_channel")
+public class PayChannelQuery extends BasePageQuery {
+
+
+    /**
+     * 名称
+     */
+    @Schema(description = "名称")
+    @Column(value = "name")
+    private String name;
+
+    /**
+     * 编码
+     */
+    @Schema(description = "编码")
+    @Column(value = "code")
+    private String code;
+
+    @Schema(description = "代理商id")
+    @Column(value = "agent_id")
+    private String agentId;
+
+    /**
+     * 状态
+     */
+    @Schema(description = "状态 ")
+    private Integer status;
+
+}

+ 40 - 0
web/agent-api/src/main/java/pay/platform/api/system/model/query/PayMerchantQuery.java

@@ -0,0 +1,40 @@
+package pay.platform.api.system.model.query;
+
+import com.mybatisflex.annotation.Table;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import pay.platform.core.common.domain.BasePageQuery;
+
+/**
+ * 商户管理 实体类。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "商户管理")
+@Table(value = "t_pay_merchant")
+public class PayMerchantQuery extends BasePageQuery {
+
+    /**
+     * 用户名
+     */
+    @Schema(description = "用户名")
+    private String userName;
+    @Schema(description = "代理 id ")
+    private String agentId;
+
+
+    /**
+     * 状态
+     */
+    @Schema(description = "状态 ")
+    private Integer status;
+
+}

+ 106 - 0
web/agent-api/src/main/java/pay/platform/api/system/model/query/PayOrderQuery.java

@@ -0,0 +1,106 @@
+package pay.platform.api.system.model.query;
+
+import com.mybatisflex.annotation.Table;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import pay.platform.core.common.domain.BasePageQuery;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ * 通道管理 实体类。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "通道管理")
+@Table(value = "t_pay_order")
+public class PayOrderQuery extends BasePageQuery {
+
+    /**
+     * id
+     */
+    @Schema(description = "id")
+    private Long id;
+
+    /**
+     * 订单号
+     */
+    @Schema(description = "订单号")
+    private String orderNo;
+
+    /**
+     * 平台订单号
+     */
+    @Schema(description = "平台订单号")
+    private String platformOrderNo;
+
+    /**
+     * 代理用户ID
+     */
+    @Schema(description = "代理用户ID")
+    private String agentId;
+
+    /**
+     * 商户用户ID
+     */
+    @Schema(description = "商户用户ID")
+    private String merchantId;
+
+    /**
+     * 金额
+     */
+    @Schema(description = "金额")
+    private BigDecimal amount;
+
+    /**
+     * 手续费
+     */
+    @Schema(description = "手续费")
+    private BigDecimal fee;
+
+    /**
+     * 费率
+     */
+    @Schema(description = "费率")
+    private BigDecimal rate;
+
+    /**
+     * -1:支付失败 0:待支付 1:支付成功 2:退款
+     */
+    @Schema(description = "-1:支付失败 0:待支付 1:支付成功 2:退款")
+    private Integer status;
+
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
+}

+ 79 - 0
web/agent-api/src/main/java/pay/platform/api/system/model/query/PayPlatformSettingQuery.java

@@ -0,0 +1,79 @@
+package pay.platform.api.system.model.query;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import pay.platform.core.common.domain.BasePageQuery;
+
+import java.time.LocalDateTime;
+
+/**
+ * 平台配置 实体类。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "平台配置")
+public class PayPlatformSettingQuery extends BasePageQuery {
+
+    /**
+     * id
+     */
+    @Schema(description = "id")
+    private Long id;
+
+    /**
+     * 服务商ID
+     */
+    @Schema(description = "服务商ID")
+    private Long pId;
+
+    /**
+     * 密钥
+     */
+    @Schema(description = "密钥")
+    private String privateKey;
+
+    /**
+     * 公钥
+     */
+    @Schema(description = "公钥")
+    private String publicKey;
+
+    /**
+     * 状态
+     */
+    @Schema(description = "状态 ")
+    private Integer status;
+
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
+}

+ 26 - 5
web/agent-api/src/main/java/pay/platform/api/system/model/vo/PayAgentVO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
 
 /**
  * 代理系统 实体类。
@@ -30,11 +31,6 @@ public class PayAgentVO {
     @Schema(description = "用户名")
     private String userName;
 
-    /**
-     * 密码
-     */
-    @Schema(description = "密码")
-    private String password;
 
     /**
      * 余额
@@ -66,4 +62,29 @@ public class PayAgentVO {
     @Schema(description = "状态 ")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
+
 }

+ 25 - 0
web/agent-api/src/main/java/pay/platform/api/system/model/vo/PayAggregationVO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
 
 /**
  * 聚合支付 实体类。
@@ -83,4 +84,28 @@ public class PayAggregationVO {
     @Schema(description = "状态 ")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
 }

+ 26 - 0
web/agent-api/src/main/java/pay/platform/api/system/model/vo/PayChannelVO.java

@@ -7,6 +7,8 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.time.LocalDateTime;
+
 /**
  * 通道管理 实体类。
  *
@@ -45,4 +47,28 @@ public class PayChannelVO {
     @Schema(description = "状态 ")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
 }

+ 25 - 5
web/agent-api/src/main/java/pay/platform/api/system/model/vo/PayMerchantVO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
 
 /**
  * 商户管理 实体类。
@@ -35,11 +36,6 @@ public class PayMerchantVO {
     @Schema(description = "用户名")
     private String userName;
 
-    /**
-     * 密码
-     */
-    @Schema(description = "密码")
-    private String password;
 
     /**
      * 余额
@@ -71,4 +67,28 @@ public class PayMerchantVO {
     @Schema(description = "状态 ")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
 }

+ 25 - 0
web/agent-api/src/main/java/pay/platform/api/system/model/vo/PayOrderVO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
 
 /**
  * 通道管理 实体类。
@@ -77,4 +78,28 @@ public class PayOrderVO {
     @Schema(description = "-1:支付失败 0:待支付 1:支付成功 2:退款")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
 }

+ 26 - 0
web/agent-api/src/main/java/pay/platform/api/system/model/vo/PayPlatformSettingVO.java

@@ -7,6 +7,8 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.time.LocalDateTime;
+
 /**
  * 平台配置 实体类。
  *
@@ -51,4 +53,28 @@ public class PayPlatformSettingVO {
     @Schema(description = "状态 ")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
 }

+ 2 - 2
web/admin-api/src/main/java/pay/platform/api/system/servcie/PayMerchantStoreService.java → web/agent-api/src/main/java/pay/platform/api/system/servcie/PayAggregationStoreService.java

@@ -2,7 +2,7 @@ package pay.platform.api.system.servcie;
 
 
 import com.mybatisflex.core.service.IService;
-import pay.platform.domain.PayMerchantStore;
+import pay.platform.domain.PayAggregationStore;
 
 /**
  * 商户关联支付宝店铺 服务层。
@@ -10,6 +10,6 @@ import pay.platform.domain.PayMerchantStore;
  * @author mybatis-flex-helper automatic generation
  * @since 1.0
  */
-public interface PayMerchantStoreService extends IService<PayMerchantStore> {
+public interface PayAggregationStoreService extends IService<PayAggregationStore> {
 
 }

+ 20 - 0
web/agent-api/src/main/java/pay/platform/api/system/servcie/PayChannelService.java

@@ -0,0 +1,20 @@
+package pay.platform.api.system.servcie;
+
+
+import com.mybatisflex.core.service.IService;
+import pay.platform.api.system.model.query.PayChannelQuery;
+import pay.platform.api.system.model.vo.PayChannelVO;
+import pay.platform.core.common.domain.BasePage;
+import pay.platform.domain.PayChannel;
+
+/**
+ * 通道管理 服务层。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+public interface PayChannelService extends IService<PayChannel> {
+    boolean savePayChannel(PayChannel payChannel);
+
+    BasePage<PayChannelVO> queryPage(PayChannelQuery query);
+}

+ 5 - 0
web/agent-api/src/main/java/pay/platform/api/system/servcie/PayMerchantService.java

@@ -2,6 +2,9 @@ package pay.platform.api.system.servcie;
 
 
 import com.mybatisflex.core.service.IService;
+import pay.platform.api.system.model.query.PayMerchantQuery;
+import pay.platform.api.system.model.vo.PayMerchantVO;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.domain.PayMerchant;
 
 /**
@@ -12,4 +15,6 @@ import pay.platform.domain.PayMerchant;
  */
 public interface PayMerchantService extends IService<PayMerchant> {
     boolean saveMerchant(PayMerchant payMerchant);
+
+    BasePage<PayMerchantVO> queryPage(PayMerchantQuery query);
 }

+ 4 - 1
web/agent-api/src/main/java/pay/platform/api/system/servcie/PayOrderService.java

@@ -2,6 +2,9 @@ package pay.platform.api.system.servcie;
 
 
 import com.mybatisflex.core.service.IService;
+import pay.platform.api.system.model.query.PayOrderQuery;
+import pay.platform.api.system.model.vo.PayOrderVO;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.domain.PayOrder;
 
 /**
@@ -11,5 +14,5 @@ import pay.platform.domain.PayOrder;
  * @since 1.0
  */
 public interface PayOrderService extends IService<PayOrder> {
-
+    BasePage<PayOrderVO> queryPage(PayOrderQuery query);
 }

+ 19 - 0
web/agent-api/src/main/java/pay/platform/api/system/servcie/impl/PayAggregationStoreServiceImpl.java

@@ -0,0 +1,19 @@
+package pay.platform.api.system.servcie.impl;
+
+
+import com.mybatisflex.spring.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import pay.platform.api.system.servcie.PayAggregationStoreService;
+import pay.platform.domain.PayAggregationStore;
+import pay.platform.mapper.PayAggregationStoreMapper;
+
+/**
+ * 商户关联支付宝店铺 服务层实现。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Service
+public class PayAggregationStoreServiceImpl extends ServiceImpl<PayAggregationStoreMapper, PayAggregationStore> implements PayAggregationStoreService {
+
+}

+ 67 - 0
web/agent-api/src/main/java/pay/platform/api/system/servcie/impl/PayChannelServiceImpl.java

@@ -0,0 +1,67 @@
+package pay.platform.api.system.servcie.impl;
+
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.RandomUtil;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
+import com.mybatisflex.core.util.StringUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import pay.platform.api.system.model.query.PayChannelQuery;
+import pay.platform.api.system.model.vo.PayChannelVO;
+import pay.platform.api.system.servcie.PayAggregationStoreService;
+import pay.platform.api.system.servcie.PayChannelService;
+import pay.platform.core.common.domain.BasePage;
+import pay.platform.core.common.domain.BaseService;
+import pay.platform.core.security.util.SecurityUtil;
+import pay.platform.domain.PayAggregationStore;
+import pay.platform.domain.PayChannel;
+import pay.platform.domain.table.PayChannelTableDef;
+import pay.platform.mapper.PayChannelMapper;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 通道管理 服务层实现。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Service
+public class PayChannelServiceImpl extends BaseService<PayChannelMapper, PayChannel> implements PayChannelService {
+
+    @Autowired
+    private PayAggregationStoreService payAggregationStoreService;
+
+    @Override
+    @Transactional
+    public boolean savePayChannel(PayChannel payChannel) {
+        payChannel.setAgentId(SecurityUtil.getCurrentUser().getUserid());
+        save(payChannel);
+        List<PayAggregationStore> storeList = new ArrayList<>();
+        for (int i = 0; i < 7; i++) {
+            PayAggregationStore PayAggregationStore = new PayAggregationStore();
+            PayAggregationStore.setChannelId(payChannel.getId());
+            PayAggregationStore.setStoreId(RandomUtil.randomNumbers(13));
+            PayAggregationStore.setOperatorId(RandomUtil.randomNumbers(6));
+            storeList.add(PayAggregationStore);
+
+        }
+        payAggregationStoreService.saveBatch(storeList);
+        return false;
+    }
+
+    @Override
+    public BasePage<PayChannelVO> queryPage(PayChannelQuery query) {
+        QueryWrapper queryWrapper = QueryWrapper.create().from(PayChannelTableDef.PAY_CHANNEL).where("1 = 1")
+                .and(PayChannelTableDef.PAY_CHANNEL.NAME.like(query.getName(), StringUtil.isNotBlank(query.getName())))
+                .and(PayChannelTableDef.PAY_CHANNEL.STATUS.eq(query.getStatus(), query.getStatus() != null))
+                .and(PayChannelTableDef.PAY_CHANNEL.AGENT_ID.eq(SecurityUtil.getCurrentUser().getUserid(), StringUtil.isNotBlank(SecurityUtil.getCurrentUser().getUserid())));
+        Page<PayChannel> page = mapper.paginate(new Page<>(query.getCurrent(), query.getSize()), queryWrapper);
+        List<PayChannelVO> vos = BeanUtil.copyToList(page.getRecords(), PayChannelVO.class);
+        return new BasePage<>(page.getPageNumber(), page.getPageSize(), page.getTotalRow(), vos);
+    }
+}

+ 24 - 17
web/agent-api/src/main/java/pay/platform/api/system/servcie/impl/PayMerchantServiceImpl.java

@@ -1,24 +1,31 @@
 package pay.platform.api.system.servcie.impl;
 
 
+import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.RandomUtil;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
+import com.mybatisflex.core.util.StringUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import pay.platform.api.system.model.query.PayMerchantQuery;
+import pay.platform.api.system.model.vo.PayMerchantVO;
 import pay.platform.api.system.servcie.PayMerchantAppKeyService;
 import pay.platform.api.system.servcie.PayMerchantService;
-import pay.platform.api.system.servcie.PayMerchantStoreService;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.core.common.domain.BaseService;
 import pay.platform.core.security.util.SecurityUtil;
 import pay.platform.core.util.PasswordUtil;
 import pay.platform.domain.PayMerchant;
 import pay.platform.domain.PayMerchantAppKey;
-import pay.platform.domain.PayMerchantStore;
+import pay.platform.domain.table.PayChannelTableDef;
 import pay.platform.mapper.PayMerchantMapper;
 
-import java.util.ArrayList;
 import java.util.List;
 
+import static pay.platform.domain.table.PayMerchantTableDef.PAY_MERCHANT;
+
 /**
  * 商户管理 服务层实现。
  *
@@ -27,8 +34,7 @@ import java.util.List;
  */
 @Service
 public class PayMerchantServiceImpl extends BaseService<PayMerchantMapper, PayMerchant> implements PayMerchantService {
-    @Autowired
-    private PayMerchantStoreService payMerchantStoreService;
+
     @Autowired
     private PayMerchantAppKeyService payMerchantAppKeyService;
 
@@ -38,22 +44,23 @@ public class PayMerchantServiceImpl extends BaseService<PayMerchantMapper, PayMe
         payMerchant.setPassword(PasswordUtil.encoder(payMerchant.getPassword()));
         payMerchant.setAgentId(SecurityUtil.getCurrentUser().getUserid());
         save(payMerchant);
-        List<PayMerchantStore> storeList = new ArrayList<>();
-        for (int i = 0; i < 10; i++) {
-            PayMerchantStore payMerchantStore = new PayMerchantStore();
-            payMerchantStore.setAgentId(SecurityUtil.getCurrentUser().getUserid());
-            payMerchantStore.setMerchantId(payMerchant.getId());
-            payMerchantStore.setStoreId(RandomUtil.randomNumbers(13));
-            payMerchantStore.setOperatorId(RandomUtil.randomNumbers(6));
-            storeList.add(payMerchantStore);
-
-        }
-        payMerchantStoreService.saveBatch(storeList);
-
         PayMerchantAppKey payMerchantAppKey = PayMerchantAppKey.builder().appId(RandomUtil.randomString(18)).appSecret(RandomUtil.randomString(32))
                 .appKey(RandomUtil.randomString(12)).agentId(SecurityUtil.getCurrentUser().getUserid())
                 .merchantId(payMerchant.getId()).build();
         payMerchantAppKeyService.save(payMerchantAppKey);
         return true;
     }
+
+
+    @Override
+    public BasePage<PayMerchantVO> queryPage(PayMerchantQuery query) {
+        QueryWrapper queryWrapper = QueryWrapper.create().from(PAY_MERCHANT).where("1 = 1")
+                .and(PAY_MERCHANT.USER_NAME.like(query.getUserName(), StringUtil.isNotBlank(query.getUserName())))
+                .and(PayChannelTableDef.PAY_CHANNEL.AGENT_ID.eq(SecurityUtil.getCurrentUser().getUserid(), StringUtil.isNotBlank(SecurityUtil.getCurrentUser().getUserid()))
+
+                        .and(PAY_MERCHANT.STATUS.eq(query.getStatus(), query.getStatus() != null)));
+        Page<PayMerchant> page = mapper.paginate(new Page<>(query.getCurrent(), query.getSize()), queryWrapper);
+        List<PayMerchantVO> vos = BeanUtil.copyToList(page.getRecords(), PayMerchantVO.class);
+        return new BasePage<>(page.getPageNumber(), page.getPageSize(), page.getTotalRow(), vos);
+    }
 }

+ 0 - 19
web/agent-api/src/main/java/pay/platform/api/system/servcie/impl/PayMerchantStoreServiceImpl.java

@@ -1,19 +0,0 @@
-package pay.platform.api.system.servcie.impl;
-
-
-import com.mybatisflex.spring.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-import pay.platform.api.system.servcie.PayMerchantStoreService;
-import pay.platform.domain.PayMerchantStore;
-import pay.platform.mapper.PayMerchantStoreMapper;
-
-/**
- * 商户关联支付宝店铺 服务层实现。
- *
- * @author mybatis-flex-helper automatic generation
- * @since 1.0
- */
-@Service
-public class PayMerchantStoreServiceImpl extends ServiceImpl<PayMerchantStoreMapper, PayMerchantStore> implements PayMerchantStoreService {
-
-}

+ 23 - 0
web/agent-api/src/main/java/pay/platform/api/system/servcie/impl/PayOrderServiceImpl.java

@@ -1,12 +1,23 @@
 package pay.platform.api.system.servcie.impl;
 
 
+import cn.hutool.core.bean.BeanUtil;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
+import com.mybatisflex.core.util.StringUtil;
 import org.springframework.stereotype.Service;
+import pay.platform.api.system.model.query.PayOrderQuery;
+import pay.platform.api.system.model.vo.PayOrderVO;
 import pay.platform.api.system.servcie.PayOrderService;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.core.common.domain.BaseService;
+import pay.platform.core.security.util.SecurityUtil;
 import pay.platform.domain.PayOrder;
+import pay.platform.domain.table.PayOrderTableDef;
 import pay.platform.mapper.PayOrderMapper;
 
+import java.util.List;
+
 /**
  * 通道管理 服务层实现。
  *
@@ -16,4 +27,16 @@ import pay.platform.mapper.PayOrderMapper;
 @Service
 public class PayOrderServiceImpl extends BaseService<PayOrderMapper, PayOrder> implements PayOrderService {
 
+    @Override
+    public BasePage<PayOrderVO> queryPage(PayOrderQuery query) {
+        QueryWrapper queryWrapper = QueryWrapper.create().from(PayOrderTableDef.PAY_ORDER).where("1 = 1")
+                .and(PayOrderTableDef.PAY_ORDER.ORDER_NO.like(query.getOrderNo(), StringUtil.isNotBlank(query.getOrderNo())))
+                .and(PayOrderTableDef.PAY_ORDER.PLATFORM_ORDER_NO.like(query.getPlatformOrderNo(), StringUtil.isNotBlank(query.getPlatformOrderNo())))
+                .and(PayOrderTableDef.PAY_ORDER.MERCHANT_ID.eq(query.getMerchantId(), query.getMerchantId() != null)
+                        .and(PayOrderTableDef.PAY_ORDER.AGENT_ID.eq(SecurityUtil.getCurrentUser().getUserid(), StringUtil.isNotBlank(SecurityUtil.getCurrentUser().getUserid()))
+                                .and(PayOrderTableDef.PAY_ORDER.STATUS.eq(query.getStatus(), query.getStatus() != null))));
+        Page<PayOrder> page = mapper.paginate(new Page<>(query.getCurrent(), query.getSize()), queryWrapper);
+        List<PayOrderVO> vos = BeanUtil.copyToList(page.getRecords(), PayOrderVO.class);
+        return new BasePage<>(page.getPageNumber(), page.getPageSize(), page.getTotalRow(), vos);
+    }
 }

+ 2 - 2
web/agent-api/src/main/resources/application.yml

@@ -16,13 +16,13 @@ spring:
     type: com.zaxxer.hikari.HikariDataSource
     url: jdbc:mysql://${IP:43.155.3.249}:3306/pay-platform?characterEncoding=UTF-8&useSSL=false&useUnicode=true&serverTimezone=GMT%2b8&allowPublicKeyRetrieval=true
     username: root
-    password: ${PWD:open@2023}
+    password: ${PASSWORD:open@2023}
   data:
     redis:
       host: ${IP:43.155.3.249}
       port: 6379
       database: 0
-      password: ${PWD:open@2023}
+      password: ${PASSWORD:open@2023}
   threads:
     virtual:
       enabled: true

+ 1 - 1
web/agent-api/src/main/resources/logback-spring.xml

@@ -6,7 +6,7 @@
     <!--默认配置-->
     <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
     <!--定义日志文件的存储地址 -->
-    <property name="LOG_HOME" value="${logfileTarget:-/var/log}"/>
+    <property name="LOG_HOME" value="${logfileTarget:-log}"/>
     <!--日志输出格式 -->
     <property name="FILE_LOG_PATTERN"
               value="%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} - [%t] %logger{150} #%M L%L %n%m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}%n"/>

+ 25 - 26
web/merchant-api/src/main/java/pay/platform/api/system/controller/PayOrderController.java

@@ -1,14 +1,18 @@
 package pay.platform.api.system.controller;
 
-import com.mybatisflex.core.paginate.Page;
 import com.mybatisflex.core.query.QueryWrapper;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.Parameters;
 import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springdoc.core.annotations.ParameterObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import pay.platform.api.system.model.query.PayOrderQuery;
+import pay.platform.api.system.model.vo.PayOrderVO;
 import pay.platform.api.system.servcie.PayOrderService;
+import pay.platform.core.common.Result;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.core.security.util.SecurityUtil;
 import pay.platform.domain.PayOrder;
 import pay.platform.domain.table.PayOrderTableDef;
@@ -34,13 +38,13 @@ public class PayOrderController {
      * 添加 订单
      *
      * @param PayOrder 订单
-     * @return {@code true} 添加成功,{@code false} 添加失败
+     * @return Result.OK({ @ code true } 添加成功  { @ code false } 添加失败
      */
     @PostMapping("/save")
     @Operation(summary = "添加订单")
-    public boolean save(@RequestBody PayOrder PayOrder) {
+    public Result<Boolean> save(@RequestBody PayOrder PayOrder) {
         PayOrder.setMerchantId(SecurityUtil.getCurrentUser().getUserid());
-        return PayOrderService.save(PayOrder);
+        return Result.OK(PayOrderService.save(PayOrder));
     }
 
 
@@ -48,15 +52,15 @@ public class PayOrderController {
      * 根据主键删除订单
      *
      * @param id 主键
-     * @return {@code true} 删除成功,{@code false} 删除失败
+     * @return Result.OK({ @ code true } 删除成功  { @ code false } 删除失败
      */
     @DeleteMapping("/remove/{id}")
     @Operation(summary = "根据主键删除订单")
     @Parameters(value = {
             @Parameter(name = "id", description = "id", required = true)
     })
-    public boolean remove(@PathVariable Serializable id) {
-        return PayOrderService.removeById(id);
+    public Result<Boolean> remove(@PathVariable Serializable id) {
+        return Result.OK(PayOrderService.removeById(id));
     }
 
 
@@ -64,26 +68,26 @@ public class PayOrderController {
      * 根据主键更新订单
      *
      * @param PayOrder 订单
-     * @return {@code true} 更新成功,{@code false} 更新失败
+     * @return Result.OK({ @ code true } 更新成功  { @ code false } 更新失败
      */
     @PutMapping("/update")
     @Operation(summary = "根据主键更新订单")
-    public boolean update(@RequestBody PayOrder PayOrder) {
-        return PayOrderService.updateById(PayOrder);
+    public Result<Boolean> update(@RequestBody PayOrder PayOrder) {
+        return Result.OK(PayOrderService.updateById(PayOrder));
     }
 
 
     /**
      * 查询所有订单
      *
-     * @return 所有数据
+     * @return Result.OK(所有数据
      */
     @GetMapping("/list")
     @Operation(summary = "查询所有订单")
-    public List<PayOrder> list() {
-        QueryWrapper queryWrapper = new QueryWrapper().eq(String.valueOf(PayOrderTableDef.PAY_ORDER.AGENT_ID), SecurityUtil.getCurrentUser().getUserid());
+    public Result<List<PayOrder>> list() {
+        QueryWrapper queryWrapper = new QueryWrapper().eq(String.valueOf(PayOrderTableDef.PAY_ORDER.MERCHANT_ID), SecurityUtil.getCurrentUser().getUserid());
 
-        return PayOrderService.list(queryWrapper);
+        return Result.OK(PayOrderService.list(queryWrapper));
     }
 
 
@@ -91,32 +95,27 @@ public class PayOrderController {
      * 根据订单主键获取详细信息。
      *
      * @param id PayOrder主键
-     * @return 订单详情
+     * @return Result.OK(订单详情
      */
     @GetMapping("/getInfo/{id}")
     @Operation(summary = "根据订单主键获取详细信息")
     @Parameters(value = {
             @Parameter(name = "id", description = "id", required = true)
     })
-    public PayOrder getInfo(@PathVariable Serializable id) {
-        return PayOrderService.getById(id);
+    public Result<PayOrder> getInfo(@PathVariable Serializable id) {
+        return Result.OK(PayOrderService.getById(id));
     }
 
 
     /**
      * 分页查询订单
      *
-     * @param page 分页对象
-     * @return 分页对象
+     * @param query 分页对象
+     * @return Result.OK(分页对象
      */
     @GetMapping("/page")
     @Operation(summary = "分页查询订单")
-    @Parameters(value = {
-            @Parameter(name = "pageNumber", description = "页码", required = true),
-            @Parameter(name = "pageSize", description = "每页大小", required = true)
-    })
-    public Page<PayOrder> page(Page<PayOrder> page) {
-        QueryWrapper queryWrapper = new QueryWrapper().eq(String.valueOf(PayOrderTableDef.PAY_ORDER.MERCHANT_ID), SecurityUtil.getCurrentUser().getUserid());
-        return PayOrderService.page(page, queryWrapper);
+    public Result<BasePage<PayOrderVO>> page(@ParameterObject PayOrderQuery query) {
+        return Result.OK(PayOrderService.queryPage(query));
     }
 }

+ 28 - 0
web/merchant-api/src/main/java/pay/platform/api/system/model/query/PayAgentQuery.java

@@ -0,0 +1,28 @@
+package pay.platform.api.system.model.query;
+
+import io.swagger.v3.oas.annotations.Parameter;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+import pay.platform.core.common.domain.BasePageQuery;
+
+/**
+ *
+ **/
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString
+public class PayAgentQuery extends BasePageQuery {
+
+    /**
+     * 用户名
+     */
+    @Parameter(description = "用户名")
+    private String userName;
+
+    /**
+     * 状态
+     */
+    @Parameter(description = "状态 ")
+    private Integer status;
+}

+ 51 - 0
web/merchant-api/src/main/java/pay/platform/api/system/model/query/PayChannelQuery.java

@@ -0,0 +1,51 @@
+package pay.platform.api.system.model.query;
+
+import com.mybatisflex.annotation.Column;
+import com.mybatisflex.annotation.Table;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import pay.platform.core.common.domain.BasePageQuery;
+
+/**
+ * 通道管理 实体类。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "通道管理")
+@Table(value = "t_pay_channel")
+public class PayChannelQuery extends BasePageQuery {
+
+
+    /**
+     * 名称
+     */
+    @Schema(description = "名称")
+    @Column(value = "name")
+    private String name;
+
+    /**
+     * 编码
+     */
+    @Schema(description = "编码")
+    @Column(value = "code")
+    private String code;
+
+    @Schema(description = "代理商id")
+    @Column(value = "agent_id")
+    private String agentId;
+
+    /**
+     * 状态
+     */
+    @Schema(description = "状态 ")
+    private Integer status;
+
+}

+ 40 - 0
web/merchant-api/src/main/java/pay/platform/api/system/model/query/PayMerchantQuery.java

@@ -0,0 +1,40 @@
+package pay.platform.api.system.model.query;
+
+import com.mybatisflex.annotation.Table;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import pay.platform.core.common.domain.BasePageQuery;
+
+/**
+ * 商户管理 实体类。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "商户管理")
+@Table(value = "t_pay_merchant")
+public class PayMerchantQuery extends BasePageQuery {
+
+    /**
+     * 用户名
+     */
+    @Schema(description = "用户名")
+    private String userName;
+    @Schema(description = "代理 id ")
+    private String agentId;
+
+
+    /**
+     * 状态
+     */
+    @Schema(description = "状态 ")
+    private Integer status;
+
+}

+ 106 - 0
web/merchant-api/src/main/java/pay/platform/api/system/model/query/PayOrderQuery.java

@@ -0,0 +1,106 @@
+package pay.platform.api.system.model.query;
+
+import com.mybatisflex.annotation.Table;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import pay.platform.core.common.domain.BasePageQuery;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ * 通道管理 实体类。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "通道管理")
+@Table(value = "t_pay_order")
+public class PayOrderQuery extends BasePageQuery {
+
+    /**
+     * id
+     */
+    @Schema(description = "id")
+    private Long id;
+
+    /**
+     * 订单号
+     */
+    @Schema(description = "订单号")
+    private String orderNo;
+
+    /**
+     * 平台订单号
+     */
+    @Schema(description = "平台订单号")
+    private String platformOrderNo;
+
+    /**
+     * 代理用户ID
+     */
+    @Schema(description = "代理用户ID")
+    private String agentId;
+
+    /**
+     * 商户用户ID
+     */
+    @Schema(description = "商户用户ID")
+    private String merchantId;
+
+    /**
+     * 金额
+     */
+    @Schema(description = "金额")
+    private BigDecimal amount;
+
+    /**
+     * 手续费
+     */
+    @Schema(description = "手续费")
+    private BigDecimal fee;
+
+    /**
+     * 费率
+     */
+    @Schema(description = "费率")
+    private BigDecimal rate;
+
+    /**
+     * -1:支付失败 0:待支付 1:支付成功 2:退款
+     */
+    @Schema(description = "-1:支付失败 0:待支付 1:支付成功 2:退款")
+    private Integer status;
+
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
+}

+ 79 - 0
web/merchant-api/src/main/java/pay/platform/api/system/model/query/PayPlatformSettingQuery.java

@@ -0,0 +1,79 @@
+package pay.platform.api.system.model.query;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import pay.platform.core.common.domain.BasePageQuery;
+
+import java.time.LocalDateTime;
+
+/**
+ * 平台配置 实体类。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "平台配置")
+public class PayPlatformSettingQuery extends BasePageQuery {
+
+    /**
+     * id
+     */
+    @Schema(description = "id")
+    private Long id;
+
+    /**
+     * 服务商ID
+     */
+    @Schema(description = "服务商ID")
+    private Long pId;
+
+    /**
+     * 密钥
+     */
+    @Schema(description = "密钥")
+    private String privateKey;
+
+    /**
+     * 公钥
+     */
+    @Schema(description = "公钥")
+    private String publicKey;
+
+    /**
+     * 状态
+     */
+    @Schema(description = "状态 ")
+    private Integer status;
+
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
+}

+ 26 - 5
web/merchant-api/src/main/java/pay/platform/api/system/model/vo/PayAgentVO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
 
 /**
  * 代理系统 实体类。
@@ -30,11 +31,6 @@ public class PayAgentVO {
     @Schema(description = "用户名")
     private String userName;
 
-    /**
-     * 密码
-     */
-    @Schema(description = "密码")
-    private String password;
 
     /**
      * 余额
@@ -66,4 +62,29 @@ public class PayAgentVO {
     @Schema(description = "状态 ")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
+
 }

+ 25 - 0
web/merchant-api/src/main/java/pay/platform/api/system/model/vo/PayAggregationVO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
 
 /**
  * 聚合支付 实体类。
@@ -83,4 +84,28 @@ public class PayAggregationVO {
     @Schema(description = "状态 ")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
 }

+ 26 - 0
web/merchant-api/src/main/java/pay/platform/api/system/model/vo/PayChannelVO.java

@@ -7,6 +7,8 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.time.LocalDateTime;
+
 /**
  * 通道管理 实体类。
  *
@@ -45,4 +47,28 @@ public class PayChannelVO {
     @Schema(description = "状态 ")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
 }

+ 25 - 5
web/merchant-api/src/main/java/pay/platform/api/system/model/vo/PayMerchantVO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
 
 /**
  * 商户管理 实体类。
@@ -35,11 +36,6 @@ public class PayMerchantVO {
     @Schema(description = "用户名")
     private String userName;
 
-    /**
-     * 密码
-     */
-    @Schema(description = "密码")
-    private String password;
 
     /**
      * 余额
@@ -71,4 +67,28 @@ public class PayMerchantVO {
     @Schema(description = "状态 ")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
 }

+ 25 - 0
web/merchant-api/src/main/java/pay/platform/api/system/model/vo/PayOrderVO.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
 
 /**
  * 通道管理 实体类。
@@ -77,4 +78,28 @@ public class PayOrderVO {
     @Schema(description = "-1:支付失败 0:待支付 1:支付成功 2:退款")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
 }

+ 26 - 0
web/merchant-api/src/main/java/pay/platform/api/system/model/vo/PayPlatformSettingVO.java

@@ -7,6 +7,8 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.time.LocalDateTime;
+
 /**
  * 平台配置 实体类。
  *
@@ -51,4 +53,28 @@ public class PayPlatformSettingVO {
     @Schema(description = "状态 ")
     private Integer status;
 
+
+    /**
+     * 创建人
+     */
+    @Schema(description = "创建人")
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description = "创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 修改人
+     */
+    @Schema(description = "修改人")
+    private String updateUser;
+
+    /**
+     * 修改时间
+     */
+    @Schema(description = "修改时间")
+    private LocalDateTime updateTime;
 }

+ 4 - 1
web/merchant-api/src/main/java/pay/platform/api/system/servcie/PayOrderService.java

@@ -2,6 +2,9 @@ package pay.platform.api.system.servcie;
 
 
 import com.mybatisflex.core.service.IService;
+import pay.platform.api.system.model.query.PayOrderQuery;
+import pay.platform.api.system.model.vo.PayOrderVO;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.domain.PayOrder;
 
 /**
@@ -11,5 +14,5 @@ import pay.platform.domain.PayOrder;
  * @since 1.0
  */
 public interface PayOrderService extends IService<PayOrder> {
-
+    BasePage<PayOrderVO> queryPage(PayOrderQuery query);
 }

+ 22 - 1
web/merchant-api/src/main/java/pay/platform/api/system/servcie/impl/PayOrderServiceImpl.java

@@ -1,12 +1,23 @@
 package pay.platform.api.system.servcie.impl;
 
 
+import cn.hutool.core.bean.BeanUtil;
+import com.mybatisflex.core.paginate.Page;
+import com.mybatisflex.core.query.QueryWrapper;
+import com.mybatisflex.core.util.StringUtil;
 import org.springframework.stereotype.Service;
+import pay.platform.api.system.model.query.PayOrderQuery;
+import pay.platform.api.system.model.vo.PayOrderVO;
 import pay.platform.api.system.servcie.PayOrderService;
+import pay.platform.core.common.domain.BasePage;
 import pay.platform.core.common.domain.BaseService;
+import pay.platform.core.security.util.SecurityUtil;
 import pay.platform.domain.PayOrder;
+import pay.platform.domain.table.PayOrderTableDef;
 import pay.platform.mapper.PayOrderMapper;
 
+import java.util.List;
+
 /**
  * 通道管理 服务层实现。
  *
@@ -15,5 +26,15 @@ import pay.platform.mapper.PayOrderMapper;
  */
 @Service
 public class PayOrderServiceImpl extends BaseService<PayOrderMapper, PayOrder> implements PayOrderService {
-
+    @Override
+    public BasePage<PayOrderVO> queryPage(PayOrderQuery query) {
+        QueryWrapper queryWrapper = QueryWrapper.create().from(PayOrderTableDef.PAY_ORDER).where("1 = 1")
+                .and(PayOrderTableDef.PAY_ORDER.ORDER_NO.like(query.getOrderNo(), StringUtil.isNotBlank(query.getOrderNo())))
+                .and(PayOrderTableDef.PAY_ORDER.PLATFORM_ORDER_NO.like(query.getPlatformOrderNo(), StringUtil.isNotBlank(query.getPlatformOrderNo())))
+                .and(PayOrderTableDef.PAY_ORDER.MERCHANT_ID.eq(SecurityUtil.getCurrentUser().getUserid(), StringUtil.isNotBlank(SecurityUtil.getCurrentUser().getUserid()))
+                        .and(PayOrderTableDef.PAY_ORDER.STATUS.eq(query.getStatus(), query.getStatus() != null)));
+        Page<PayOrder> page = mapper.paginate(new Page<>(query.getCurrent(), query.getSize()), queryWrapper);
+        List<PayOrderVO> vos = BeanUtil.copyToList(page.getRecords(), PayOrderVO.class);
+        return new BasePage<>(page.getPageNumber(), page.getPageSize(), page.getTotalRow(), vos);
+    }
 }

+ 2 - 2
web/merchant-api/src/main/resources/application.yml

@@ -16,13 +16,13 @@ spring:
     type: com.zaxxer.hikari.HikariDataSource
     url: jdbc:mysql://${IP:43.155.3.249}:3306/pay-platform?characterEncoding=UTF-8&useSSL=false&useUnicode=true&serverTimezone=GMT%2b8&allowPublicKeyRetrieval=true
     username: root
-    password: ${PWD:open@2023}
+    password: ${PASSWORD:open@2023}
   data:
     redis:
       host: ${IP:43.155.3.249}
       port: 6379
       database: 0
-      password: ${PWD:open@2023}
+      password: ${PASSWORD:open@2023}
   threads:
     virtual:
       enabled: true

+ 1 - 1
web/merchant-api/src/main/resources/logback-spring.xml

@@ -6,7 +6,7 @@
     <!--默认配置-->
     <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
     <!--定义日志文件的存储地址 -->
-    <property name="LOG_HOME" value="${logfileTarget:-/var/log}"/>
+    <property name="LOG_HOME" value="${logfileTarget:-log}"/>
     <!--日志输出格式 -->
     <property name="FILE_LOG_PATTERN"
               value="%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} - [%t] %logger{150} #%M L%L %n%m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}%n"/>

+ 5 - 0
web/open-api/pom.xml

@@ -101,6 +101,11 @@
             <artifactId>db-agent</artifactId>
             <version>1.0.0-SNAPSHOT</version>
         </dependency>
+        <dependency>
+            <groupId>pay.platform</groupId>
+            <artifactId>pay</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
     </dependencies>
 
     <build>

+ 2 - 0
web/open-api/src/main/java/pay/platform/ApiApplication.java

@@ -3,9 +3,11 @@ package pay.platform;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
 
 @EnableAsync
 @SpringBootApplication
+@EnableWebMvc
 public class ApiApplication {
 
     public static void main(String[] args) {

+ 43 - 9
web/open-api/src/main/java/pay/platform/api/controller/PayController.java

@@ -7,9 +7,16 @@ 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 pay.platform.api.model.request.OrderRequest;
 import pay.platform.api.model.request.PayRequest;
-import pay.platform.api.servcie.PayMerchantService;
-import pay.platform.domain.PayMerchant;
+import pay.platform.api.model.response.OrderResponse;
+import pay.platform.api.model.response.PayResponse;
+import pay.platform.api.servcie.PayOrderService;
+import pay.platform.api.servcie.PayService;
+import pay.platform.core.common.Result;
+import pay.platform.core.utils.SignUtil;
+
+import java.util.TreeMap;
 
 /**
  * 接口 - 支付
@@ -21,14 +28,41 @@ import pay.platform.domain.PayMerchant;
 public class PayController {
 
     @Autowired
-    private PayMerchantService payMerchantService;
-
+    private PayService payService;
+    @Autowired
+    private PayOrderService payOrderService;
     @PostMapping("/pay/alipay")
-    public void pay(@RequestBody PayRequest payRequest) {
-        PayMerchant payMerchant = payMerchantService.getById(payRequest.getMerchantId());
-        if (payMerchant == null) {
-            throw new RuntimeException("商户号不存在");
-        }
+    public Result<PayResponse> pay(@RequestBody PayRequest payRequest) {
+        log.info("payRequest:{}", payRequest);
+        return Result.OK(payService.pay(payRequest));
+
     }
 
+
+    @PostMapping("/query/order")
+    public Result<OrderResponse> orderQuery(@RequestBody OrderRequest orderRequest) {
+        log.info("orderRequest:{}", orderRequest);
+        return Result.OK(payOrderService.queryOrder(orderRequest));
+    }
+
+    public static void main(String[] args) {
+        String str = "{\n" +
+                "\t\"orderNo\": \"1\",\n" +
+                "\t\"amount\": \"0.01\",\n" +
+                "\t\"subject\": \"购买商品\",\n" +
+                "\t\"body\": \"测试下单\",\n" +
+                "\t\"currentTime\": \"12345689\",\n" +
+                "\t\"notifyUrl\": \"http://dsfsdfsdffdsfdsfds\",\n" +
+                "\t\"appId\": \"123s1dfs54f5645456sfsfsf\"\n" +
+                "}";
+        TreeMap<String, String> treeMap = new TreeMap<>();
+        treeMap.put("orderNo", "1");
+        treeMap.put("amount", "0.01");
+        treeMap.put("subject", "购买商品");
+        treeMap.put("body", "测试下单");
+        treeMap.put("currentTime", "12345689");
+        treeMap.put("notifyUrl", "http://dsfsdfsdffdsfdsfds");
+        treeMap.put("appId", "123s1dfs54f5645456sfsfsf");
+        System.out.println(SignUtil.getSign("123s1dfs54f5645456sfsfsfasdffsd", treeMap));
+    }
 }

+ 24 - 0
web/open-api/src/main/java/pay/platform/api/model/request/OrderRequest.java

@@ -0,0 +1,24 @@
+package pay.platform.api.model.request;
+
+import jakarta.validation.constraints.NotBlank;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+
+/**
+ * 订单查询
+ */
+@Data
+public class OrderRequest implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+    @NotBlank(message = "订单号不能为空")
+    private String orderNo;
+    @NotBlank(message = "appId不能为空")
+    String appId;
+    String currentTime;
+    String sign;
+}

+ 8 - 3
web/open-api/src/main/java/pay/platform/api/model/request/PayRequest.java

@@ -5,6 +5,7 @@ import lombok.Data;
 
 import java.io.Serial;
 import java.io.Serializable;
+import java.math.BigDecimal;
 
 
 /**
@@ -19,12 +20,16 @@ public class PayRequest implements Serializable {
 
     private String orderNo;
     @NotBlank(message = "金额不能为空")
-    private String amount;
+    private BigDecimal amount;
     // 商品名称
     String subject;
     // 商品描述
     String body;
     // 金额
-    @NotBlank(message = "商户号不能为空")
-    String merchantId;
+    @NotBlank(message = "appId不能为空")
+    String appId;
+    @NotBlank(message = "回调地址不能为空")
+    String notifyUrl;
+    Long currentTime;
+    String sign;
 }

+ 42 - 0
web/open-api/src/main/java/pay/platform/api/model/response/OrderResponse.java

@@ -0,0 +1,42 @@
+package pay.platform.api.model.response;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ *
+ **/
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+public class OrderResponse implements Serializable {
+
+    /**
+     * 订单号
+     */
+    @Schema(description = "订单号")
+    private String orderNo;
+    /**
+     * 金额
+     */
+    @Schema(description = "金额")
+    private BigDecimal amount;
+
+    /**
+     * -1:支付失败 0:待支付 1:支付成功 2:退款
+     */
+    @Schema(description = "-1:支付失败 0:待支付 1:支付成功 2:退款")
+    private Integer status;
+    /**
+     * 当前时间
+     */
+    private Long currentTime;
+    private String sign;
+}

+ 20 - 0
web/open-api/src/main/java/pay/platform/api/model/response/PayResponse.java

@@ -0,0 +1,20 @@
+package pay.platform.api.model.response;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ *
+ **/
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+public class PayResponse implements Serializable {
+    private String qrCode;
+    private String imageBase64;
+}

+ 15 - 0
web/open-api/src/main/java/pay/platform/api/servcie/PayAgentService.java

@@ -0,0 +1,15 @@
+package pay.platform.api.servcie;
+
+
+import com.mybatisflex.core.service.IService;
+import pay.platform.domain.PayAgent;
+
+/**
+ * 代理系统 服务层。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+public interface PayAgentService extends IService<PayAgent> {
+
+}

+ 18 - 0
web/open-api/src/main/java/pay/platform/api/servcie/PayAggregationStoreService.java

@@ -0,0 +1,18 @@
+package pay.platform.api.servcie;
+
+
+import com.mybatisflex.core.service.IService;
+import pay.platform.domain.PayAggregationStore;
+
+import java.util.List;
+
+/**
+ * 商户关联支付宝店铺 服务层。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+public interface PayAggregationStoreService extends IService<PayAggregationStore> {
+
+    List<PayAggregationStore> findAggregationStore(String id);
+}

+ 17 - 0
web/open-api/src/main/java/pay/platform/api/servcie/PayChannelService.java

@@ -0,0 +1,17 @@
+package pay.platform.api.servcie;
+
+
+import com.mybatisflex.core.service.IService;
+import pay.platform.domain.PayChannel;
+
+import java.util.List;
+
+/**
+ * 通道管理 服务层。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+public interface PayChannelService extends IService<PayChannel> {
+    List<PayChannel> findChannel(String agentId);
+}

+ 1 - 0
web/open-api/src/main/java/pay/platform/api/servcie/PayMerchantAppKeyService.java

@@ -12,4 +12,5 @@ import pay.platform.domain.PayMerchantAppKey;
  */
 public interface PayMerchantAppKeyService extends IService<PayMerchantAppKey> {
 
+    PayMerchantAppKey getByAppId(String appId);
 }

+ 0 - 15
web/open-api/src/main/java/pay/platform/api/servcie/PayMerchantStoreService.java

@@ -1,15 +0,0 @@
-package pay.platform.api.servcie;
-
-
-import com.mybatisflex.core.service.IService;
-import pay.platform.domain.PayMerchantStore;
-
-/**
- * 商户关联支付宝店铺 服务层。
- *
- * @author mybatis-flex-helper automatic generation
- * @since 1.0
- */
-public interface PayMerchantStoreService extends IService<PayMerchantStore> {
-
-}

+ 9 - 0
web/open-api/src/main/java/pay/platform/api/servcie/PayOrderService.java

@@ -2,6 +2,8 @@ package pay.platform.api.servcie;
 
 
 import com.mybatisflex.core.service.IService;
+import pay.platform.api.model.request.OrderRequest;
+import pay.platform.api.model.response.OrderResponse;
 import pay.platform.domain.PayOrder;
 
 /**
@@ -12,4 +14,11 @@ import pay.platform.domain.PayOrder;
  */
 public interface PayOrderService extends IService<PayOrder> {
 
+    /**
+     * 订单查询
+     *
+     * @param orderRequest
+     * @return
+     */
+    OrderResponse queryOrder(OrderRequest orderRequest);
 }

+ 17 - 0
web/open-api/src/main/java/pay/platform/api/servcie/PayService.java

@@ -0,0 +1,17 @@
+package pay.platform.api.servcie;
+
+import pay.platform.api.model.request.PayRequest;
+import pay.platform.api.model.response.PayResponse;
+
+/**
+ *
+ **/
+public interface PayService {
+    /**
+     * 创建支付订单
+     *
+     * @param payRequest
+     * @return
+     */
+    PayResponse pay(PayRequest payRequest);
+}

+ 19 - 0
web/open-api/src/main/java/pay/platform/api/servcie/impl/PayAgentServiceImpl.java

@@ -0,0 +1,19 @@
+package pay.platform.api.servcie.impl;
+
+
+import org.springframework.stereotype.Service;
+import pay.platform.api.servcie.PayAgentService;
+import pay.platform.core.common.domain.BaseService;
+import pay.platform.domain.PayAgent;
+import pay.platform.mapper.PayAgentMapper;
+
+/**
+ * 代理系统 服务层实现。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Service
+public class PayAgentServiceImpl extends BaseService<PayAgentMapper, PayAgent> implements PayAgentService {
+
+}

+ 29 - 0
web/open-api/src/main/java/pay/platform/api/servcie/impl/PayAggregationStoreServiceImpl.java

@@ -0,0 +1,29 @@
+package pay.platform.api.servcie.impl;
+
+
+import com.mybatisflex.core.query.QueryWrapper;
+import com.mybatisflex.spring.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import pay.platform.api.servcie.PayAggregationStoreService;
+import pay.platform.domain.PayAggregationStore;
+import pay.platform.domain.table.PayAggregationStoreTableDef;
+import pay.platform.mapper.PayAggregationStoreMapper;
+
+import java.util.List;
+
+/**
+ * 商户关联支付宝店铺 服务层实现。
+ *
+ * @author mybatis-flex-helper automatic generation
+ * @since 1.0
+ */
+@Service
+public class PayAggregationStoreServiceImpl extends ServiceImpl<PayAggregationStoreMapper, PayAggregationStore> implements PayAggregationStoreService {
+
+    @Override
+    public List<PayAggregationStore> findAggregationStore(String channelId) {
+        QueryWrapper queryWrapper = QueryWrapper.create().from(PayAggregationStoreTableDef.PAY_AGGREGATION_STORE)
+                .where(PayAggregationStoreTableDef.PAY_AGGREGATION_STORE.CHANNEL_ID.eq(channelId));
+        return mapper.selectListByQuery(queryWrapper);
+    }
+}

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä