13 Коммиты d7ab5eff26 ... 8272c27566

Автор SHA1 Сообщение Дата
  xucaiqin 8272c27566 Merge remote-tracking branch 'origin/dev_20260630' into dev_20260630 1 день назад
  xucaiqin 2ac4f9bb10 update 1 день назад
  xucaiqin 40fa06fd28 remove 1 день назад
  xucaiqin 7b4163eef6 拓展 1 день назад
  xucaiqin 10c2e58612 fix 1 день назад
  xucaiqin ded93a6b4b fix 1 день назад
  xucaiqin e6cf941234 feat 1 день назад
  xucaiqin ef34dfb5b7 feat 2 дней назад
  xucaiqin 740c59a11b remove 2 дней назад
  xucaiqin 452bd96ba3 代理费开发 2 дней назад
  xucaiqin 85f81751dc fix 2 дней назад
  xucaiqin f254213e70 新增 2 дней назад
  xucaiqin e26aa351bb 支付 2 дней назад
86 измененных файлов с 2129 добавлено и 2625 удалено
  1. 60 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/config/MyMetaObjectHandler.java
  2. 7 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/config/MybatisPlusConfig.java
  3. 59 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/base/BaseEntity.java
  4. 4 17
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/web/context/LoginEntHolder.java
  5. 1 0
      sckw-common/sckw-common-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  6. 1 1
      sckw-modules-api/sckw-contract-api/src/main/java/com/sckw/contract/api/RemoteContractService.java
  7. 3 1
      sckw-modules-api/sckw-contract-api/src/main/java/com/sckw/contract/api/model/dto/req/TradeEntListQueryFeignDto.java
  8. 1 1
      sckw-modules-api/sckw-payment-api/src/main/java/com/sckw/payment/api/feign/PaymentFeignService.java
  9. 14 12
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/dubbo/RemoteContractServiceImpl.java
  10. 70 0
      sckw-modules/sckw-payment/deploy.sh
  11. 5 5
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/config/ApplicationProperties.java
  12. 34 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletAgentBalanceController.java
  13. 73 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletAgentController.java
  14. 45 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletAgentRecordController.java
  15. 0 17
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletController.java
  16. 1 1
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletPayableBalanceController.java
  17. 20 23
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletPayableController.java
  18. 10 13
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletPrepaidController.java
  19. 4 36
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/KwpWallet.java
  20. 4 36
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/KwpWalletCash.java
  21. 4 35
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/KwpWalletSplit.java
  22. 0 63
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletAccount.java
  23. 72 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletAgent.java
  24. 109 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletAgentBalance.java
  25. 81 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletAgentRecord.java
  26. 0 87
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletBalance.java
  27. 0 40
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletBankCallback.java
  28. 0 43
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletBankRequest.java
  29. 5 21
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletBusinessFile.java
  30. 0 92
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletEntInfo.java
  31. 0 56
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletEntUser.java
  32. 9 20
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletPayable.java
  33. 8 20
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletPayableApply.java
  34. 8 20
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletPayableBalance.java
  35. 5 20
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletPayablePay.java
  36. 9 20
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletPrepaid.java
  37. 5 20
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletPrepaidBalance.java
  38. 5 20
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletPrepaidRecord.java
  39. 0 40
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletRequestLog.java
  40. 2 2
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/enums/PayStatusEnum.java
  41. 0 81
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletAccountMapper.java
  42. 13 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletAgentBalanceMapper.java
  43. 13 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletAgentMapper.java
  44. 13 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletAgentRecordMapper.java
  45. 0 81
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletBalanceMapper.java
  46. 0 81
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletBankCallbackMapper.java
  47. 0 72
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletBankRequestMapper.java
  48. 2 1
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletBusinessFileMapper.java
  49. 0 81
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletEntInfoMapper.java
  50. 0 85
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletEntUserMapper.java
  51. 5 4
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletPayableMapper.java
  52. 0 72
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletRequestLogMapper.java
  53. 5 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/WalletVo.java
  54. 43 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/req/WalletAgentBalanceQuery.java
  55. 23 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/req/WalletAgentManualDto.java
  56. 23 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/req/WalletAgentPayDto.java
  57. 28 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/req/WalletAgentQuery.java
  58. 37 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/req/WalletAgentRecordQuery.java
  59. 1 1
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/req/WalletPrepaidQuery.java
  60. 56 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/res/WalletAgentBalanceRes.java
  61. 44 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/res/WalletAgentRecordRes.java
  62. 38 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/res/WalletAgentRes.java
  63. 15 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/res/WalletAgentSummary.java
  64. 2 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/res/WalletSummary.java
  65. 0 54
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/IWalletPrepaidService.java
  66. 0 79
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/IWalletRequestLogService.java
  67. 2 2
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/WalletService.java
  68. 16 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletAgentBalanceService.java
  69. 16 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletAgentRecordService.java
  70. 754 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletAgentService.java
  71. 3 1
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletPayableBalanceServiceImpl.java
  72. 113 37
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletPayableServiceImpl.java
  73. 2 7
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletPrepaidBalanceServiceImpl.java
  74. 40 68
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletPrepaidServiceImpl.java
  75. 0 78
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletRequestLogServiceImpl.java
  76. 0 144
      sckw-modules/sckw-payment/src/main/resources/mapper/WalletAccountMapper.xml
  77. 31 0
      sckw-modules/sckw-payment/src/main/resources/mapper/WalletAgentBalanceMapper.xml
  78. 25 0
      sckw-modules/sckw-payment/src/main/resources/mapper/WalletAgentMapper.xml
  79. 26 0
      sckw-modules/sckw-payment/src/main/resources/mapper/WalletAgentRecordMapper.xml
  80. 0 181
      sckw-modules/sckw-payment/src/main/resources/mapper/WalletBalanceMapper.xml
  81. 0 105
      sckw-modules/sckw-payment/src/main/resources/mapper/WalletBankCallbackMapper.xml
  82. 0 109
      sckw-modules/sckw-payment/src/main/resources/mapper/WalletBankRequestMapper.xml
  83. 0 175
      sckw-modules/sckw-payment/src/main/resources/mapper/WalletEntInfoMapper.xml
  84. 0 137
      sckw-modules/sckw-payment/src/main/resources/mapper/WalletEntUserMapper.xml
  85. 2 2
      sckw-modules/sckw-payment/src/main/resources/mapper/WalletPayableMapper.xml
  86. 0 105
      sckw-modules/sckw-payment/src/main/resources/mapper/WalletRequestLogMapper.xml

+ 60 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/config/MyMetaObjectHandler.java

@@ -0,0 +1,60 @@
+package com.sckw.core.config;
+
+import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
+import com.sckw.core.model.base.BaseEntity;
+import com.sckw.core.web.context.LoginUserHolder;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.ibatis.reflection.MetaObject;
+import org.springframework.stereotype.Component;
+
+import java.time.LocalDateTime;
+import java.util.Objects;
+
+/**
+ * MybatisPlus 自动填充处理器
+ * 自动填充:创建人、创建时间、更新人、更新时间
+ *
+ * @author xucaiqin
+ * @date 2026-06-16
+ */
+@Slf4j
+@Component
+public class MyMetaObjectHandler implements MetaObjectHandler {
+
+    @Override
+    public void insertFill(MetaObject metaObject) {
+        log.debug("开始插入自动填充...");
+        Long userId = getUserId();
+        LocalDateTime now = LocalDateTime.now();
+        if (Objects.nonNull(metaObject) && metaObject.getOriginalObject() instanceof BaseEntity baseEntity) {
+            if (Objects.isNull(baseEntity.getCreateBy())) {
+                baseEntity.setCreateBy(userId);
+            }
+
+            if (Objects.isNull(baseEntity.getCreateTime())) {
+                baseEntity.setCreateTime(now);
+            }
+        }
+
+    }
+
+    @Override
+    public void updateFill(MetaObject metaObject) {
+        log.debug("开始更新自动填充...");
+        Long userId = getUserId();
+        LocalDateTime now = LocalDateTime.now();
+        if (Objects.nonNull(metaObject) && metaObject.getOriginalObject() instanceof BaseEntity baseEntity) {
+            if (Objects.isNull(baseEntity.getUpdateBy())) {
+                baseEntity.setUpdateBy(userId);
+            }
+
+            if (Objects.isNull(baseEntity.getUpdateTime())) {
+                baseEntity.setUpdateTime(now);
+            }
+        }
+    }
+
+    private Long getUserId() {
+        return LoginUserHolder.getUserId();
+    }
+}

+ 7 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/config/MybatisPlusConfig.java

@@ -1,6 +1,7 @@
 package com.sckw.core.config;
 
 import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
 import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
 import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
 import org.springframework.context.annotation.Bean;
@@ -32,5 +33,11 @@ public class MybatisPlusConfig {
         mybatisPlusInterceptor.setInterceptors(Collections.singletonList(paginationInnerInterceptor()));
         return mybatisPlusInterceptor;
     }
+
+
+    @Bean
+    public MetaObjectHandler defaultMetaObjectHandler() {
+        return new MyMetaObjectHandler();
+    }
 }
 

+ 59 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/base/BaseEntity.java

@@ -0,0 +1,59 @@
+package com.sckw.core.model.base;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 基础模型
+ *
+ * @author zk
+ * @date Nov 24, 2018
+ */
+@Data
+@Accessors(chain = true)
+public class BaseEntity implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+    /**
+     * 创建人
+     */
+    @TableField(fill = FieldFill.INSERT)
+    private Long createBy;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    /**
+     * 更新人
+     */
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Long updateBy;
+
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private LocalDateTime updateTime;
+
+    /**
+     * 删除标识(0正常/-1删除)
+     */
+    @TableLogic(delval = "1", value = "0")
+    private Integer delFlag;
+
+}

+ 4 - 17
sckw-common/sckw-common-core/src/main/java/com/sckw/core/web/context/LoginEntHolder.java

@@ -1,6 +1,5 @@
 package com.sckw.core.web.context;
 
-import com.sckw.core.utils.StringUtils;
 import com.sckw.core.web.model.LoginEntInfo;
 
 /**
@@ -74,23 +73,11 @@ public class LoginEntHolder {
         return LONGIN_ENT_HOLDER.get() == null ? null : LONGIN_ENT_HOLDER.get().getStatus();
     }
 
-    /**
-     * 专场标识
-     * @author zhaokang
-     * @Date 2020/04/13 0021
-     */
-    public static String getSpecial(){
-        return LONGIN_ENT_HOLDER.get() == null ? null : LONGIN_ENT_HOLDER.get().getSpecial();
-    }
 
-    /**
-     * 是否主平台(不属于专场)
-     * @author zk
-     * @Date 2023/12/17 0021
-     */
-    public static boolean getMainPlatform(){
-        String pecial = getSpecial();
-        return StringUtils.isNotBlank(pecial);
+    public static String getEntTypes(){
+        return LONGIN_ENT_HOLDER.get() == null ? "" : LONGIN_ENT_HOLDER.get().getEntTypes();
     }
 
+
+
 }

+ 1 - 0
sckw-common/sckw-common-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

@@ -11,3 +11,4 @@ com.sckw.core.aspect.LogAspect
 com.sckw.core.utils.FileUtils
 com.sckw.core.handler.LongListTypeHandler
 com.sckw.core.handler.StringListTypeHandler
+com.sckw.core.config.MyMetaObjectHandler

+ 1 - 1
sckw-modules-api/sckw-contract-api/src/main/java/com/sckw/contract/api/RemoteContractService.java

@@ -199,5 +199,5 @@ public interface RemoteContractService {
 
     ProxyContractVo queryProxyContract(Long goodsId);
 
-    BaseResult<List<TradeEntInfoResVo>> queryPrepaidTradeEntIds(TradeEntListQueryFeignDto queryFeignDto);
+    List<TradeEntInfoResVo> queryPrepaidTradeEntIds(TradeEntListQueryFeignDto queryFeignDto);
 }

+ 3 - 1
sckw-modules-api/sckw-contract-api/src/main/java/com/sckw/contract/api/model/dto/req/TradeEntListQueryFeignDto.java

@@ -2,11 +2,13 @@ package com.sckw.contract.api.model.dto.req;
 
 import lombok.Data;
 
+import java.io.Serializable;
+
 /**
  * 交易企业列表查询参数
  */
 @Data
-public class TradeEntListQueryFeignDto {
+public class TradeEntListQueryFeignDto implements Serializable {
     /**
      * 当前企业的 id
      */

+ 1 - 1
sckw-modules-api/sckw-payment-api/src/main/java/com/sckw/payment/api/feign/PaymentFeignService.java

@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 
 import java.math.BigDecimal;
 
-@FeignClient(name = "sckw-ng-payment-new",contextId = "paymentFeignService")
+@FeignClient(name = "sckw-ng-payment",contextId = "paymentFeignService")
 public interface PaymentFeignService {
 
     @GetMapping("/walletPrepaid/queryPrepaidBalance")

+ 14 - 12
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/dubbo/RemoteContractServiceImpl.java

@@ -48,6 +48,7 @@ import org.apache.dubbo.config.annotation.DubboReference;
 import org.apache.dubbo.config.annotation.DubboService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
@@ -64,6 +65,7 @@ import java.util.stream.Collectors;
 @DubboService(group = "design", version = "1.0.0")
 @RequiredArgsConstructor
 @Slf4j
+@Service
 public class RemoteContractServiceImpl implements RemoteContractService {
 
     @Autowired
@@ -319,10 +321,10 @@ public class RemoteContractServiceImpl implements RemoteContractService {
      * 3. 筛选商品关联:在上述合同ID列表中,查找包含指定商品ID且未删除的合同商品记录。
      * 4. 构建映射:将合同商品记录以 contractId 为 key 建立映射,方便后续快速查找。
      * 5. 确定有效合同:在筛选出的合同中,查找满足以下条件的唯一最新合同:
-     *    - 状态为已签约 (SIGNED)
-     *    - 未删除
-     *    - 指定时间在合同有效期内 (startTime <= time < endTime 或 endTime 为空)
-     *    - 按创建时间倒序排列,取第一条(即最近创建的符合条件的合同)
+     * - 状态为已签约 (SIGNED)
+     * - 未删除
+     * - 指定时间在合同有效期内 (startTime <= time < endTime 或 endTime 为空)
+     * - 按创建时间倒序排列,取第一条(即最近创建的符合条件的合同)
      * 6. 返回结果:如果找到有效合同,返回对应的合同ID、商品ID和价格;否则返回 null。
      *
      * @param entId   企业ID
@@ -434,9 +436,9 @@ public class RemoteContractServiceImpl implements RemoteContractService {
      * 1. 参数校验:确保 entId 和 time 不为空。
      * 2. 查找关联合同:查询该企业(作为供应商 SUPPLIER 或采购商 PURCHASER)参与的所有未删除的贸易合同单元,获取合同ID列表。
      * 3. 筛选有效合同:在上述合同ID列表中,筛选出满足以下条件的合同:
-     *    - 未删除 (delFlag = 0)
-     *    - 状态为已签约 (status = SIGNED)
-     *    - 指定时间在合同有效期内 (startTime <= time < endTime 或 endTime 为空表示长期有效)
+     * - 未删除 (delFlag = 0)
+     * - 状态为已签约 (status = SIGNED)
+     * - 指定时间在合同有效期内 (startTime <= time < endTime 或 endTime 为空表示长期有效)
      * 4. 提取商品ID:根据筛选出的有效合同ID,查询对应的合同商品记录,提取所有未删除的商品ID并去重。
      *
      * @param entId 企业ID
@@ -1009,21 +1011,21 @@ public class RemoteContractServiceImpl implements RemoteContractService {
     }
 
     @Override
-    public BaseResult<List<TradeEntInfoResVo>> queryPrepaidTradeEntIds(TradeEntListQueryFeignDto queryFeignDto) {
-        if(queryFeignDto.getCurEntId() == null){
+    public List<TradeEntInfoResVo> queryPrepaidTradeEntIds(TradeEntListQueryFeignDto queryFeignDto) {
+        if (queryFeignDto.getCurEntId() == null) {
             queryFeignDto.setCurEntId(LoginUserHolder.getEntId());
         }
-        if(queryFeignDto.getTradeEntType() == null){
+        if (queryFeignDto.getTradeEntType() == null) {
             String entTypes = LoginEntHolder.get().getEntTypes();
             if (entTypes.contains(String.valueOf(EntTypeEnum.SUPPLIER.getCode()))) {
                 queryFeignDto.setTradeEntType(EntTypeEnum.PURCHASER.getCode());
             } else if (entTypes.contains(String.valueOf(EntTypeEnum.PURCHASER.getCode()))) {
                 queryFeignDto.setTradeEntType(EntTypeEnum.SUPPLIER.getCode());
             } else {
-                return BaseResult.success(Collections.emptyList());
+                return Collections.emptyList();
             }
         }
-        return BaseResult.success(kwcContractTradeService.queryTradeEntList(queryFeignDto));
+        return kwcContractTradeService.queryTradeEntList(queryFeignDto);
     }
 
 }

+ 70 - 0
sckw-modules/sckw-payment/deploy.sh

@@ -0,0 +1,70 @@
+#!/bin/bash
+
+set -e
+
+#echo "USER=$USER"
+#echo "HOME=$HOME"
+
+#ls -al ~/.ssh
+#cat ~/.ssh/config
+
+# ======================
+# 基础配置(每个服务改这里)
+# ======================
+REMOTE_HOST="test"
+
+DOCKER_NAME="sckw-ng-payment"
+SERVICE_NAME="sckw-payment"
+
+
+PROJECT_DIR="/mnt/d/Desk/Project/sckw-service-platform"
+DEPLOY_DIR="/www/wwwroot/sckw-ng-platform"
+JAR_NAME="${SERVICE_NAME}-1.1.0.jar"
+
+# ======================
+# 1. Maven构建
+# ======================
+echo "👉 [1/4] Maven build..."
+
+cd ${PROJECT_DIR}
+
+mvn clean package -pl sckw-modules/${SERVICE_NAME} -am -DskipTests -P test
+
+echo "✔ build success"
+
+# ======================
+# 2. 找jar包
+# ======================
+echo "👉 [2/4] locate jar..."
+
+JAR_PATH=${PROJECT_DIR}/sckw-modules/${SERVICE_NAME}/target/${JAR_NAME}
+
+echo "jar: ${JAR_PATH}"
+
+# ======================
+# 3. SCP上传
+# ======================
+echo "👉 [3/4] upload to server..."
+ls -lh ${JAR_PATH}
+
+scp ${JAR_PATH} ${REMOTE_HOST}:${DEPLOY_DIR}/${DOCKER_NAME}/
+
+# ======================
+# 4. 重启 docker compose
+# ======================
+echo "👉 [4/4] restart container..."
+
+
+ssh ${REMOTE_HOST} << EOF
+cd ${DEPLOY_DIR}
+docker compose up -d --build ${DOCKER_NAME}
+EOF
+
+echo "命令执行完毕,等待 2 秒..."
+sleep 2
+
+ssh ${REMOTE_HOST} << EOF
+docker logs --tail=40 ${DOCKER_NAME}
+EOF
+
+echo "🎉 deploy finished: ${SERVICE_NAME}"

+ 5 - 5
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/config/ApplicationProperties.java

@@ -9,12 +9,12 @@ import org.springframework.context.annotation.Configuration;
 @ConfigurationProperties(prefix = "payment.xw")
 public class ApplicationProperties {
     private String url;
+    //预付到账回调
     private String charge;
-    private String prefix;
-    private String appId;
-    private Integer platNo;
-    private String amtMaxOrder;
-    private String amtMaxDay;
+    //运费到账回调
+    private String charge2;
+    //代理费到账回调
+    private String charge3;
     private String account;
     private String split;
     private String cash;

+ 34 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletAgentBalanceController.java

@@ -0,0 +1,34 @@
+package com.sckw.payment.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.sckw.core.web.response.BaseResult;
+import com.sckw.core.web.response.result.PageDataResult;
+import com.sckw.payment.pojo.vo.req.WalletAgentBalanceQuery;
+import com.sckw.payment.pojo.vo.res.WalletAgentBalanceRes;
+import com.sckw.payment.service.impl.WalletAgentService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+
+@Tag(name = "代理账户余额")
+@RestController
+@RequestMapping("/walletAgent/balance")
+public class WalletAgentBalanceController {
+
+    @Autowired
+    private WalletAgentService walletAgentService;
+
+    @Operation(summary = "分页查询代理费余额明细列表")
+    @PostMapping("/list")
+    public BaseResult<PageDataResult<WalletAgentBalanceRes>> list(@RequestBody @Validated WalletAgentBalanceQuery query) {
+        PageInfo<WalletAgentBalanceRes> list = walletAgentService.balanceList(query);
+        return BaseResult.success(PageDataResult.of(list));
+    }
+
+}

+ 73 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletAgentController.java

@@ -0,0 +1,73 @@
+package com.sckw.payment.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.sckw.core.web.response.BaseResult;
+import com.sckw.core.web.response.result.PageDataResult;
+import com.sckw.payment.api.model.TradeEntInfoResVo;
+import com.sckw.payment.pojo.vo.req.ReceivedCallbackDto;
+import com.sckw.payment.pojo.vo.req.WalletAgentManualDto;
+import com.sckw.payment.pojo.vo.req.WalletAgentPayDto;
+import com.sckw.payment.pojo.vo.req.WalletAgentQuery;
+import com.sckw.payment.pojo.vo.res.WalletAgentRes;
+import com.sckw.payment.pojo.vo.res.WalletAgentSummary;
+import com.sckw.payment.pojo.vo.res.WalletPayAddRes;
+import com.sckw.payment.service.impl.WalletAgentService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+
+@Tag(name = "代理账户")
+@RestController
+@RequestMapping("/walletAgent")
+public class WalletAgentController {
+
+    @Autowired
+    private WalletAgentService walletAgentService;
+
+    @Operation(summary = "查询待付代理费汇总")
+    @GetMapping("/queryAgentSummary")
+    public BaseResult<WalletAgentSummary> queryAgentSummary() {
+        return BaseResult.success(walletAgentService.queryAgentSummary());
+    }
+
+    @Operation(summary = "分页查询待付代理费列表")
+    @PostMapping("/agentList")
+    public BaseResult<PageDataResult<WalletAgentRes>> agentList(@RequestBody @Validated WalletAgentQuery query) {
+        PageInfo<WalletAgentRes> list = walletAgentService.agentList(query);
+        return BaseResult.success(PageDataResult.of(list));
+    }
+
+    @Operation(summary = "查询交易对方企业列表")
+    @GetMapping("/queryTradeEntList")
+    public BaseResult<List<TradeEntInfoResVo>> queryTradeEntList() {
+        return BaseResult.success(walletAgentService.queryTradeEntList());
+    }
+
+    @Operation(summary = "发起代理费付款")
+    @PostMapping("/pay")
+    public BaseResult<WalletPayAddRes> pay(@RequestBody @Validated WalletAgentPayDto payDto) {
+        return walletAgentService.pay(payDto);
+    }
+
+    @Operation(summary = "人工录入(线下收款)")
+    @PostMapping("/manualEntry")
+    public BaseResult<Object> manualEntry(@RequestBody @Validated WalletAgentManualDto manualDto) {
+        return walletAgentService.manualEntry(manualDto);
+    }
+
+    @Operation(summary = "代理费到账回调接口")
+    @PostMapping("/receivedCallback")
+    public BaseResult<Object> receivedCallback(@RequestBody @Validated ReceivedCallbackDto receivedCallbackDto) {
+        walletAgentService.receivedCallback(receivedCallbackDto);
+        return BaseResult.success();
+    }
+}

+ 45 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletAgentRecordController.java

@@ -0,0 +1,45 @@
+package com.sckw.payment.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.sckw.core.web.response.BaseResult;
+import com.sckw.core.web.response.result.PageDataResult;
+import com.sckw.payment.pojo.vo.req.WalletAgentRecordQuery;
+import com.sckw.payment.pojo.vo.res.WalletAgentRecordRes;
+import com.sckw.payment.pojo.vo.res.WalletPayAddRes;
+import com.sckw.payment.service.impl.WalletAgentService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+@Tag(name = "代理账户支付记录")
+@RestController
+@RequestMapping("/walletAgent/record")
+public class WalletAgentRecordController {
+
+    @Autowired
+    private WalletAgentService walletAgentService;
+
+    @Operation(summary = "分页查询代理费支付记录列表")
+    @PostMapping("/list")
+    public BaseResult<PageDataResult<WalletAgentRecordRes>> list(@RequestBody @Validated WalletAgentRecordQuery query) {
+        PageInfo<WalletAgentRecordRes> list = walletAgentService.recordList(query);
+        return BaseResult.success(PageDataResult.of(list));
+    }
+
+    @Operation(summary = "查询付款信息")
+    @GetMapping("/getPayInfo")
+    public BaseResult<WalletPayAddRes> getPayInfo(@RequestParam("id") Long id) {
+        return walletAgentService.getPayInfo(id);
+    }
+
+    @Operation(summary = "查询历史支付记录信息")
+    @GetMapping("/get")
+    public BaseResult<List<WalletAgentRecordRes>> getPay(@RequestParam("agentId") Long agentId) {
+        return walletAgentService.getPayList(agentId);
+    }
+}

+ 0 - 17
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletController.java

@@ -119,23 +119,6 @@ public class WalletController {
     }
     //1、查询钱包信息
 
-    /**
-     * 企业用户钱包查询
-     *
-     * @return
-     */
-//    @GetMapping("/queryWalletInfo")
-//    public BaseResult queryWalletInfo() {
-//        Wallet wallet = walletService.selectWalletByEntId(LoginUserHolder.getEntId());
-//        if (Objects.isNull(wallet)) {
-//            return BaseResult.success("钱包账号不存在");
-//        }
-//        return BaseResult.success(wallet);
-////        BankService bankService = BankServiceUtil.getBankService(properties.getBankCode());
-////        bankService.queryWalletInfo(wallet);
-//    }
-
-
     //查询钱包可提现、预付余额及运费的汇总接口
     @Operation(summary = "查询钱包可提现、预付余额及运费的汇总接口")
     @GetMapping("/querySummary")

+ 1 - 1
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletPayableBalanceController.java

@@ -45,7 +45,7 @@ public class WalletPayableBalanceController  {
     @PostMapping("/list")
     public BaseResult<PageDataResult<WalletPayableBalanceRes>> list(@RequestBody @Validated WalletPayableBalanceQuery query) {
         PageInfo<WalletPayableBalanceRes> list = new PageInfo<>(Collections.emptyList());
-        String entTypes = LoginEntHolder.get().getEntTypes();
+        String entTypes = LoginEntHolder.getEntTypes();
         if(EntTypeEnum.consign(entTypes)){
             query.setFreightType(1);
         } else if (EntTypeEnum.carrier(entTypes)) {

+ 20 - 23
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletPayableController.java

@@ -70,7 +70,7 @@ public class WalletPayableController  {
     @PostMapping("/payableList")
     public BaseResult<PageDataResult<WalletPayableRes>> payableList(@RequestBody @Validated WalletPayableQuery query) {
         PageInfo<WalletPayableRes> list = new PageInfo<>(Collections.emptyList());
-        String entTypes = LoginEntHolder.get().getEntTypes();
+        String entTypes = LoginEntHolder.getEntTypes();
         if(EntTypeEnum.consign(entTypes)){
             query.setFreightType(1);
         } else if (EntTypeEnum.carrier(entTypes)) {
@@ -90,7 +90,7 @@ public class WalletPayableController  {
     public BaseResult<List<TradeEntInfoResVo>> queryTradeEntIds(){
         TradeEntListQueryFeignDto queryFeignDto = new TradeEntListQueryFeignDto();
         queryFeignDto.setCurEntId(LoginEntHolder.getEntId());
-        String entTypes = LoginEntHolder.get().getEntTypes();
+        String entTypes = LoginEntHolder.getEntTypes();
         if (entTypes.contains(String.valueOf(EntTypeEnum.SUPPLIER.getCode()))) {
             queryFeignDto.setTradeEntType(EntTypeEnum.PURCHASER.getCode());
         } else if (entTypes.contains(String.valueOf(EntTypeEnum.PURCHASER.getCode()))) {
@@ -98,7 +98,7 @@ public class WalletPayableController  {
         } else {
             return BaseResult.success(Collections.emptyList());
         }
-        return remoteContractService.queryPrepaidTradeEntIds(queryFeignDto);
+        return BaseResult.success(remoteContractService.queryPrepaidTradeEntIds(queryFeignDto));
     }
 
 
@@ -107,11 +107,10 @@ public class WalletPayableController  {
      *
      * @return ModelAndView
      */
-
     @Operation(summary =  "人工录入")
     @PostMapping("/manualEntry")
     public BaseResult<Object> manualEntry(@RequestBody @Validated WalletPayableManualDto payableManualDto) {
-        String entTypes = LoginEntHolder.get().getEntTypes();
+        String entTypes = LoginEntHolder.getEntTypes();
         if(!entTypes.contains(String.valueOf(EntTypeEnum.LOGISTIC.getCode()))) {
             return BaseResult.failed("当前用户非物流商,无法进行此操作");
         }
@@ -141,16 +140,27 @@ public class WalletPayableController  {
 
     /**
      * 申请付款
-     *
-     * @return ModelAndView
      */
-
-
     @Operation(summary = "申请付款")
     @PostMapping("/applyPay")
     public BaseResult<Object> applyPay(@RequestBody @Validated WalletPayableApplyPayDto applyPayDto) {
         return BaseResult.success(walletPayableService.applyPay(applyPayDto));
     }
+    /**
+     * 运费确认付款
+     */
+    @Operation(summary = "运费确认付款")
+    @PostMapping("/confirmPay")
+    public BaseResult<WalletPayAddRes> confirmPay(@RequestBody @Validated WalletPayableConfirmPayDto confirmPayDto) {
+        return  walletPayableService.confirmPay(confirmPayDto);
+    }
+
+
+    @Operation(summary = "获取付款信息")
+    @GetMapping("/getPayInfo")
+    public BaseResult<WalletPayAddRes> getPayInfo(@RequestParam("id") Long id) {
+        return walletPayableService.getPayInfo(id);
+    }
 
     /**
      * 查询申请付款记录列表
@@ -162,15 +172,7 @@ public class WalletPayableController  {
         return BaseResult.success(payableApplyRes);
     }
 
-    /**
-     * 运费确认付款
-     *
-     */
-    @Operation(summary = "运费确认付款")
-    @PostMapping("/confirmPay")
-    public BaseResult<WalletPayAddRes> confirmPay(@RequestBody @Validated WalletPayableConfirmPayDto confirmPayDto) {
-        return  walletPayableService.confirmPay(confirmPayDto);
-    }
+
 
     @Operation(description = "分页查询运费支付记录列表")
     @PostMapping("/payList")
@@ -179,11 +181,6 @@ public class WalletPayableController  {
         return BaseResult.success(PageDataResult.of(list));
     }
 
-    @Operation(summary = "付款")
-    @GetMapping("/getPayInfo")
-    public BaseResult<WalletPayAddRes> getPayInfo(@RequestParam("id") Long id) {
-        return walletPayableService.getPayInfo(id);
-    }
 
     /**
      * 运费到账回调接口

+ 10 - 13
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/WalletPrepaidController.java

@@ -36,7 +36,15 @@ public class WalletPrepaidController  {
 
     @Autowired
     private IWalletPrepaidService walletPrepaidService;
-
+    /**
+     * BI大屏预付余额:系统内所有供应商的待履约金额汇总
+     */
+    @Operation(summary = "BI大屏预付余额")
+    @GetMapping("/queryAllSupplierPrepaidSummary")
+    public BaseResult<BigDecimal> queryAllSupplierPrepaidSummary() {
+        BigDecimal summary = walletPrepaidService.selectAllSupplierPrepaidSummary();
+        return BaseResult.success(summary);
+    }
     /**
      * 查询财务报表数据
      */
@@ -146,7 +154,6 @@ public class WalletPrepaidController  {
      *
      * @return ModelAndView
      */
-
     @Operation(summary = "人工录入")
     @PostMapping("/manualEntry")
     public BaseResult<Object> manualEntry(@RequestBody @Validated WalletPrepaidManualDto performanceAddDto) {
@@ -162,8 +169,6 @@ public class WalletPrepaidController  {
      *
      * @return ModelAndView
      */
-
-
     @Operation(summary = "预付")
     @PostMapping("/prepay")
     public BaseResult<WalletPayAddRes> prepay(@RequestBody @Validated WalletPrepaidAddDto prepaidAddDto) {
@@ -194,13 +199,5 @@ public class WalletPrepaidController  {
         return BaseResult.success();
     }
 
-    /**
-     * BI大屏预付余额:系统内所有供应商的待履约金额汇总
-     */
-    @Operation(summary = "BI大屏预付余额")
-    @GetMapping("/queryAllSupplierPrepaidSummary")
-    public BaseResult<BigDecimal> queryAllSupplierPrepaidSummary() {
-        BigDecimal summary = walletPrepaidService.selectAllSupplierPrepaidSummary();
-        return BaseResult.success(summary);
-    }
+
 }

+ 4 - 36
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/KwpWallet.java

@@ -4,11 +4,12 @@ import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.sckw.core.model.base.BaseEntity;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.math.BigDecimal;
-import java.time.LocalDateTime;
 
 /**
  * 钱包表
@@ -16,10 +17,11 @@ import java.time.LocalDateTime;
  * @author xucaiqin
  * @date 2026-03-26 14:33:23
  */
+@EqualsAndHashCode(callSuper = true)
 @Schema(description = "钱包表")
 @Data
 @TableName(value = "kwp_wallet")
-public class KwpWallet {
+public class KwpWallet extends BaseEntity {
     /**
      * 主键
      */
@@ -115,38 +117,4 @@ public class KwpWallet {
     @Schema(description = "备注")
     private String remark;
 
-    /**
-     * 创建人
-     */
-    @TableField(value = "create_by")
-    @Schema(description = "创建人")
-    private Long createBy;
-
-    /**
-     * 创建时间
-     */
-    @TableField(value = "create_time")
-    @Schema(description = "创建时间")
-    private LocalDateTime createTime;
-
-    /**
-     * 更新人
-     */
-    @TableField(value = "update_by")
-    @Schema(description = "更新人")
-    private Long updateBy;
-
-    /**
-     * 更新时间
-     */
-    @TableField(value = "update_time")
-    @Schema(description = "更新时间")
-    private LocalDateTime updateTime;
-
-    /**
-     * 0-正常 1-删除
-     */
-    @TableField(value = "del_flag")
-    @Schema(description = "0-正常 1-删除")
-    private Integer delFlag;
 }

+ 4 - 36
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/KwpWalletCash.java

@@ -4,11 +4,12 @@ import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.sckw.core.model.base.BaseEntity;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.math.BigDecimal;
-import java.time.LocalDateTime;
 
 /**
  * 提现记录表
@@ -16,10 +17,11 @@ import java.time.LocalDateTime;
  * @author xucaiqin
  * @date 2026-03-26 14:32:05
  */
+@EqualsAndHashCode(callSuper = true)
 @Schema(description = "提现记录表")
 @Data
 @TableName(value = "kwp_wallet_cash")
-public class KwpWalletCash {
+public class KwpWalletCash extends BaseEntity {
     /**
      * 主键
      */
@@ -90,38 +92,4 @@ public class KwpWalletCash {
     @Schema(description = "状态")
     private Integer status;
 
-    /**
-     * 创建人
-     */
-    @TableField(value = "create_by")
-    @Schema(description = "创建人")
-    private Long createBy;
-
-    /**
-     * 创建时间
-     */
-    @TableField(value = "create_time")
-    @Schema(description = "创建时间")
-    private LocalDateTime createTime;
-
-    /**
-     * 更新人
-     */
-    @TableField(value = "update_by")
-    @Schema(description = "更新人")
-    private Long updateBy;
-
-    /**
-     * 更新时间
-     */
-    @TableField(value = "update_time")
-    @Schema(description = "更新时间")
-    private LocalDateTime updateTime;
-
-    /**
-     * 0-正常 1-删除
-     */
-    @TableField(value = "del_flag")
-    @Schema(description = "0-正常 1-删除")
-    private Integer delFlag;
 }

+ 4 - 35
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/KwpWalletSplit.java

@@ -4,11 +4,12 @@ import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.sckw.core.model.base.BaseEntity;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.math.BigDecimal;
-import java.time.LocalDateTime;
 
 /**
  * 清分表
@@ -16,10 +17,11 @@ import java.time.LocalDateTime;
  * @author xucaiqin
  * @date 2026-04-08 11:25:38
  */
+@EqualsAndHashCode(callSuper = true)
 @Data
 @Schema(description = "清分表")
 @TableName(value = "kwp_wallet_split")
-public class KwpWalletSplit {
+public class KwpWalletSplit extends BaseEntity {
     /**
      * 主键
      */
@@ -86,39 +88,6 @@ public class KwpWalletSplit {
     @Schema(description = "状态 1-已提交 2-清分成功 3-清分失败")
     private Integer status;
 
-    /**
-     * 创建人
-     */
-    @TableField(value = "create_by")
-    @Schema(description = "创建人")
-    private Long createBy;
 
-    /**
-     * 创建时间
-     */
-    @TableField(value = "create_time")
-    @Schema(description = "创建时间")
-    private LocalDateTime createTime;
-
-    /**
-     * 更新人
-     */
-    @TableField(value = "update_by")
-    @Schema(description = "更新人")
-    private Long updateBy;
-
-    /**
-     * 更新时间
-     */
-    @TableField(value = "update_time")
-    @Schema(description = "更新时间")
-    private LocalDateTime updateTime;
-
-    /**
-     * 0-正常 1-删除
-     */
-    @TableField(value = "del_flag")
-    @Schema(description = "0-正常 1-删除")
-    private Integer delFlag;
 
 }

+ 0 - 63
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletAccount.java

@@ -1,63 +0,0 @@
-package com.sckw.payment.entity;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 钱包账户表(wallet_account)
- *
- * @author tangys
- * @since  2026-01-06 10:28:02
- */
-@Data
-public class WalletAccount {
-
-	/** 主键id */
-    @Schema(description = "主键id")
-    private Long id;
-	/** 企业ID,一个企业一个钱包 */
-    @Schema(description = "企业ID,一个企业一个钱包")
-    private Long entId;
-	/** 银行侧提现钱包编号 */
-    @Schema(description = "银行侧提现钱包编号")
-    private String bWithdrawWalletNo;
-	/** 银行侧冻结钱包编号 */
-    @Schema(description = "银行侧冻结钱包编号")
-    private String bFreezeWalletNo;
-	/** 可用余额 */
-    @Schema(description = "可用余额")
-    private BigDecimal availableBalance;
-	/** 冻结余额 */
-    @Schema(description = "冻结余额")
-    private BigDecimal frozenBalance;
-	/** 版本号(用于乐观锁) */
-    @Schema(description = "版本号(用于乐观锁)")
-    private Integer version;
-	/** 钱包状态0-初始化 1-正常 2-冻结 3-注销 */
-    @Schema(description = "钱包状态0-初始化 1-正常 2-冻结 3-注销")
-    private Integer status;
-	/** 备注 */
-    @Schema(description = "备注")
-    private String remark;
-	/** 删除标记(0-未删除,1-已删除) */
-    @Schema(description = "删除标记(0-未删除,1-已删除)")
-    private Integer delFlag;
-	/** 创建人id */
-    @Schema(description = "创建人id")
-    private Long createBy;
-	/** 创建时间 */
-    @Schema(description = "创建时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-	/** 更新人id */
-    @Schema(description = "更新人id")
-    private Long updateBy;
-	/** 更新时间 */
-    @Schema(description = "更新时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
-}

+ 72 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletAgent.java

@@ -0,0 +1,72 @@
+package com.sckw.payment.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.sckw.core.model.base.BaseEntity;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+/**
+ * 代理费
+* @date 2026-06-15 10:58:32
+* @author xucaiqin
+*/
+@Schema(description="代理费")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName(value = "wallet_agent")
+public class WalletAgent extends BaseEntity {
+    /**
+     * id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    @Schema(description="id")
+    private Long id;
+
+    /**
+     * 代理商企业id
+     */
+    @TableField(value = "agt_ent_id")
+    @Schema(description="代理商企业id")
+    private Long agtEntId;
+
+    /**
+     * 供应商企业id
+     */
+    @TableField(value = "sup_ent_id")
+    @Schema(description="供应商企业id")
+    private Long supEntId;
+
+    /**
+     * 代理费金额
+     */
+    @TableField(value = "pre_balance")
+    @Schema(description="代理费金额")
+    private BigDecimal preBalance;
+
+    /**
+     * 交易中金额
+     */
+    @TableField(value = "trading_amount")
+    @Schema(description="交易中金额")
+    private BigDecimal tradingAmount;
+
+    /**
+     * 状态
+     */
+    @TableField(value = "`status`")
+    @Schema(description="状态")
+    private Integer status;
+
+    /**
+     * 备注
+     */
+    @TableField(value = "remark")
+    @Schema(description="备注")
+    private String remark;
+}

+ 109 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletAgentBalance.java

@@ -0,0 +1,109 @@
+package com.sckw.payment.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.sckw.core.model.base.BaseEntity;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+/**
+* @date 2026-06-15 11:00:08
+* @author xucaiqin
+*/
+/**
+ * 代理余额明细
+ */
+@Schema(description="代理余额明细")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName(value = "wallet_agent_balance")
+public class WalletAgentBalance extends BaseEntity {
+    /**
+     * id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    @Schema(description="id")
+    private Long id;
+
+    /**
+     * 关联订单编号
+     */
+    @TableField(value = "order_no")
+    @Schema(description="关联订单编号")
+    private String orderNo;
+
+    /**
+     * 订单类型 2-预付订单  4-贸易订单
+     */
+    @TableField(value = "order_type")
+    @Schema(description="订单类型 2-预付订单  4-贸易订单")
+    private Integer orderType;
+
+    /**
+     * 代理商企业id
+     */
+    @TableField(value = "agt_ent_id")
+    @Schema(description="代理商企业id")
+    private Long agtEntId;
+
+    /**
+     * 供应商企业id
+     */
+    @TableField(value = "sup_ent_id")
+    @Schema(description="供应商企业id")
+    private Long supEntId;
+
+    /**
+     * 交易类型 1-消费 2-申请付款 3-付款成功 4-人工录入
+     */
+    @TableField(value = "trade_type")
+    @Schema(description="交易类型 1-消费 2-申请付款 3-付款成功 4-人工录入")
+    private Integer tradeType;
+
+    /**
+     * 交易金额
+     */
+    @TableField(value = "trade_amount")
+    @Schema(description="交易金额")
+    private BigDecimal tradeAmount;
+
+    /**
+     * 预付余额
+     */
+    @TableField(value = "pre_balance")
+    @Schema(description="预付余额")
+    private BigDecimal preBalance;
+
+    /**
+     * 交易中金额
+     */
+    @TableField(value = "trading_amount")
+    @Schema(description="交易中金额")
+    private BigDecimal tradingAmount;
+
+    /**
+     * 文件
+     */
+    @TableField(value = "`file`")
+    @Schema(description="文件")
+    private String file;
+
+    /**
+     * 执行状态,1-进行中 2-成功 3-失败
+     */
+    @TableField(value = "`status`")
+    @Schema(description="执行状态,1-进行中 2-成功 3-失败")
+    private Integer status;
+
+    /**
+     * 备注
+     */
+    @TableField(value = "remark")
+    @Schema(description="备注")
+    private String remark;
+}

+ 81 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletAgentRecord.java

@@ -0,0 +1,81 @@
+package com.sckw.payment.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.sckw.core.model.base.BaseEntity;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+/**
+* @date 2026-06-15 11:00:24
+* @author xucaiqin
+*/
+/**
+ * 代理支付记录
+ */
+@Schema(description="代理支付记录")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName(value = "wallet_agent_record")
+public class WalletAgentRecord extends BaseEntity {
+    /**
+     * id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    @Schema(description="id")
+    private Long id;
+
+    /**
+     * 代理费订单id
+     */
+    @TableField(value = "agent_id")
+    @Schema(description="代理费订单id")
+    private Long agentId;
+
+    /**
+     * 关联订单编号
+     */
+    @TableField(value = "order_no")
+    @Schema(description="关联订单编号")
+    private String orderNo;
+
+    /**
+     * 预付金额
+     */
+    @TableField(value = "prepaid_amount")
+    @Schema(description="预付金额")
+    private BigDecimal prepaidAmount;
+
+    /**
+     * 到账金额
+     */
+    @TableField(value = "received_amount")
+    @Schema(description="到账金额")
+    private BigDecimal receivedAmount;
+
+    /**
+     * 支付状态 0-待支付 1-已支付
+     */
+    @TableField(value = "`status`")
+    @Schema(description="支付状态 0-待支付 1-已支付")
+    private Integer status;
+
+    /**
+     * 数据
+     */
+    @TableField(value = "data")
+    @Schema(description="数据")
+    private String data;
+
+    /**
+     * 备注
+     */
+    @TableField(value = "remark")
+    @Schema(description="备注")
+    private String remark;
+}

+ 0 - 87
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletBalance.java

@@ -1,87 +0,0 @@
-package com.sckw.payment.entity;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 钱包余额明细表(wallet_balance)
- *
- * @author tangys
- * @since  2026-01-12 16:24:22
- */
-@Data
-public class WalletBalance {
-
-	/** 明细主键 */
-    @Schema(description = "明细主键")
-    private Long id;
-	/** 关联订单编号 */
-    @Schema(description = "关联订单编号")
-    private String orderNo;
-	/** 关联订单类型 1-充值订单 2-预付订单 3-提现订单 4-贸易订单 5-物流订单 */
-    @Schema(description = "关联订单类型 1-充值订单 2-预付订单 3-提现订单 4-贸易订单 5-物流订单")
-    private Integer orderType;
-	/** 企业id */
-    @Schema(description = "企业id")
-    private Long entId;
-	/** 对方企业id */
-    @Schema(description = "对方企业id")
-    private Long tradeEntId;
-	/** 交易类型 1-充值 2-预付 3-收益 4-冻结 5-解冻 6-消费 7-提现 8-支付 */
-    @Schema(description = "交易类型 1-充值 2-预付 3-收益 4-冻结 5-解冻 6-消费 7-提现 8-支付")
-    private Integer tradeType;
-	/** 交易金额 */
-    @Schema(description = "交易金额")
-    private BigDecimal tradeAmount;
-	/** 银行交易流水号 */
-    @Schema(description = "银行交易流水号")
-    private String bankSerialNo;
-	/** 变动前可用余额 */
-    @Schema(description = "变动前可用余额")
-    private BigDecimal availableBefore;
-	/** 变动后可用余额 */
-    @Schema(description = "变动后可用余额")
-    private BigDecimal availableAfter;
-	/** 变动前冻结余额 */
-    @Schema(description = "变动前冻结余额")
-    private BigDecimal frozenBefore;
-	/** 变动后冻结余额 */
-    @Schema(description = "变动后冻结余额")
-    private BigDecimal frozenAfter;
-	/** 可用预付余额 */
-    @Schema(description = "可用预付余额")
-    private BigDecimal availablePrepaid;
-	/** 对方预付余额 */
-    @Schema(description = "对方预付余额")
-    private BigDecimal counterpartyPrepaid;
-	/** 执行状态 1-进行中 2-成功 3-失败 */
-    @Schema(description = "执行状态 1-进行中 2-成功 3-失败")
-    private Integer status;
-	/** 备注 */
-    @Schema(description = "备注")
-    private String remark;
-	/** 凭证标识 0-无凭证 1-有凭证 */
-    @Schema(description = "凭证标识 0-无凭证 1-有凭证")
-    private Integer voucherFlag;
-	/** 删除标识 0-未删除 1-已删除 */
-    @Schema(description = "删除标识 0-未删除 1-已删除")
-    private Integer delFlag;
-	/** 创建人id */
-    @Schema(description = "创建人id")
-    private Long createBy;
-	/** 创建时间 */
-    @Schema(description = "创建时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-	/** 更新人id */
-    @Schema(description = "更新人id")
-    private Long updateBy;
-	/** 更新时间 */
-    @Schema(description = "更新时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
-}

+ 0 - 40
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletBankCallback.java

@@ -1,40 +0,0 @@
-package com.sckw.payment.entity;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 银行回调日志表(wallet_bank_callback)
- *
- * @author tangys
- * @since  2026-01-06 10:28:02
- */
-@Data
-public class WalletBankCallback {
-
-	/** 主键ID */
-    @Schema(description = "主键ID")
-    private Long id;
-	/** 关联业务单号 */
-    @Schema(description = "关联业务单号")
-    private String bizNo;
-	/** 回调类型,1-充值 2-提现 */
-    @Schema(description = "回调类型,1-充值 2-提现")
-    private Integer callbackType;
-	/** 银行原始回调内容 */
-    @Schema(description = "银行原始回调内容")
-    private String rawContent;
-	/** 备注 */
-    @Schema(description = "备注")
-    private String remark;
-	/** 处理状态:0-待处理 1-已处理 */
-    @Schema(description = "处理状态:0-待处理 1-已处理")
-    private Integer status;
-	/** 创建时间 */
-    @Schema(description = "创建时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createdAt;
-}

+ 0 - 43
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletBankRequest.java

@@ -1,43 +0,0 @@
-package com.sckw.payment.entity;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 银行请求响应表(wallet_bank_request)
- *
- * @author tangys
- * @since  2026-01-06 10:28:02
- */
-@Data
-public class WalletBankRequest {
-
-	/** 主键ID */
-    @Schema(description = "主键ID")
-    private Long id;
-	/** 业务类型 */
-    @Schema(description = "业务类型")
-    private String bizType;
-	/** 关联业务单号 */
-    @Schema(description = "关联业务单号")
-    private String bizNo;
-	/** 银行请求内容 */
-    @Schema(description = "银行请求内容")
-    private String resquestContent;
-	/** 银行响应内容 */
-    @Schema(description = "银行响应内容")
-    private String responseContent;
-	/** 备注 */
-    @Schema(description = "备注")
-    private String remark;
-	/** 处理状态:0-成功 1-失败 */
-    @Schema(description = "处理状态:0-成功 1-失败")
-    private Integer status;
-	/** 创建时间 */
-    @Schema(description = "创建时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createdAt;
-}

+ 5 - 21
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletBusinessFile.java

@@ -1,10 +1,9 @@
 package com.sckw.payment.entity;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
+import com.sckw.core.model.base.BaseEntity;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
-
-import java.util.Date;
+import lombok.EqualsAndHashCode;
 
 /**
  * 钱包_业务文件(wallet_business_file)
@@ -12,8 +11,9 @@ import java.util.Date;
  * @author tangys
  * @since  2026-01-12 14:11:22
  */
+@EqualsAndHashCode(callSuper = true)
 @Data
-public class WalletBusinessFile {
+public class WalletBusinessFile extends BaseEntity {
 
 	/** 主键 */
     @Schema(description = "主键")
@@ -30,21 +30,5 @@ public class WalletBusinessFile {
 	/** 状态:0正常/1锁定 */
     @Schema(description = "状态:0正常/1锁定")
     private Integer status;
-	/** 删除标识(0正常/1删除) */
-    @Schema(description = "删除标识(0正常/1删除)")
-    private Integer delFlag;
-	/** 创建人 */
-    @Schema(description = "创建人")
-    private Long createBy;
-	/** 创建时间 */
-    @Schema(description = "创建时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-	/** 更新人 */
-    @Schema(description = "更新人")
-    private Long updateBy;
-	/** 更新时间 */
-    @Schema(description = "更新时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
+
 }

+ 0 - 92
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletEntInfo.java

@@ -1,92 +0,0 @@
-package com.sckw.payment.entity;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 开户企业信息表(wallet_ent_info)
- *
- * @author tangys
- * @since  2026-01-07 16:59:01
- */
-@Data
-public class WalletEntInfo {
-
-	/** id */
-    @Schema(description = "id")
-    private Long id;
-	/** 企业用户id(外键) */
-    @Schema(description = "企业用户id(外键)")
-    private Long entId;
-	/** 企业全称 */
-    @Schema(description = "企业全称")
-    private String fullName;
-	/** 企业注册地址 */
-    @Schema(description = "企业注册地址")
-    private String address;
-	/** 营业执照号 */
-    @Schema(description = "营业执照号")
-    private String licenseCode;
-	/** 依法经营证件起始日期 */
-    @Schema(description = "依法经营证件起始日期")
-    private String licenseStartDate;
-	/** 依法经营证件截止日期 */
-    @Schema(description = "依法经营证件截止日期")
-    private String licenseEndDate;
-	/** 企业实际经营地址 */
-    @Schema(description = "企业实际经营地址")
-    private String realAddress;
-	/** 依法经营证件正本开放平台文件id */
-    @Schema(description = "依法经营证件正本开放平台文件id")
-    private String licenseFileId;
-	/** 依法经营证件副本开放平台文件id */
-    @Schema(description = "依法经营证件副本开放平台文件id")
-    private String licenseFileDuplicateId;
-	/** 企业法人姓名 */
-    @Schema(description = "企业法人姓名")
-    private String legalName;
-	/** 企业法人证件号码 */
-    @Schema(description = "企业法人证件号码")
-    private String legalIdCardNo;
-	/** 企业法人手机号码 */
-    @Schema(description = "企业法人手机号码")
-    private String legalPhone;
-	/** 企业法人证件起始日期 */
-    @Schema(description = "企业法人证件起始日期")
-    private String legalStartDate;
-	/** 企业法人证件结束日期 */
-    @Schema(description = "企业法人证件结束日期")
-    private String legalEndDate;
-	/** 法人证件正面(人像面)开放平台文件id */
-    @Schema(description = "法人证件正面(人像面)开放平台文件id")
-    private String idCardFrontId;
-	/** 法人证件反面(国徽面)开放平台文件id */
-    @Schema(description = "法人证件反面(国徽面)开放平台文件id")
-    private String idCardBackId;
-	/** 联系人姓名 */
-    @Schema(description = "联系人姓名")
-    private String contactName;
-	/** 联系人手机号 */
-    @Schema(description = "联系人手机号")
-    private String contactPhone;
-	/** 联系人证件号码 */
-    @Schema(description = "联系人证件号码")
-    private String contactIdCardNo;
-	/** 联系人证件正面(人像面)开放平台文件id */
-    @Schema(description = "联系人证件正面(人像面)开放平台文件id")
-    private String contactIdCardFrontId;
-	/** 联系人证件反面(国徽面)开放平台文件id */
-    @Schema(description = "联系人证件反面(国徽面)开放平台文件id")
-    private String contactIdCardBackId;
-	/** 创建时间 */
-    @Schema(description = "创建时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-	/** 更新时间 */
-    @Schema(description = "更新时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
-}

+ 0 - 56
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletEntUser.java

@@ -1,56 +0,0 @@
-package com.sckw.payment.entity;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 企业股东或最终收益人(wallet_ent_user)
- *
- * @author tangys
- * @since  2026-01-07 16:59:01
- */
-@Data
-public class WalletEntUser {
-
-	/** id */
-    @Schema(description = "id")
-    private Long id;
-	/** 企业id */
-    @Schema(description = "企业id")
-    private Long entId;
-	/** 用户类型 1-股东 2-最终受益人 */
-    @Schema(description = "用户类型 1-股东 2-最终受益人")
-    private Integer type;
-	/** 姓名 */
-    @Schema(description = "姓名")
-    private String name;
-	/** 身份证号 */
-    @Schema(description = "身份证号")
-    private String idCardNo;
-	/** 身份证有效期起始日期 */
-    @Schema(description = "身份证有效期起始日期")
-    private String idCardStartDate;
-	/** 身份证有效期截止日期 */
-    @Schema(description = "身份证有效期截止日期")
-    private String idCardEndDate;
-	/** 电话 */
-    @Schema(description = "电话")
-    private String phone;
-	/** 地址 */
-    @Schema(description = "地址")
-    private String address;
-	/** 受益方式 */
-    @Schema(description = "受益方式")
-    private String incomeType;
-	/** 创建时间 */
-    @Schema(description = "创建时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-	/** 更新时间 */
-    @Schema(description = "更新时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
-}

+ 9 - 20
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletPayable.java

@@ -1,11 +1,14 @@
 package com.sckw.payment.entity;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.sckw.core.model.base.BaseEntity;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.math.BigDecimal;
-import java.util.Date;
 
 /**
  * 待付/代收运费清单(wallet_payable)
@@ -14,9 +17,12 @@ import java.util.Date;
  * @since  2026-01-06 10:28:02
  */
 @Data
-public class WalletPayable {
+@EqualsAndHashCode(callSuper = true)
+@TableName(value = "wallet_payable")
+public class WalletPayable extends BaseEntity {
 
 	/** 待付/代收运费清单主键id */
+    @TableId(value = "id", type = IdType.AUTO)
     @Schema(description = "待付/代收运费清单主键id")
     private Long id;
 	/** 托运企业id */
@@ -40,23 +46,6 @@ public class WalletPayable {
 	/** 备注 */
     @Schema(description = "备注")
     private String remark;
-	/** 删除标记 0-未删除 1-已删除 */
-    @Schema(description = "删除标记 0-未删除 1-已删除")
-    private Integer delFlag;
-	/** 创建人id */
-    @Schema(description = "创建人id")
-    private Long createBy;
-	/** 创建时间 */
-    @Schema(description = "创建时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-	/** 更新人id */
-    @Schema(description = "更新人id")
-    private Long updateBy;
-	/** 更新时间 */
-    @Schema(description = "更新时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
 
     @Schema(description = "是否存在未完成申请付款记录,1-存在,0-不存在")
     private Integer existsApply;

+ 8 - 20
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletPayableApply.java

@@ -1,11 +1,13 @@
 package com.sckw.payment.entity;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.sckw.core.model.base.BaseEntity;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.math.BigDecimal;
-import java.util.Date;
 
 /**
  * 运费付款申请记录(wallet_freight_apply)
@@ -13,11 +15,13 @@ import java.util.Date;
  * @author tangys
  * @since  2026-01-19 16:13:22
  */
+@EqualsAndHashCode(callSuper = true)
 @Data
-public class WalletPayableApply {
+public class WalletPayableApply extends BaseEntity {
 
 	/** 运费付款申请记录主键id */
     @Schema(description = "运费付款申请记录主键id")
+    @TableId(value = "id", type = IdType.AUTO)
     private Long id;
 	/** 待付/代收运费清单id */
     @Schema(description = "待付/代收运费清单id")
@@ -40,21 +44,5 @@ public class WalletPayableApply {
 	/** 备注 */
     @Schema(description = "备注")
     private String remark;
-	/** 删除标记 0-未删除 1-已删除 */
-    @Schema(description = "删除标记 0-未删除 1-已删除")
-    private Integer delFlag;
-	/** 创建人id */
-    @Schema(description = "创建人id")
-    private Long createBy;
-	/** 创建时间 */
-    @Schema(description = "创建时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-	/** 更新人id */
-    @Schema(description = "更新人id")
-    private Long updateBy;
-	/** 更新时间 */
-    @Schema(description = "更新时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
+
 }

+ 8 - 20
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletPayableBalance.java

@@ -1,11 +1,13 @@
 package com.sckw.payment.entity;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.sckw.core.model.base.BaseEntity;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.math.BigDecimal;
-import java.util.Date;
 
 /**
  * 待付/代收运费余额明细(wallet_payable_balance)
@@ -13,11 +15,13 @@ import java.util.Date;
  * @author tangys
  * @since  2026-01-12 16:24:22
  */
+@EqualsAndHashCode(callSuper = true)
 @Data
-public class WalletPayableBalance {
+public class WalletPayableBalance extends BaseEntity {
 
 	/** 待付/代收运费余额明细主键id */
     @Schema(description = "待付/代收运费余额明细主键id")
+    @TableId(value = "id", type = IdType.AUTO)
     private Long id;
 	/** 关联订单编号 */
     @Schema(description = "关联订单编号")
@@ -55,21 +59,5 @@ public class WalletPayableBalance {
 	/** 凭证标识 0-无凭证 1-有凭证 */
     @Schema(description = "凭证标识 0-无凭证 1-有凭证")
     private Integer voucherFlag;
-	/** 删除标记 0-未删除 1-已删除 */
-    @Schema(description = "删除标记 0-未删除 1-已删除")
-    private Integer delFlag;
-	/** 创建人id */
-    @Schema(description = "创建人id")
-    private Long createBy;
-	/** 创建时间 */
-    @Schema(description = "创建时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-	/** 更新人id */
-    @Schema(description = "更新人id")
-    private Long updateBy;
-	/** 更新时间 */
-    @Schema(description = "更新时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
+
 }

+ 5 - 20
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletPayablePay.java

@@ -1,11 +1,11 @@
 package com.sckw.payment.entity;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
+import com.sckw.core.model.base.BaseEntity;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.math.BigDecimal;
-import java.util.Date;
 
 /**
  * 运费支付记录(wallet_freight_record)
@@ -13,8 +13,9 @@ import java.util.Date;
  * @author tangys
  * @since  2026-01-15 09:32:47
  */
+@EqualsAndHashCode(callSuper = true)
 @Data
-public class WalletPayablePay {
+public class WalletPayablePay extends BaseEntity {
 
 	/** 运费支付记录主键id */
     @Schema(description = "运费支付记录主键id")
@@ -42,21 +43,5 @@ public class WalletPayablePay {
 	/** 备注 */
     @Schema(description = "备注")
     private String remark;
-	/** 删除标记 0-未删除 1-已删除 */
-    @Schema(description = "删除标记 0-未删除 1-已删除")
-    private Integer delFlag;
-	/** 创建人id */
-    @Schema(description = "创建人id")
-    private Long createBy;
-	/** 创建时间 */
-    @Schema(description = "创建时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-	/** 更新人id */
-    @Schema(description = "更新人id")
-    private Long updateBy;
-	/** 更新时间 */
-    @Schema(description = "更新时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
+
 }

+ 9 - 20
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletPrepaid.java

@@ -1,11 +1,14 @@
 package com.sckw.payment.entity;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.sckw.core.model.base.BaseEntity;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.math.BigDecimal;
-import java.util.Date;
 
 /**
  * 预付清单(wallet_prepaid)
@@ -14,9 +17,12 @@ import java.util.Date;
  * @since  2026-01-06 10:28:02
  */
 @Data
-public class WalletPrepaid {
+@EqualsAndHashCode(callSuper = true)
+@TableName(value = "wallet_prepaid")
+public class WalletPrepaid extends BaseEntity {
 
 	/** 预付清单主键id */
+    @TableId(value = "id", type = IdType.AUTO)
     @Schema(description = "预付清单主键id")
     private Long id;
 	/** 采购商企业id */
@@ -37,21 +43,4 @@ public class WalletPrepaid {
 	/** 备注 */
     @Schema(description = "备注")
     private String remark;
-	/** 删除标记 0-未删除 1-已删除 */
-    @Schema(description = "删除标记 0-未删除 1-已删除")
-    private Integer delFlag;
-	/** 创建人id */
-    @Schema(description = "创建人id")
-    private Long createBy;
-	/** 创建时间 */
-    @Schema(description = "创建时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-	/** 更新人id */
-    @Schema(description = "更新人id")
-    private Long updateBy;
-	/** 更新时间 */
-    @Schema(description = "更新时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
 }

+ 5 - 20
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletPrepaidBalance.java

@@ -1,11 +1,11 @@
 package com.sckw.payment.entity;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
+import com.sckw.core.model.base.BaseEntity;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.math.BigDecimal;
-import java.util.Date;
 
 /**
  * 采购企业预付余额明细(wallet_prepaid_balance)
@@ -13,8 +13,9 @@ import java.util.Date;
  * @author tangys
  * @since  2026-01-12 16:24:22
  */
+@EqualsAndHashCode(callSuper = true)
 @Data
-public class WalletPrepaidBalance {
+public class WalletPrepaidBalance extends BaseEntity {
 
 	/** 预付余额明细主键id */
     @Schema(description = "预付余额明细主键id")
@@ -52,21 +53,5 @@ public class WalletPrepaidBalance {
 	/** 凭证标识 0-无凭证 1-有凭证 */
     @Schema(description = "凭证标识 0-无凭证 1-有凭证")
     private Integer voucherFlag;
-	/** 删除标记 0-未删除 1-已删除 */
-    @Schema(description = "删除标记 0-未删除 1-已删除")
-    private Integer delFlag;
-	/** 创建人id */
-    @Schema(description = "创建人id")
-    private Long createBy;
-	/** 创建时间 */
-    @Schema(description = "创建时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-	/** 更新人id */
-    @Schema(description = "更新人id")
-    private Long updateBy;
-	/** 更新时间 */
-    @Schema(description = "更新时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
+
 }

+ 5 - 20
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletPrepaidRecord.java

@@ -1,11 +1,11 @@
 package com.sckw.payment.entity;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
+import com.sckw.core.model.base.BaseEntity;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.math.BigDecimal;
-import java.util.Date;
 
 /**
  * 预付支付记录(wallet_prepaid_record)
@@ -13,8 +13,9 @@ import java.util.Date;
  * @author tangys
  * @since  2026-01-15 09:32:47
  */
+@EqualsAndHashCode(callSuper = true)
 @Data
-public class WalletPrepaidRecord {
+public class WalletPrepaidRecord extends BaseEntity {
 
 	/** 预付支付记录主键id */
     @Schema(description = "预付支付记录主键id")
@@ -38,21 +39,5 @@ public class WalletPrepaidRecord {
 	/** 备注 */
     @Schema(description = "备注")
     private String remark;
-	/** 删除标记 0-未删除 1-已删除 */
-    @Schema(description = "删除标记 0-未删除 1-已删除")
-    private Integer delFlag;
-	/** 创建人id */
-    @Schema(description = "创建人id")
-    private Long createBy;
-	/** 创建时间 */
-    @Schema(description = "创建时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-	/** 更新人id */
-    @Schema(description = "更新人id")
-    private Long updateBy;
-	/** 更新时间 */
-    @Schema(description = "更新时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
+
 }

+ 0 - 40
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/entity/WalletRequestLog.java

@@ -1,40 +0,0 @@
-package com.sckw.payment.entity;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 钱包接口幂等控制表(wallet_request_log)
- *
- * @author tangys
- * @since  2026-01-06 10:28:02
- */
-@Data
-public class WalletRequestLog {
-
-	/** 主键ID */
-    @Schema(description = "主键ID")
-    private Long id;
-	/** 幂等请求号 */
-    @Schema(description = "幂等请求号")
-    private String requestId;
-	/** 业务类型 */
-    @Schema(description = "业务类型")
-    private String bizType;
-	/** 业务单号 */
-    @Schema(description = "业务单号")
-    private String bizNo;
-	/** 状态:0-INIT 1-SUCCESS 2-FAIL 3-RETRY */
-    @Schema(description = "状态:0-INIT 1-SUCCESS 2-FAIL 3-RETRY")
-    private Integer status;
-	/** 失败原因 */
-    @Schema(description = "失败原因")
-    private String lastError;
-	/** 创建时间 */
-    @Schema(description = "创建时间")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createdAt;
-}

+ 2 - 2
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/enums/PayStatusEnum.java

@@ -31,10 +31,10 @@ public enum PayStatusEnum {
      * @param code 编码
      * @return 枚举值
      */
-    public static PayStatusEnum getByCode(Integer code) {
+    public static String getByCode(Integer code) {
         for (PayStatusEnum status : values()) {
             if (status.getCode().equals(code)) {
-                return status;
+                return status.getName();
             }
         }
         return null;

+ 0 - 81
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletAccountMapper.java

@@ -1,81 +0,0 @@
-package com.sckw.payment.mapper;
-
-import com.sckw.payment.entity.WalletAccount;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 钱包账户表Mapper接口
- *
- * @author tangys
- * @since  2026-01-06 10:30:54
- */
-@Mapper
-public interface WalletAccountMapper {
-    /**
-     * 分页查询钱包账户表列表
-     *
-     * @param walletAccount 钱包账户表
-     * @return 钱包账户表列表
-     */
-    List<WalletAccount> selectWalletAccountList(WalletAccount walletAccount);
-
-    /**
-     * 根据主键ID查询钱包账户表
-     *
-     * @param id 主键id
-     * @return 钱包账户表
-     */
-    WalletAccount selectWalletAccountById(@Param("id") Long id);
-
-    /**
-     * 根据主键ID列表查询钱包账户表列表
-     *
-     * @param idList 主键id列表
-     * @return 列表数据
-     */
-    List<WalletAccount> selectWalletAccountByIds(@Param("idList") List<Long> idList);
-
-    /**
-     * 新增钱包账户表
-     *
-     * @param walletAccount 钱包账户表
-     * @return 结果数据
-     */
-    int insertWalletAccount(WalletAccount walletAccount);
-
-    /**
-     * 修改钱包账户表
-     *
-     * @param walletAccount 钱包账户表
-     * @return 结果数据
-     */
-    int updateWalletAccount(WalletAccount walletAccount);
-
-    /**
-     * 删除钱包账户表
-     *
-     * @param id 主键id
-     * @return 结果数据
-     */
-    int deleteWalletAccountById(@Param("id") Long id);
-
-    /**
-     * 批量删除钱包账户表
-     *
-     * @param idList 主键id列表
-     * @return 结果数据
-     */
-    int deleteWalletAccountByIds(@Param("idList") List<Long> idList);
-
-    /**
-     * 批量逻辑删除钱包账户表
-     *
-     * @param idList 主键id列表
-     * @param updateBy 登录用户名
-     * @return 结果数据
-     */
-    int deleteWalletAccountLogicByIds(@Param("idList") List<Long> idList, @Param("updateBy") Long updateBy);
-}

+ 13 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletAgentBalanceMapper.java

@@ -0,0 +1,13 @@
+package com.sckw.payment.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.sckw.payment.entity.WalletAgentBalance;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @date 2026-06-15 11:00:08
+* @author xucaiqin
+*/
+@Mapper
+public interface WalletAgentBalanceMapper extends BaseMapper<WalletAgentBalance> {
+}

+ 13 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletAgentMapper.java

@@ -0,0 +1,13 @@
+package com.sckw.payment.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.sckw.payment.entity.WalletAgent;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @date 2026-06-15 10:58:32
+* @author xucaiqin
+*/
+@Mapper
+public interface WalletAgentMapper extends BaseMapper<WalletAgent> {
+}

+ 13 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletAgentRecordMapper.java

@@ -0,0 +1,13 @@
+package com.sckw.payment.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.sckw.payment.entity.WalletAgentRecord;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @date 2026-06-15 11:00:08
+* @author xucaiqin
+*/
+@Mapper
+public interface WalletAgentRecordMapper extends BaseMapper<WalletAgentRecord> {
+}

+ 0 - 81
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletBalanceMapper.java

@@ -1,81 +0,0 @@
-package com.sckw.payment.mapper;
-
-import com.sckw.payment.entity.WalletBalance;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 钱包余额明细表Mapper接口
- *
- * @author tangys
- * @since  2026-01-12 16:24:22
- */
-@Mapper
-public interface WalletBalanceMapper {
-    /**
-     * 分页查询钱包余额明细表列表
-     *
-     * @param walletBalance 钱包余额明细表
-     * @return 钱包余额明细表列表
-     */
-    List<WalletBalance> selectWalletBalanceList(WalletBalance walletBalance);
-
-    /**
-     * 根据主键ID查询钱包余额明细表
-     *
-     * @param id 明细主键
-     * @return 钱包余额明细表
-     */
-    WalletBalance selectWalletBalanceById(@Param("id") Long id);
-
-    /**
-     * 根据主键ID列表查询钱包余额明细表列表
-     *
-     * @param idList 明细主键列表
-     * @return 列表数据
-     */
-    List<WalletBalance> selectWalletBalanceByIds(@Param("idList") List<Long> idList);
-
-    /**
-     * 新增钱包余额明细表
-     *
-     * @param walletBalance 钱包余额明细表
-     * @return 结果数据
-     */
-    int insertWalletBalance(WalletBalance walletBalance);
-
-    /**
-     * 修改钱包余额明细表
-     *
-     * @param walletBalance 钱包余额明细表
-     * @return 结果数据
-     */
-    int updateWalletBalance(WalletBalance walletBalance);
-
-    /**
-     * 删除钱包余额明细表
-     *
-     * @param id 明细主键
-     * @return 结果数据
-     */
-    int deleteWalletBalanceById(@Param("id") Long id);
-
-    /**
-     * 批量删除钱包余额明细表
-     *
-     * @param idList 明细主键列表
-     * @return 结果数据
-     */
-    int deleteWalletBalanceByIds(@Param("idList") List<Long> idList);
-
-    /**
-     * 批量逻辑删除钱包余额明细表
-     *
-     * @param idList 明细主键列表
-     * @param loginName 登录用户名
-     * @return 结果数据
-     */
-    int deleteWalletBalanceLogicByIds(@Param("idList") List<Long> idList, @Param("loginName") String loginName);
-}

+ 0 - 81
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletBankCallbackMapper.java

@@ -1,81 +0,0 @@
-package com.sckw.payment.mapper;
-
-import com.sckw.payment.entity.WalletBankCallback;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 银行回调日志表Mapper接口
- *
- * @author tangys
- * @since  2026-01-06 10:30:54
- */
-@Mapper
-public interface WalletBankCallbackMapper {
-    /**
-     * 分页查询银行回调日志表列表
-     *
-     * @param walletBankCallback 银行回调日志表
-     * @return 银行回调日志表列表
-     */
-    List<WalletBankCallback> selectWalletBankCallbackList(WalletBankCallback walletBankCallback);
-
-    /**
-     * 根据主键ID查询银行回调日志表
-     *
-     * @param id 主键ID
-     * @return 银行回调日志表
-     */
-    WalletBankCallback selectWalletBankCallbackById(@Param("id") Long id);
-
-    /**
-     * 根据主键ID列表查询银行回调日志表列表
-     *
-     * @param idList 主键ID列表
-     * @return 列表数据
-     */
-    List<WalletBankCallback> selectWalletBankCallbackByIds(@Param("idList") List<Long> idList);
-
-    /**
-     * 新增银行回调日志表
-     *
-     * @param walletBankCallback 银行回调日志表
-     * @return 结果数据
-     */
-    int insertWalletBankCallback(WalletBankCallback walletBankCallback);
-
-    /**
-     * 修改银行回调日志表
-     *
-     * @param walletBankCallback 银行回调日志表
-     * @return 结果数据
-     */
-    int updateWalletBankCallback(WalletBankCallback walletBankCallback);
-
-    /**
-     * 删除银行回调日志表
-     *
-     * @param id 主键ID
-     * @return 结果数据
-     */
-    int deleteWalletBankCallbackById(@Param("id") Long id);
-
-    /**
-     * 批量删除银行回调日志表
-     *
-     * @param idList 主键ID列表
-     * @return 结果数据
-     */
-    int deleteWalletBankCallbackByIds(@Param("idList") List<Long> idList);
-
-    /**
-     * 批量逻辑删除银行回调日志表
-     *
-     * @param idList 主键ID列表
-     * @param updateBy 登录用户名
-     * @return 结果数据
-     */
-    int deleteWalletBankCallbackLogicByIds(@Param("idList") List<Long> idList, @Param("updateBy") Long updateBy);
-}

+ 0 - 72
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletBankRequestMapper.java

@@ -1,72 +0,0 @@
-package com.sckw.payment.mapper;
-
-import com.sckw.payment.entity.WalletBankRequest;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 银行请求响应表Mapper接口
- *
- * @author tangys
- * @since  2026-01-06 10:30:54
- */
-@Mapper
-public interface WalletBankRequestMapper {
-    /**
-     * 分页查询银行请求响应表列表
-     *
-     * @param walletBankRequest 银行请求响应表
-     * @return 银行请求响应表列表
-     */
-    List<WalletBankRequest> selectWalletBankRequestList(WalletBankRequest walletBankRequest);
-
-    /**
-     * 根据主键ID查询银行请求响应表
-     *
-     * @param id 主键ID
-     * @return 银行请求响应表
-     */
-    WalletBankRequest selectWalletBankRequestById(@Param("id") Long id);
-
-    /**
-     * 根据主键ID列表查询银行请求响应表列表
-     *
-     * @param idList 主键ID列表
-     * @return 列表数据
-     */
-    List<WalletBankRequest> selectWalletBankRequestByIds(@Param("idList") List<Long> idList);
-
-    /**
-     * 新增银行请求响应表
-     *
-     * @param walletBankRequest 银行请求响应表
-     * @return 结果数据
-     */
-    int insertWalletBankRequest(WalletBankRequest walletBankRequest);
-
-    /**
-     * 修改银行请求响应表
-     *
-     * @param walletBankRequest 银行请求响应表
-     * @return 结果数据
-     */
-    int updateWalletBankRequest(WalletBankRequest walletBankRequest);
-
-    /**
-     * 删除银行请求响应表
-     *
-     * @param id 主键ID
-     * @return 结果数据
-     */
-    int deleteWalletBankRequestById(@Param("id") Long id);
-
-    /**
-     * 批量删除银行请求响应表
-     *
-     * @param idList 主键ID列表
-     * @return 结果数据
-     */
-    int deleteWalletBankRequestByIds(@Param("idList") List<Long> idList);
-}

+ 2 - 1
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletBusinessFileMapper.java

@@ -1,5 +1,6 @@
 package com.sckw.payment.mapper;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.sckw.payment.entity.WalletBusinessFile;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -13,7 +14,7 @@ import java.util.List;
  * @since  2026-01-12 14:11:22
  */
 @Mapper
-public interface WalletBusinessFileMapper {
+public interface WalletBusinessFileMapper extends BaseMapper<WalletBusinessFile> {
     /**
      * 分页查询钱包_业务文件列表
      *

+ 0 - 81
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletEntInfoMapper.java

@@ -1,81 +0,0 @@
-package com.sckw.payment.mapper;
-
-import com.sckw.payment.entity.WalletEntInfo;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 开户企业信息表Mapper接口
- *
- * @author tangys
- * @since  2026-01-07 16:59:01
- */
-@Mapper
-public interface WalletEntInfoMapper {
-    /**
-     * 分页查询开户企业信息表列表
-     *
-     * @param walletEntInfo 开户企业信息表
-     * @return 开户企业信息表列表
-     */
-    List<WalletEntInfo> selectWalletEntInfoList(WalletEntInfo walletEntInfo);
-
-    /**
-     * 根据主键ID查询开户企业信息表
-     *
-     * @param id id
-     * @return 开户企业信息表
-     */
-    WalletEntInfo selectWalletEntInfoById(@Param("id") Long id);
-
-    /**
-     * 根据主键ID列表查询开户企业信息表列表
-     *
-     * @param idList id列表
-     * @return 列表数据
-     */
-    List<WalletEntInfo> selectWalletEntInfoByIds(@Param("idList") List<Long> idList);
-
-    /**
-     * 新增开户企业信息表
-     *
-     * @param walletEntInfo 开户企业信息表
-     * @return 结果数据
-     */
-    int insertWalletEntInfo(WalletEntInfo walletEntInfo);
-
-    /**
-     * 修改开户企业信息表
-     *
-     * @param walletEntInfo 开户企业信息表
-     * @return 结果数据
-     */
-    int updateWalletEntInfo(WalletEntInfo walletEntInfo);
-
-    /**
-     * 删除开户企业信息表
-     *
-     * @param id id
-     * @return 结果数据
-     */
-    int deleteWalletEntInfoById(@Param("id") Long id);
-
-    /**
-     * 批量删除开户企业信息表
-     *
-     * @param idList id列表
-     * @return 结果数据
-     */
-    int deleteWalletEntInfoByIds(@Param("idList") List<Long> idList);
-
-    /**
-     * 批量逻辑删除开户企业信息表
-     *
-     * @param idList id列表
-     * @param loginName 登录用户名
-     * @return 结果数据
-     */
-    int deleteWalletEntInfoLogicByIds(@Param("idList") List<Long> idList, @Param("loginName") String loginName);
-}

+ 0 - 85
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletEntUserMapper.java

@@ -1,85 +0,0 @@
-package com.sckw.payment.mapper;
-
-import com.sckw.payment.entity.WalletEntUser;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 企业股东或最终收益人Mapper接口
- *
- * @author tangys
- * @since  2026-01-07 16:59:01
- */
-@Mapper
-public interface WalletEntUserMapper {
-    /**
-     * 分页查询企业股东或最终收益人列表
-     *
-     * @param walletEntUser 企业股东或最终收益人
-     * @return 企业股东或最终收益人列表
-     */
-    List<WalletEntUser> selectWalletEntUserList(WalletEntUser walletEntUser);
-
-    /**
-     * 根据主键ID查询企业股东或最终收益人
-     *
-     * @param id id
-     * @return 企业股东或最终收益人
-     */
-    WalletEntUser selectWalletEntUserById(@Param("id") Long id);
-
-    /**
-     * 根据主键ID列表查询企业股东或最终收益人列表
-     *
-     * @param idList id列表
-     * @return 列表数据
-     */
-    List<WalletEntUser> selectWalletEntUserByIds(@Param("idList") List<Long> idList);
-
-    /**
-     * 新增企业股东或最终收益人
-     *
-     * @param walletEntUser 企业股东或最终收益人
-     * @return 结果数据
-     */
-    int insertWalletEntUser(WalletEntUser walletEntUser);
-
-    int insertBatch(@Param("walletEntUsers") List<WalletEntUser> walletEntUsers);
-
-
-
-    /**
-     * 修改企业股东或最终收益人
-     *
-     * @param walletEntUser 企业股东或最终收益人
-     * @return 结果数据
-     */
-    int updateWalletEntUser(WalletEntUser walletEntUser);
-
-    /**
-     * 删除企业股东或最终收益人
-     *
-     * @param id id
-     * @return 结果数据
-     */
-    int deleteWalletEntUserById(@Param("id") Long id);
-
-    /**
-     * 批量删除企业股东或最终收益人
-     *
-     * @param idList id列表
-     * @return 结果数据
-     */
-    int deleteWalletEntUserByIds(@Param("idList") List<Long> idList);
-
-    /**
-     * 批量逻辑删除企业股东或最终收益人
-     *
-     * @param idList id列表
-     * @param loginName 登录用户名
-     * @return 结果数据
-     */
-    int deleteWalletEntUserLogicByIds(@Param("idList") List<Long> idList, @Param("loginName") String loginName);
-}

+ 5 - 4
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletPayableMapper.java

@@ -1,5 +1,6 @@
 package com.sckw.payment.mapper;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.sckw.payment.entity.WalletPayable;
 import com.sckw.payment.pojo.vo.req.WalletPayableQuery;
 import com.sckw.payment.pojo.vo.res.WalletPayableSummary;
@@ -12,10 +13,10 @@ import java.util.List;
  * 待付运费清单Mapper接口
  *
  * @author tangys
- * @since  2026-01-06 10:30:54
+ * @since 2026-01-06 10:30:54
  */
 @Mapper
-public interface WalletPayableMapper {
+public interface WalletPayableMapper extends BaseMapper<WalletPayable> {
     /**
      * 分页查询待付运费清单列表
      *
@@ -75,13 +76,13 @@ public interface WalletPayableMapper {
     /**
      * 批量逻辑删除待付运费清单
      *
-     * @param idList 待付运费清单主键id列表
+     * @param idList   待付运费清单主键id列表
      * @param updateBy 登录用户名
      * @return 结果数据
      */
     int deleteWalletPayableLogicByIds(@Param("idList") List<Long> idList, @Param("updateBy") Long updateBy);
 
-    WalletPayable selectByConsignAndCarrier(@Param("consignEntId") Long consignEntId,@Param("carrierEntId") Long carrierEntId);
+    WalletPayable selectByConsignAndCarrier(@Param("consignEntId") Long consignEntId, @Param("carrierEntId") Long carrierEntId);
 
     WalletPayableSummary selectPayableSummary(WalletPayableQuery query);
 }

+ 0 - 72
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/mapper/WalletRequestLogMapper.java

@@ -1,72 +0,0 @@
-package com.sckw.payment.mapper;
-
-import com.sckw.payment.entity.WalletRequestLog;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 钱包接口幂等控制表Mapper接口
- *
- * @author tangys
- * @since  2026-01-06 10:30:54
- */
-@Mapper
-public interface WalletRequestLogMapper {
-    /**
-     * 分页查询钱包接口幂等控制表列表
-     *
-     * @param walletRequestLog 钱包接口幂等控制表
-     * @return 钱包接口幂等控制表列表
-     */
-    List<WalletRequestLog> selectWalletRequestLogList(WalletRequestLog walletRequestLog);
-
-    /**
-     * 根据主键ID查询钱包接口幂等控制表
-     *
-     * @param id 主键ID
-     * @return 钱包接口幂等控制表
-     */
-    WalletRequestLog selectWalletRequestLogById(@Param("id") Long id);
-
-    /**
-     * 根据主键ID列表查询钱包接口幂等控制表列表
-     *
-     * @param idList 主键ID列表
-     * @return 列表数据
-     */
-    List<WalletRequestLog> selectWalletRequestLogByIds(@Param("idList") List<Long> idList);
-
-    /**
-     * 新增钱包接口幂等控制表
-     *
-     * @param walletRequestLog 钱包接口幂等控制表
-     * @return 结果数据
-     */
-    int insertWalletRequestLog(WalletRequestLog walletRequestLog);
-
-    /**
-     * 修改钱包接口幂等控制表
-     *
-     * @param walletRequestLog 钱包接口幂等控制表
-     * @return 结果数据
-     */
-    int updateWalletRequestLog(WalletRequestLog walletRequestLog);
-
-    /**
-     * 删除钱包接口幂等控制表
-     *
-     * @param id 主键ID
-     * @return 结果数据
-     */
-    int deleteWalletRequestLogById(@Param("id") Long id);
-
-    /**
-     * 批量删除钱包接口幂等控制表
-     *
-     * @param idList 主键ID列表
-     * @return 结果数据
-     */
-    int deleteWalletRequestLogByIds(@Param("idList") List<Long> idList);
-}

+ 5 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/WalletVo.java

@@ -89,6 +89,11 @@ public class WalletVo {
     @Schema(description = "付款中金额")
     private BigDecimal payingAmount;
 
+    /**
+     * 代理费金额
+     */
+    @Schema(description = "代理费金额")
+    private BigDecimal agentAmount;
     /**
      * 渠道
      */

+ 43 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/req/WalletAgentBalanceQuery.java

@@ -0,0 +1,43 @@
+package com.sckw.payment.pojo.vo.req;
+
+import com.sckw.core.web.page.BaseQuery;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class WalletAgentBalanceQuery extends BaseQuery {
+    @Schema(description = "代理费清单id")
+    private Long agentId;
+
+    @Schema(description = "订单号(模糊匹配)")
+    private String orderNo;
+
+    @Schema(description = "对方企业id")
+    private Long tradeEntId;
+
+    @Schema(description = "对方企业名称(模糊匹配)")
+    private String tradeEntName;
+
+    @Schema(description = "订单类型")
+    private Integer orderType;
+
+    @Schema(description = "交易类型 1-消费 2-申请付款 3-付款成功 4-人工录入")
+    private Integer tradeType;
+
+    @Schema(description = "金额最小值")
+    private BigDecimal tradeAmountMin;
+
+    @Schema(description = "金额最大值")
+    private BigDecimal tradeAmountMax;
+
+    @Schema(description = "执行状态 1-进行中 2-成功 3-失败")
+    private Integer status;
+
+    @Schema(description = "查询开始时间,yyyy-MM-dd HH:mm:ss")
+    private String startTime;
+
+    @Schema(description = "查询结束时间,yyyy-MM-dd HH:mm:ss")
+    private String endTime;
+}

+ 23 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/req/WalletAgentManualDto.java

@@ -0,0 +1,23 @@
+package com.sckw.payment.pojo.vo.req;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.DecimalMin;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class WalletAgentManualDto {
+    @Schema(description = "对方企业id")
+    @NotNull
+    private Long tradeEntId;
+
+    @Schema(description = "金额")
+    @NotNull
+    @DecimalMin(value = "0.01", message = "金额必须大于0")
+    private BigDecimal amount;
+
+    @Schema(description = "备注")
+    private String remark;
+}

+ 23 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/req/WalletAgentPayDto.java

@@ -0,0 +1,23 @@
+package com.sckw.payment.pojo.vo.req;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.DecimalMin;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class WalletAgentPayDto {
+    @Schema(description = "代理费清单id")
+    @NotNull
+    private Long agentId;
+
+    @Schema(description = "付款金额")
+    @NotNull
+    @DecimalMin(value = "0.01", message = "付款金额必须大于0")
+    private BigDecimal payAmount;
+
+    @Schema(description = "备注")
+    private String remark;
+}

+ 28 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/req/WalletAgentQuery.java

@@ -0,0 +1,28 @@
+package com.sckw.payment.pojo.vo.req;
+
+import com.sckw.core.web.page.BaseQuery;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class WalletAgentQuery extends BaseQuery {
+    @Schema(description = "对方企业id")
+    private Long tradeEntId;
+
+    @Schema(description = "对方企业名称(模糊匹配)")
+    private String tradeEntName;
+
+    @Schema(description = "待付代理费最小值")
+    private BigDecimal preBalanceMin;
+
+    @Schema(description = "待付代理费最大值")
+    private BigDecimal preBalanceMax;
+
+    @Schema(description = "付款中金额最小值")
+    private BigDecimal tradingAmountMin;
+
+    @Schema(description = "付款中金额最大值")
+    private BigDecimal tradingAmountMax;
+}

+ 37 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/req/WalletAgentRecordQuery.java

@@ -0,0 +1,37 @@
+package com.sckw.payment.pojo.vo.req;
+
+import com.sckw.core.web.page.BaseQuery;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class WalletAgentRecordQuery extends BaseQuery {
+    @Schema(description = "代理费清单id")
+    private Long agentId;
+
+    @Schema(description = "订单号(模糊匹配)")
+    private String orderNo;
+
+    @Schema(description = "对方企业id")
+    private Long tradeEntId;
+
+    @Schema(description = "对方企业名称(模糊匹配)")
+    private String tradeEntName;
+
+    @Schema(description = "支付金额最小值")
+    private BigDecimal prepaidAmountMin;
+
+    @Schema(description = "支付金额最大值")
+    private BigDecimal prepaidAmountMax;
+
+    @Schema(description = "支付状态,0-等待支付 1-支付成功")
+    private Integer status;
+
+    @Schema(description = "查询开始时间,yyyy-MM-dd HH:mm:ss")
+    private String startTime;
+
+    @Schema(description = "查询结束时间,yyyy-MM-dd HH:mm:ss")
+    private String endTime;
+}

+ 1 - 1
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/req/WalletPrepaidQuery.java

@@ -25,7 +25,7 @@ public class WalletPrepaidQuery extends BaseQuery {
     /** 待履约/预付余额最大值 */
     @Schema(description = "待履约/预付余额最大值 ")
     private BigDecimal balanceMax;
-    /** 企业类型 1供应商 2采购商 */
+    /** 企业类型 1供应商 2采购商 4-代理 */
     @Schema(hidden = true)
     private Integer entType;
 }

+ 56 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/res/WalletAgentBalanceRes.java

@@ -0,0 +1,56 @@
+package com.sckw.payment.pojo.vo.res;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class WalletAgentBalanceRes {
+    @Schema(description = "明细id")
+    @JsonFormat(shape = JsonFormat.Shape.STRING)
+    private Long id;
+
+    @Schema(description = "关联订单编号")
+    private String orderNo;
+
+    @Schema(description = "对方企业id")
+    @JsonFormat(shape = JsonFormat.Shape.STRING)
+    private Long tradeEntId;
+
+    @Schema(description = "对方企业名称")
+    private String tradeEntName;
+
+    @Schema(description = "订单类型")
+    private Integer orderType;
+
+    @Schema(description = "交易类型 1-消费 2-申请付款 3-付款成功 4-人工录入")
+    private Integer tradeType;
+
+    @Schema(description = "交易类型描述")
+    private String tradeTypeDesc;
+
+    @Schema(description = "交易金额")
+    private BigDecimal tradeAmount;
+
+    @Schema(description = "待付代理费余额")
+    private BigDecimal preBalance;
+
+    @Schema(description = "交易中金额")
+    private BigDecimal tradingAmount;
+
+    @Schema(description = "执行状态 1-进行中 2-成功 3-失败")
+    private Integer status;
+
+    @Schema(description = "执行状态描述")
+    private String statusDesc;
+
+    @Schema(description = "备注")
+    private String remark;
+
+    @Schema(description = "创建时间")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+}

+ 44 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/res/WalletAgentRecordRes.java

@@ -0,0 +1,44 @@
+package com.sckw.payment.pojo.vo.res;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class WalletAgentRecordRes {
+    @Schema(description = "支付记录id")
+    @JsonFormat(shape = JsonFormat.Shape.STRING)
+    private Long id;
+
+    @Schema(description = "支付订单号")
+    private String orderNo;
+
+    @Schema(description = "对方企业id")
+    @JsonFormat(shape = JsonFormat.Shape.STRING)
+    private Long tradeEntId;
+
+    @Schema(description = "对方企业名称")
+    private String tradeEntName;
+
+    @Schema(description = "支付金额")
+    private BigDecimal prepaidAmount;
+
+    @Schema(description = "到账金额")
+    private BigDecimal receivedAmount;
+
+    @Schema(description = "支付状态,0-等待支付 1-支付成功")
+    private Integer status;
+
+    @Schema(description = "支付状态描述")
+    private String statusDesc;
+
+    @Schema(description = "备注")
+    private String remark;
+
+    @Schema(description = "创建时间")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+}

+ 38 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/res/WalletAgentRes.java

@@ -0,0 +1,38 @@
+package com.sckw.payment.pojo.vo.res;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class WalletAgentRes {
+    @Schema(description = "代理费清单id")
+    @JsonFormat(shape = JsonFormat.Shape.STRING)
+    private Long id;
+
+    @Schema(description = "对方企业id")
+    @JsonFormat(shape = JsonFormat.Shape.STRING)
+    private Long tradeEntId;
+
+    @Schema(description = "对方企业名称")
+    private String tradeEntName;
+
+    @Schema(description = "待付代理费")
+    private BigDecimal preBalance;
+
+    @Schema(description = "付款中金额")
+    private BigDecimal tradingAmount;
+
+    @Schema(description = "更新时间")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    @Schema(description = "是否可付款 1-是 0-否")
+    private Integer canPay;
+
+    @Schema(description = "是否可人工录入 1-是 0-否")
+    private Integer canManualEntry;
+}

+ 15 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/res/WalletAgentSummary.java

@@ -0,0 +1,15 @@
+package com.sckw.payment.pojo.vo.res;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class WalletAgentSummary {
+    @Schema(description = "待付代理费")
+    private BigDecimal preBalanceTotal = BigDecimal.ZERO;
+
+    @Schema(description = "付款中金额")
+    private BigDecimal tradingAmountTotal = BigDecimal.ZERO;
+}

+ 2 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/pojo/vo/res/WalletSummary.java

@@ -38,5 +38,7 @@ public class WalletSummary {
     @Schema(description = "付款中运费")
     private BigDecimal payingFreightTotal = BigDecimal.ZERO;
 
+    @Schema(description = "代理费金额")
+    private BigDecimal agentAmount = BigDecimal.ZERO;
 
 }

+ 0 - 54
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/IWalletPrepaidService.java

@@ -10,7 +10,6 @@ import jakarta.servlet.http.HttpServletResponse;
 
 import java.math.BigDecimal;
 import java.util.List;
-import java.util.Map;
 
 /**
  * 预付清单Service接口
@@ -34,13 +33,6 @@ public interface IWalletPrepaidService {
      */
     PageInfo<WalletPrepaidRes> selectWalletPrepaidList(WalletPrepaidQuery query);
 
-    /**
-     * 查询预付清单
-     *
-     * @param id 预付清单主键id
-     * @return 预付清单
-     */
-    WalletPrepaid selectWalletPrepaidById(Long id);
 
     WalletPrepaid queryPrepaidBalance(Long supEntId);
 
@@ -52,53 +44,7 @@ public interface IWalletPrepaidService {
      */
     List<WalletPrepaid> selectWalletPrepaidByIds(List<Long> idList);
 
-    /**
-     * 根据主键ID列表查询预付清单集合
-     *
-     * @param idList 预付清单主键id列表
-     * @return Map<预付清单主键id, 预付清单>
-     */
-    Map<Long, WalletPrepaid> mapWalletPrepaidByIds(List<Long> idList);
-
-    /**
-     * 新增预付清单
-     *
-     * @param walletPrepaid 预付清单
-     * @return 结果数据
-     */
-    int insertWalletPrepaid(WalletPrepaid walletPrepaid);
-
-    /**
-     * 修改预付清单
-     *
-     * @param walletPrepaid 预付清单
-     * @return 结果数据
-     */
-    int updateWalletPrepaid(WalletPrepaid walletPrepaid);
 
-    /**
-     * 删除预付清单
-     *
-     * @param id 预付清单主键id
-     * @return 结果数据
-     */
-    int deleteWalletPrepaidById(Long id);
-
-    /**
-     * 批量删除预付清单
-     *
-     * @param idList 预付清单主键id列表
-     * @return 结果数据
-     */
-    int deleteWalletPrepaidByIds(List<Long> idList);
-
-    /**
-     * 批量逻辑删除预付清单
-     *
-     * @param idList 预付清单主键id列表
-     * @return 结果数据
-     */
-    int deleteWalletPrepaidLogicByIds(List<Long> idList);
 
     WalletPrepaidSummary selectWalletPrepaidSummary(WalletPrepaidQuery query);
 

+ 0 - 79
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/IWalletRequestLogService.java

@@ -1,79 +0,0 @@
-package com.sckw.payment.service;
-
-import com.sckw.payment.entity.WalletRequestLog;
-
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * 钱包接口幂等控制表Service接口
- *
- * @author tangys
- * @since  2026-01-06 11:03:35
- */
-public interface IWalletRequestLogService {
-    /**
-     * 分页查询钱包接口幂等控制表列表
-     *
-     * @param walletRequestLog 钱包接口幂等控制表
-     * @return 钱包接口幂等控制表列表
-     */
-    List<WalletRequestLog> selectWalletRequestLogList(WalletRequestLog walletRequestLog);
-
-    /**
-     * 查询钱包接口幂等控制表
-     *
-     * @param id 主键ID
-     * @return 钱包接口幂等控制表
-     */
-    WalletRequestLog selectWalletRequestLogById(Long id);
-
-    /**
-     * 根据主键ID列表查询钱包接口幂等控制表列表
-     *
-     * @param idList 主键ID列表
-     * @return 列表数据
-     */
-    List<WalletRequestLog> selectWalletRequestLogByIds(List<Long> idList);
-
-    /**
-     * 根据主键ID列表查询钱包接口幂等控制表集合
-     *
-     * @param idList 主键ID列表
-     * @return Map<主键ID, 钱包接口幂等控制表>
-     */
-    Map<Long, WalletRequestLog> mapWalletRequestLogByIds(List<Long> idList);
-
-    /**
-     * 新增钱包接口幂等控制表
-     *
-     * @param walletRequestLog 钱包接口幂等控制表
-     * @return 结果数据
-     */
-    int insertWalletRequestLog(WalletRequestLog walletRequestLog);
-
-    /**
-     * 修改钱包接口幂等控制表
-     *
-     * @param walletRequestLog 钱包接口幂等控制表
-     * @return 结果数据
-     */
-    int updateWalletRequestLog(WalletRequestLog walletRequestLog);
-
-    /**
-     * 删除钱包接口幂等控制表
-     *
-     * @param id 主键ID
-     * @return 结果数据
-     */
-    int deleteWalletRequestLogById(Long id);
-
-    /**
-     * 批量删除钱包接口幂等控制表
-     *
-     * @param idList 主键ID列表
-     * @return 结果数据
-     */
-    int deleteWalletRequestLogByIds(List<Long> idList);
-}

+ 2 - 2
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/WalletService.java

@@ -380,7 +380,7 @@ public class WalletService {
             bean.setFreightAmount(summary.getFreightTotal());
             bean.setProcessingAmount(summary.getTradingFreightTotal());
             bean.setPayingAmount(summary.getPayingFreightTotal());
-
+            bean.setAgentAmount(summary.getAgentAmount());
             return BaseResult.success(bean);
         }
         return BaseResult.failed("暂未开通钱包");
@@ -453,7 +453,7 @@ public class WalletService {
                 withdrawDto.setUid(kwpWallet.getUid());
                 withdrawDto.setOrderNo(kwpWalletCash.getOrderNo());
                 withdrawDto.setAmt(String.valueOf(cashWalletReq.getMoney()));
-                withdrawDto.setNoticeUrl("/notice/cash");
+                withdrawDto.setNoticeUrl(applicationProperties.getCash());
                 withdrawDto.setSummary("");
                 withdrawDto.setRemark("提现");
                 withdrawDto.setCommission("");

+ 16 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletAgentBalanceService.java

@@ -0,0 +1,16 @@
+package com.sckw.payment.service.impl;
+
+import org.springframework.stereotype.Service;
+import org.springframework.beans.factory.annotation.Autowired;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.sckw.payment.mapper.WalletAgentBalanceMapper;
+import com.sckw.payment.entity.WalletAgentBalance;
+/**
+* @date 2026-06-15 11:00:08
+* @author xucaiqin
+*/
+@Service
+public class WalletAgentBalanceService extends ServiceImpl<WalletAgentBalanceMapper, WalletAgentBalance> {
+
+}

+ 16 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletAgentRecordService.java

@@ -0,0 +1,16 @@
+package com.sckw.payment.service.impl;
+
+import org.springframework.stereotype.Service;
+import org.springframework.beans.factory.annotation.Autowired;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.sckw.payment.entity.WalletAgentRecord;
+import com.sckw.payment.mapper.WalletAgentRecordMapper;
+/**
+* @date 2026-06-15 11:00:08
+* @author xucaiqin
+*/
+@Service
+public class WalletAgentRecordService extends ServiceImpl<WalletAgentRecordMapper, WalletAgentRecord> {
+
+}

+ 754 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletAgentService.java

@@ -0,0 +1,754 @@
+package com.sckw.payment.service.impl;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageInfo;
+import com.sckw.core.exception.BusinessException;
+import com.sckw.core.model.enums.EntTypeEnum;
+import com.sckw.core.utils.PageUtils;
+import com.sckw.core.web.context.LoginEntHolder;
+import com.sckw.core.web.context.LoginUserHolder;
+import com.sckw.core.web.response.BaseResult;
+import com.sckw.payment.config.ApplicationProperties;
+import com.sckw.payment.entity.WalletAgent;
+import com.sckw.payment.entity.WalletAgentBalance;
+import com.sckw.payment.entity.WalletAgentRecord;
+import com.sckw.payment.entity.KwpWallet;
+import com.sckw.payment.enums.ExecutionStatusEnum;
+import com.sckw.payment.enums.OrderTypeEnum;
+import com.sckw.payment.enums.PayStatusEnum;
+import com.sckw.payment.mapper.WalletAgentMapper;
+import com.sckw.payment.mapper.WalletAgentBalanceMapper;
+import com.sckw.payment.mapper.WalletAgentRecordMapper;
+import com.sckw.payment.mapper.KwpWalletMapper;
+import com.sckw.payment.pojo.dto.PayDto;
+import com.sckw.payment.pojo.vo.PayRes;
+import com.sckw.payment.pojo.vo.req.ReceivedCallbackDto;
+import com.sckw.payment.pojo.vo.req.WalletAgentManualDto;
+import com.sckw.payment.pojo.vo.req.WalletAgentBalanceQuery;
+import com.sckw.payment.pojo.vo.req.WalletAgentPayDto;
+import com.sckw.payment.pojo.vo.req.WalletAgentQuery;
+import com.sckw.payment.pojo.vo.req.WalletAgentRecordQuery;
+import com.sckw.payment.pojo.vo.res.WalletAgentBalanceRes;
+import com.sckw.payment.pojo.vo.res.WalletAgentRecordRes;
+import com.sckw.payment.pojo.vo.res.WalletAgentRes;
+import com.sckw.payment.pojo.vo.res.WalletAgentSummary;
+import com.sckw.payment.pojo.vo.res.WalletPayAddRes;
+import com.sckw.payment.service.PayXwService;
+import com.sckw.payment.api.model.dto.common.R;
+import com.sckw.payment.api.model.TradeEntInfoResVo;
+import com.sckw.system.api.RemoteSystemService;
+import com.sckw.system.api.model.dto.res.EntCacheResDto;
+import jakarta.annotation.Resource;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+import org.springframework.util.StringUtils;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+ * @author xucaiqin
+ * @date 2026-06-15 10:58:32
+ */
+@Service
+public class WalletAgentService extends ServiceImpl<WalletAgentMapper, WalletAgent> {
+
+    private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+
+    @Autowired
+    private WalletAgentRecordMapper walletAgentRecordMapper;
+
+    @Autowired
+    private WalletAgentBalanceMapper walletAgentBalanceMapper;
+
+    @Autowired
+    private PayXwService payXwService;
+
+    @Autowired
+    private KwpWalletMapper kwpWalletMapper;
+    @Resource
+    private ApplicationProperties applicationProperties;
+
+    @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 8000)
+    private RemoteSystemService remoteSystemService;
+
+    public WalletAgentSummary queryAgentSummary() {
+        WalletAgentSummary summary = new WalletAgentSummary();
+        Long curEntId = LoginEntHolder.getEntId();
+        boolean proxy = isProxyEnt();
+
+        LambdaQueryWrapper<WalletAgent> wrapper = Wrappers.lambdaQuery(WalletAgent.class)
+                .eq(WalletAgent::getDelFlag, 0)
+                .eq(proxy ? WalletAgent::getAgtEntId : WalletAgent::getSupEntId, curEntId);
+
+        List<WalletAgent> list = baseMapper.selectList(wrapper);
+        if (CollectionUtils.isEmpty(list)) {
+            return summary;
+        }
+        BigDecimal preTotal = list.stream()
+                .map(WalletAgent::getPreBalance)
+                .filter(Objects::nonNull)
+                .reduce(BigDecimal.ZERO, BigDecimal::add);
+        BigDecimal tradingTotal = list.stream()
+                .map(WalletAgent::getTradingAmount)
+                .filter(Objects::nonNull)
+                .reduce(BigDecimal.ZERO, BigDecimal::add);
+        summary.setPreBalanceTotal(preTotal);
+        summary.setTradingAmountTotal(tradingTotal);
+        return summary;
+    }
+
+    public PageInfo<WalletAgentRes> agentList(WalletAgentQuery query) {
+        PageInfo<WalletAgentRes> pageInfo = new PageInfo<>(new ArrayList<>());
+        Long curEntId = LoginEntHolder.getEntId();
+        boolean proxy = isProxyEnt();
+
+        LambdaQueryWrapper<WalletAgent> wrapper = Wrappers.lambdaQuery(WalletAgent.class)
+                .eq(WalletAgent::getDelFlag, 0)
+                .eq(proxy ? WalletAgent::getAgtEntId : WalletAgent::getSupEntId, curEntId);
+
+        if (query.getTradeEntId() != null) {
+            wrapper.eq(proxy ? WalletAgent::getSupEntId : WalletAgent::getAgtEntId, query.getTradeEntId());
+        } else if (StringUtils.hasText(query.getTradeEntName())) {
+            List<EntCacheResDto> entCacheResDtos = remoteSystemService.queryEntCacheByName(query.getTradeEntName());
+            if (CollectionUtils.isEmpty(entCacheResDtos)) {
+                return pageInfo;
+            }
+            List<Long> ids = entCacheResDtos.stream().map(EntCacheResDto::getId).distinct().toList();
+            wrapper.in(proxy ? WalletAgent::getSupEntId : WalletAgent::getAgtEntId, ids);
+        }
+
+        if (query.getPreBalanceMin() != null) {
+            wrapper.ge(WalletAgent::getPreBalance, query.getPreBalanceMin());
+        }
+        if (query.getPreBalanceMax() != null) {
+            wrapper.le(WalletAgent::getPreBalance, query.getPreBalanceMax());
+        }
+        if (query.getTradingAmountMin() != null) {
+            wrapper.ge(WalletAgent::getTradingAmount, query.getTradingAmountMin());
+        }
+        if (query.getTradingAmountMax() != null) {
+            wrapper.le(WalletAgent::getTradingAmount, query.getTradingAmountMax());
+        }
+
+        wrapper.orderByDesc(WalletAgent::getUpdateTime, WalletAgent::getId);
+
+        PageUtils.startPage(query);
+        List<WalletAgent> walletAgents = baseMapper.selectList(wrapper);
+        if (CollectionUtils.isEmpty(walletAgents)) {
+            return pageInfo;
+        }
+
+        List<Long> tradeEntIds = walletAgents.stream()
+                .map(e -> proxy ? e.getSupEntId() : e.getAgtEntId())
+                .filter(Objects::nonNull)
+                .distinct()
+                .toList();
+        Map<Long, String> entNameMap = new HashMap<>();
+        if (!CollectionUtils.isEmpty(tradeEntIds)) {
+            List<EntCacheResDto> entInfos = remoteSystemService.queryEntCacheByIds(tradeEntIds);
+            if (!CollectionUtils.isEmpty(entInfos)) {
+                entNameMap = entInfos.stream().collect(Collectors.toMap(EntCacheResDto::getId, EntCacheResDto::getFirmName, (a, b) -> a));
+            }
+        }
+
+        Map<Long, String> finalEntNameMap = entNameMap;
+        pageInfo = ((Page<WalletAgent>) walletAgents).toPageInfo(e -> {
+            WalletAgentRes res = new WalletAgentRes();
+            res.setId(e.getId());
+            Long tradeEntId = proxy ? e.getSupEntId() : e.getAgtEntId();
+            res.setTradeEntId(tradeEntId);
+            res.setTradeEntName(finalEntNameMap.getOrDefault(tradeEntId, ""));
+            res.setPreBalance(e.getPreBalance());
+            res.setTradingAmount(e.getTradingAmount());
+            res.setUpdateTime(toDate(e.getUpdateTime()));
+            res.setCanPay(proxy ? 0 : (e.getPreBalance() != null && e.getPreBalance().compareTo(BigDecimal.ZERO) > 0 ? 1 : 0));
+            res.setCanManualEntry(proxy && e.getPreBalance() != null && e.getPreBalance().compareTo(BigDecimal.ZERO) > 0 ? 1 : 0);
+            return res;
+        });
+        return pageInfo;
+    }
+
+    public List<TradeEntInfoResVo> queryTradeEntList() {
+        boolean proxy = isProxyEnt();
+        Long curEntId = LoginEntHolder.getEntId();
+
+        LambdaQueryWrapper<WalletAgent> wrapper = Wrappers.lambdaQuery(WalletAgent.class)
+                .select(WalletAgent::getAgtEntId, WalletAgent::getSupEntId)
+                .eq(WalletAgent::getDelFlag, 0)
+                .eq(proxy ? WalletAgent::getAgtEntId : WalletAgent::getSupEntId, curEntId);
+
+        List<WalletAgent> list = baseMapper.selectList(wrapper);
+        if (CollectionUtils.isEmpty(list)) {
+            return new ArrayList<>();
+        }
+        List<Long> tradeEntIds = list.stream()
+                .map(e -> proxy ? e.getSupEntId() : e.getAgtEntId())
+                .filter(Objects::nonNull)
+                .distinct()
+                .toList();
+        if (CollectionUtils.isEmpty(tradeEntIds)) {
+            return new ArrayList<>();
+        }
+        List<EntCacheResDto> entInfos = remoteSystemService.queryEntCacheByIds(tradeEntIds);
+        if (CollectionUtils.isEmpty(entInfos)) {
+            return new ArrayList<>();
+        }
+        return entInfos.stream().map(e -> {
+            TradeEntInfoResVo vo = new TradeEntInfoResVo();
+            vo.setEntId(e.getId());
+            vo.setEntName(e.getFirmName());
+            return vo;
+        }).toList();
+    }
+
+    public PageInfo<WalletAgentBalanceRes> balanceList(WalletAgentBalanceQuery query) {
+        PageInfo<WalletAgentBalanceRes> pageInfo = new PageInfo<>(new ArrayList<>());
+        Long curEntId = LoginEntHolder.getEntId();
+        boolean proxy = isProxyEnt();
+
+        Long agtEntId;
+        Long supEntId;
+        if (query.getAgentId() != null) {
+            WalletAgent walletAgent = baseMapper.selectById(query.getAgentId());
+            if (walletAgent == null || !Objects.equals(walletAgent.getDelFlag(), 0)) {
+                return pageInfo;
+            }
+            if (!Objects.equals(walletAgent.getSupEntId(), curEntId) && !Objects.equals(walletAgent.getAgtEntId(), curEntId)) {
+                throw new BusinessException("无权限查看该代理费明细");
+            }
+            agtEntId = walletAgent.getAgtEntId();
+            supEntId = walletAgent.getSupEntId();
+        } else {
+            agtEntId = proxy ? curEntId : null;
+            supEntId = proxy ? null : curEntId;
+        }
+
+        LambdaQueryWrapper<WalletAgentBalance> wrapper = Wrappers.lambdaQuery(WalletAgentBalance.class)
+                .eq(WalletAgentBalance::getDelFlag, 0);
+
+        if (agtEntId != null) {
+            wrapper.eq(WalletAgentBalance::getAgtEntId, agtEntId);
+        }
+        if (supEntId != null) {
+            wrapper.eq(WalletAgentBalance::getSupEntId, supEntId);
+        }
+
+        if (StringUtils.hasText(query.getOrderNo())) {
+            wrapper.like(WalletAgentBalance::getOrderNo, query.getOrderNo());
+        }
+        if (query.getOrderType() != null) {
+            wrapper.eq(WalletAgentBalance::getOrderType, query.getOrderType());
+        }
+
+        if (query.getTradeType() != null) {
+            wrapper.eq(WalletAgentBalance::getTradeType, query.getTradeType());
+        }
+        if (query.getTradeAmountMin() != null) {
+            wrapper.ge(WalletAgentBalance::getTradeAmount, query.getTradeAmountMin());
+        }
+        if (query.getTradeAmountMax() != null) {
+            wrapper.le(WalletAgentBalance::getTradeAmount, query.getTradeAmountMax());
+        }
+        if (query.getStatus() != null) {
+            wrapper.eq(WalletAgentBalance::getStatus, query.getStatus());
+        }
+
+        if (query.getTradeEntId() != null || StringUtils.hasText(query.getTradeEntName())) {
+            List<Long> tradeEntIds;
+            if (query.getTradeEntId() != null) {
+                tradeEntIds = List.of(query.getTradeEntId());
+            } else {
+                List<EntCacheResDto> entCacheResDtos = remoteSystemService.queryEntCacheByName(query.getTradeEntName());
+                if (CollectionUtils.isEmpty(entCacheResDtos)) {
+                    return pageInfo;
+                }
+                tradeEntIds = entCacheResDtos.stream().map(EntCacheResDto::getId).distinct().toList();
+            }
+            if (proxy) {
+                wrapper.in(WalletAgentBalance::getSupEntId, tradeEntIds);
+            } else {
+                wrapper.in(WalletAgentBalance::getAgtEntId, tradeEntIds);
+            }
+        }
+
+        LocalDateTime startTime = parseDateTime(query.getStartTime());
+        LocalDateTime endTime = parseDateTime(query.getEndTime());
+        if (startTime != null) {
+            wrapper.ge(WalletAgentBalance::getCreateTime, startTime);
+        }
+        if (endTime != null) {
+            wrapper.le(WalletAgentBalance::getCreateTime, endTime);
+        }
+        wrapper.orderByDesc(WalletAgentBalance::getCreateTime, WalletAgentBalance::getId);
+
+        PageUtils.startPage(query);
+        List<WalletAgentBalance> list = walletAgentBalanceMapper.selectList(wrapper);
+        if (CollectionUtils.isEmpty(list)) {
+            return pageInfo;
+        }
+
+        List<Long> tradeEntIdList = list.stream()
+                .map(e -> proxy ? e.getSupEntId() : e.getAgtEntId())
+                .filter(Objects::nonNull)
+                .distinct()
+                .toList();
+        Map<Long, String> entNameMap = new HashMap<>();
+        if (!CollectionUtils.isEmpty(tradeEntIdList)) {
+            List<EntCacheResDto> entInfos = remoteSystemService.queryEntCacheByIds(tradeEntIdList);
+            if (!CollectionUtils.isEmpty(entInfos)) {
+                entNameMap = entInfos.stream().collect(Collectors.toMap(EntCacheResDto::getId, EntCacheResDto::getFirmName, (a, b) -> a));
+            }
+        }
+        Map<Long, String> finalEntNameMap = entNameMap;
+
+        pageInfo = ((Page<WalletAgentBalance>) list).toPageInfo(e -> {
+            WalletAgentBalanceRes res = new WalletAgentBalanceRes();
+            BeanUtils.copyProperties(e, res);
+            res.setStatusDesc(ExecutionStatusEnum.getByCode(e.getStatus()));
+            Long tradeEntId = proxy ? e.getSupEntId() : e.getAgtEntId();
+            res.setTradeEntId(tradeEntId);
+            res.setTradeEntName(finalEntNameMap.getOrDefault(tradeEntId, ""));
+            res.setTradeTypeDesc(getAgentTradeTypeDesc(e.getTradeType()));
+            res.setCreateTime(toDate(e.getCreateTime()));
+            return res;
+        });
+        return pageInfo;
+    }
+
+    public PageInfo<WalletAgentRecordRes> recordList(WalletAgentRecordQuery query) {
+        PageInfo<WalletAgentRecordRes> pageInfo = new PageInfo<>(new ArrayList<>());
+        Long curEntId = LoginEntHolder.getEntId();
+        boolean proxy = isProxyEnt();
+
+        List<Long> agentIds;
+        if (query.getAgentId() != null) {
+            WalletAgent walletAgent = baseMapper.selectById(query.getAgentId());
+            if (walletAgent == null || !Objects.equals(walletAgent.getDelFlag(), 0)) {
+                return pageInfo;
+            }
+            if (!Objects.equals(walletAgent.getSupEntId(), curEntId) && !Objects.equals(walletAgent.getAgtEntId(), curEntId)) {
+                throw new BusinessException("无权限查看该支付记录");
+            }
+            agentIds = List.of(query.getAgentId());
+        } else {
+            agentIds = resolveAgentIds(curEntId, proxy, query.getTradeEntId(), query.getTradeEntName());
+            if (CollectionUtils.isEmpty(agentIds)) {
+                return pageInfo;
+            }
+        }
+
+        LambdaQueryWrapper<WalletAgentRecord> wrapper = Wrappers.lambdaQuery(WalletAgentRecord.class)
+                .eq(WalletAgentRecord::getDelFlag, 0)
+                .in(WalletAgentRecord::getAgentId, agentIds);
+
+        if (StringUtils.hasText(query.getOrderNo())) {
+            wrapper.like(WalletAgentRecord::getOrderNo, query.getOrderNo());
+        }
+        if (query.getPrepaidAmountMin() != null) {
+            wrapper.ge(WalletAgentRecord::getPrepaidAmount, query.getPrepaidAmountMin());
+        }
+        if (query.getPrepaidAmountMax() != null) {
+            wrapper.le(WalletAgentRecord::getPrepaidAmount, query.getPrepaidAmountMax());
+        }
+        if (query.getStatus() != null) {
+            wrapper.eq(WalletAgentRecord::getStatus, query.getStatus());
+        }
+        LocalDateTime startTime = parseDateTime(query.getStartTime());
+        LocalDateTime endTime = parseDateTime(query.getEndTime());
+        if (startTime != null) {
+            wrapper.ge(WalletAgentRecord::getCreateTime, startTime);
+        }
+        if (endTime != null) {
+            wrapper.le(WalletAgentRecord::getCreateTime, endTime);
+        }
+        wrapper.orderByDesc(WalletAgentRecord::getCreateTime, WalletAgentRecord::getId);
+
+        PageUtils.startPage(query);
+        List<WalletAgentRecord> list = walletAgentRecordMapper.selectList(wrapper);
+        if (CollectionUtils.isEmpty(list)) {
+            return pageInfo;
+        }
+
+        List<Long> agentIdList = list.stream().map(WalletAgentRecord::getAgentId).filter(Objects::nonNull).distinct().toList();
+        Map<Long, WalletAgent> agentMap = new HashMap<>();
+        if (!CollectionUtils.isEmpty(agentIdList)) {
+            List<WalletAgent> agents = baseMapper.selectList(Wrappers.lambdaQuery(WalletAgent.class).in(WalletAgent::getId, agentIdList).eq(WalletAgent::getDelFlag, 0));
+            if (!CollectionUtils.isEmpty(agents)) {
+                agentMap = agents.stream().collect(Collectors.toMap(WalletAgent::getId, e -> e, (a, b) -> a));
+            }
+        }
+        List<Long> tradeEntIdList = agentMap.values().stream()
+                .map(e -> proxy ? e.getSupEntId() : e.getAgtEntId())
+                .filter(Objects::nonNull)
+                .distinct()
+                .toList();
+        Map<Long, String> entNameMap = new HashMap<>();
+        if (!CollectionUtils.isEmpty(tradeEntIdList)) {
+            List<EntCacheResDto> entInfos = remoteSystemService.queryEntCacheByIds(tradeEntIdList);
+            if (!CollectionUtils.isEmpty(entInfos)) {
+                entNameMap = entInfos.stream().collect(Collectors.toMap(EntCacheResDto::getId, EntCacheResDto::getFirmName, (a, b) -> a));
+            }
+        }
+        Map<Long, WalletAgent> finalAgentMap = agentMap;
+        Map<Long, String> finalEntNameMap = entNameMap;
+
+        pageInfo = ((Page<WalletAgentRecord>) list).toPageInfo(e -> {
+            WalletAgentRecordRes res = new WalletAgentRecordRes();
+            BeanUtils.copyProperties(e, res);
+            res.setStatusDesc(PayStatusEnum.getByCode(e.getStatus()));
+            WalletAgent agent = finalAgentMap.get(e.getAgentId());
+            Long tradeEntId = agent == null ? null : (proxy ? agent.getSupEntId() : agent.getAgtEntId());
+            res.setTradeEntId(tradeEntId);
+            res.setTradeEntName(tradeEntId == null ? "" : finalEntNameMap.getOrDefault(tradeEntId, ""));
+            res.setCreateTime(toDate(e.getCreateTime()));
+            return res;
+        });
+        return pageInfo;
+    }
+
+    public BaseResult<Object> manualEntry(WalletAgentManualDto manualDto) {
+        if (!isProxyEnt()) {
+            return BaseResult.failed("非代理企业不可人工录入");
+        }
+        Long curEntId = LoginEntHolder.getEntId();
+        WalletAgent walletAgent = baseMapper.selectOne(Wrappers.lambdaQuery(WalletAgent.class)
+                .eq(WalletAgent::getDelFlag, 0)
+                .eq(WalletAgent::getAgtEntId, curEntId)
+                .eq(WalletAgent::getSupEntId, manualDto.getTradeEntId())
+                .last("limit 1"));
+        if (walletAgent == null) {
+            return BaseResult.failed("代理费清单不存在");
+        }
+        if (walletAgent.getPreBalance() == null || walletAgent.getPreBalance().compareTo(manualDto.getAmount()) < 0) {
+            return BaseResult.failed("金额不能大于待收代理费");
+        }
+
+        String orderNo = "M" + System.currentTimeMillis();
+
+        BigDecimal newPre = walletAgent.getPreBalance().subtract(manualDto.getAmount());
+        walletAgent.setPreBalance(newPre);
+        baseMapper.updateById(walletAgent);
+
+        WalletAgentBalance balance = new WalletAgentBalance();
+        balance.setOrderNo(orderNo);
+        balance.setOrderType(OrderTypeEnum.PAYMENT_ORDER.getCode());
+        balance.setAgtEntId(walletAgent.getAgtEntId());
+        balance.setSupEntId(walletAgent.getSupEntId());
+        balance.setTradeType(4);
+        balance.setTradeAmount(manualDto.getAmount());
+        balance.setPreBalance(newPre);
+        balance.setTradingAmount(walletAgent.getTradingAmount());
+        balance.setStatus(ExecutionStatusEnum.SUCCESS.getCode());
+        balance.setRemark(manualDto.getRemark());
+        balance.setDelFlag(0);
+        walletAgentBalanceMapper.insert(balance);
+
+        WalletAgentRecord record = new WalletAgentRecord();
+        record.setAgentId(walletAgent.getId());
+        record.setOrderNo(orderNo);
+        record.setPrepaidAmount(manualDto.getAmount());
+        record.setReceivedAmount(manualDto.getAmount());
+        record.setStatus(PayStatusEnum.PAID.getCode());
+        record.setData("");
+        record.setRemark(manualDto.getRemark());
+        record.setDelFlag(0);
+        walletAgentRecordMapper.insert(record);
+        return BaseResult.success();
+    }
+
+    public BaseResult<WalletPayAddRes> pay(WalletAgentPayDto payDto) {
+        if (isProxyEnt()) {
+            return BaseResult.failed("代理企业不可发起代理费付款");
+        }
+
+        WalletAgent walletAgent = baseMapper.selectById(payDto.getAgentId());
+        if (walletAgent == null || !Objects.equals(walletAgent.getDelFlag(), 0)) {
+            return BaseResult.failed("代理费清单不存在");
+        }
+        Long curEntId = LoginEntHolder.getEntId();
+        if (!Objects.equals(walletAgent.getSupEntId(), curEntId)) {
+            return BaseResult.failed("无权限发起付款");
+        }
+        if (walletAgent.getPreBalance() == null || walletAgent.getPreBalance().compareTo(payDto.getPayAmount()) < 0) {
+            return BaseResult.failed("付款金额不能大于待付代理费");
+        }
+
+        String orderNo = String.valueOf(System.currentTimeMillis());
+
+        PayDto payReq = new PayDto();
+        payReq.setUid(getUid(curEntId));
+        payReq.setFilter(getUid(walletAgent.getAgtEntId()));
+        payReq.setOrderNo(orderNo);
+        payReq.setAmt(payDto.getPayAmount().toString());
+        payReq.setNoticeUrl(applicationProperties.getCharge3());
+        payReq.setRemark(payDto.getRemark());
+
+        R<PayRes> pay;
+        try {
+            pay = payXwService.pay(payReq);
+            if (pay.getCode() != 200) {
+                throw new RuntimeException(pay.getMsg());
+            }
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+
+        WalletAgentRecord record = new WalletAgentRecord();
+        record.setAgentId(walletAgent.getId());
+        record.setOrderNo(orderNo);
+        record.setPrepaidAmount(payDto.getPayAmount());
+        record.setReceivedAmount(BigDecimal.ZERO);
+        record.setStatus(PayStatusEnum.PAYABLE.getCode());
+        record.setData(JSONObject.toJSONString(pay.getData()));
+        record.setRemark(payDto.getRemark());
+        record.setDelFlag(0);
+        walletAgentRecordMapper.insert(record);
+
+        BigDecimal newPre = walletAgent.getPreBalance().subtract(payDto.getPayAmount());
+        BigDecimal newTrading = (walletAgent.getTradingAmount() == null ? BigDecimal.ZERO : walletAgent.getTradingAmount()).add(payDto.getPayAmount());
+        walletAgent.setPreBalance(newPre);
+        walletAgent.setTradingAmount(newTrading);
+        baseMapper.updateById(walletAgent);
+
+        WalletAgentBalance balance = new WalletAgentBalance();
+        balance.setOrderNo(orderNo);
+        balance.setOrderType(OrderTypeEnum.PAYMENT_ORDER.getCode());
+        balance.setAgtEntId(walletAgent.getAgtEntId());
+        balance.setSupEntId(walletAgent.getSupEntId());
+        balance.setTradeType(2);
+        balance.setTradeAmount(payDto.getPayAmount());
+        balance.setPreBalance(newPre);
+        balance.setTradingAmount(newTrading);
+        balance.setStatus(ExecutionStatusEnum.IN_PROGRESS.getCode());
+        balance.setRemark(payDto.getRemark());
+        balance.setDelFlag(0);
+        walletAgentBalanceMapper.insert(balance);
+
+        WalletPayAddRes walletPayAddRes = new WalletPayAddRes();
+        PayRes data = pay.getData();
+        walletPayAddRes.setId(record.getId());
+        walletPayAddRes.setOrderNo(data.getOrderNo());
+        walletPayAddRes.setSettleAcctName(data.getFullName());
+        walletPayAddRes.setSettleAcctNo(data.getSettleAcct());
+        walletPayAddRes.setAmount(new BigDecimal(data.getAmt()));
+        walletPayAddRes.setBankName("新网银行");
+        return BaseResult.success(walletPayAddRes);
+    }
+
+    public BaseResult<WalletPayAddRes> getPayInfo(Long id) {
+        WalletAgentRecord record = walletAgentRecordMapper.selectById(id);
+        if (record == null || !Objects.equals(record.getDelFlag(), 0)) {
+            return BaseResult.failed("支付记录不存在");
+        }
+        if (!StringUtils.hasText(record.getData())) {
+            return BaseResult.failed("该记录无付款信息");
+        }
+        WalletAgent walletAgent = baseMapper.selectById(record.getAgentId());
+        if (walletAgent == null || !Objects.equals(walletAgent.getDelFlag(), 0)) {
+            return BaseResult.failed("代理费清单不存在");
+        }
+        Long curEntId = LoginEntHolder.getEntId();
+        if (!Objects.equals(walletAgent.getSupEntId(), curEntId) && !Objects.equals(walletAgent.getAgtEntId(), curEntId)) {
+            return BaseResult.failed("无权限查看付款信息");
+        }
+        WalletPayAddRes walletPayAddRes = new WalletPayAddRes();
+        PayRes data = JSONObject.parseObject(record.getData(), PayRes.class);
+        walletPayAddRes.setId(record.getId());
+        walletPayAddRes.setOrderNo(data.getOrderNo());
+        walletPayAddRes.setSettleAcctName(data.getFullName());
+        walletPayAddRes.setSettleAcctNo(data.getSettleAcct());
+        walletPayAddRes.setAmount(new BigDecimal(data.getAmt()));
+        walletPayAddRes.setBankName("新网银行");
+        return BaseResult.success(walletPayAddRes);
+    }
+
+    public void receivedCallback(ReceivedCallbackDto receivedCallbackDto) {
+        WalletAgentRecord record = walletAgentRecordMapper.selectOne(Wrappers.lambdaQuery(WalletAgentRecord.class)
+                .eq(WalletAgentRecord::getOrderNo, receivedCallbackDto.getPayOrderNo())
+                .eq(WalletAgentRecord::getDelFlag, 0)
+                .last("limit 1"));
+        if (record == null) {
+            throw new BusinessException("支付记录不存在");
+        }
+
+        Long userId = LoginUserHolder.getUserId();
+        LocalDateTime now = LocalDateTime.now();
+
+        record.setReceivedAmount(receivedCallbackDto.getTranAmt());
+        record.setStatus(PayStatusEnum.PAID.getCode());
+        record.setUpdateBy(userId);
+        record.setUpdateTime(now);
+        walletAgentRecordMapper.updateById(record);
+
+        WalletAgent walletAgent = baseMapper.selectById(record.getAgentId());
+        if (walletAgent != null && Objects.equals(walletAgent.getDelFlag(), 0)) {
+            BigDecimal newTrading = (walletAgent.getTradingAmount() == null ? BigDecimal.ZERO : walletAgent.getTradingAmount()).subtract(receivedCallbackDto.getTranAmt());
+            walletAgent.setTradingAmount(newTrading.compareTo(BigDecimal.ZERO) < 0 ? BigDecimal.ZERO : newTrading);
+            walletAgent.setUpdateBy(userId);
+            walletAgent.setUpdateTime(now);
+            baseMapper.updateById(walletAgent);
+
+            WalletAgentBalance update = new WalletAgentBalance();
+            update.setStatus(ExecutionStatusEnum.SUCCESS.getCode());
+            update.setUpdateBy(userId);
+            update.setUpdateTime(now);
+            walletAgentBalanceMapper.update(update, Wrappers.lambdaQuery(WalletAgentBalance.class)
+                    .eq(WalletAgentBalance::getOrderNo, record.getOrderNo())
+                    .eq(WalletAgentBalance::getDelFlag, 0)
+                    .eq(WalletAgentBalance::getTradeType, 2));
+
+            WalletAgentBalance balance = new WalletAgentBalance();
+            balance.setOrderNo(record.getOrderNo());
+            balance.setOrderType(OrderTypeEnum.PAYMENT_ORDER.getCode());
+            balance.setAgtEntId(walletAgent.getAgtEntId());
+            balance.setSupEntId(walletAgent.getSupEntId());
+            balance.setTradeType(3);
+            balance.setTradeAmount(receivedCallbackDto.getTranAmt());
+            balance.setPreBalance(walletAgent.getPreBalance());
+            balance.setTradingAmount(walletAgent.getTradingAmount());
+            balance.setStatus(ExecutionStatusEnum.SUCCESS.getCode());
+            balance.setRemark(record.getRemark());
+            balance.setCreateBy(userId);
+            balance.setCreateTime(now);
+            balance.setUpdateBy(userId);
+            balance.setUpdateTime(now);
+            balance.setDelFlag(0);
+            walletAgentBalanceMapper.insert(balance);
+        }
+    }
+
+    private boolean isProxyEnt() {
+        String entTypes = LoginEntHolder.get().getEntTypes();
+        return entTypes != null && entTypes.contains(String.valueOf(EntTypeEnum.PROXY.getCode()));
+    }
+
+    private static String getAgentTradeTypeDesc(Integer tradeType) {
+        if (tradeType == null) {
+            return "";
+        }
+        return switch (tradeType) {
+            case 1 -> "消费";
+            case 2 -> "申请付款";
+            case 3 -> "付款成功";
+            case 4 -> "人工录入";
+            default -> "";
+        };
+    }
+
+    private List<Long> resolveAgentIds(Long curEntId, boolean proxy, Long tradeEntId, String tradeEntName) {
+        LambdaQueryWrapper<WalletAgent> agentWrapper = Wrappers.lambdaQuery(WalletAgent.class)
+                .select(WalletAgent::getId)
+                .eq(WalletAgent::getDelFlag, 0)
+                .eq(proxy ? WalletAgent::getAgtEntId : WalletAgent::getSupEntId, curEntId);
+
+        if (tradeEntId != null) {
+            agentWrapper.eq(proxy ? WalletAgent::getSupEntId : WalletAgent::getAgtEntId, tradeEntId);
+        } else if (StringUtils.hasText(tradeEntName)) {
+            List<EntCacheResDto> entCacheResDtos = remoteSystemService.queryEntCacheByName(tradeEntName);
+            if (CollectionUtils.isEmpty(entCacheResDtos)) {
+                return new ArrayList<>();
+            }
+            List<Long> ids = entCacheResDtos.stream().map(EntCacheResDto::getId).distinct().toList();
+            agentWrapper.in(proxy ? WalletAgent::getSupEntId : WalletAgent::getAgtEntId, ids);
+        }
+        List<WalletAgent> agents = baseMapper.selectList(agentWrapper);
+        if (CollectionUtils.isEmpty(agents)) {
+            return new ArrayList<>();
+        }
+        return agents.stream().map(WalletAgent::getId).filter(Objects::nonNull).toList();
+    }
+
+    private String getUid(Long entId) {
+        if (Objects.isNull(entId)) {
+            return null;
+        }
+        KwpWallet kwpWallet = kwpWalletMapper.selectOne(Wrappers.lambdaQuery(KwpWallet.class)
+                .eq(KwpWallet::getEntId, entId)
+                .eq(KwpWallet::getStatus, 2)
+                .eq(KwpWallet::getDelFlag, 0)
+                .last("limit 1"));
+        if (Objects.isNull(kwpWallet)) {
+            return null;
+        }
+        return kwpWallet.getUid();
+    }
+
+    private static LocalDateTime parseDateTime(String time) {
+        if (!StringUtils.hasText(time)) {
+            return null;
+        }
+        try {
+            return LocalDateTime.parse(time, DATE_TIME_FORMATTER);
+        } catch (Exception ignored) {
+            return null;
+        }
+    }
+
+    private static Date toDate(LocalDateTime localDateTime) {
+        if (localDateTime == null) {
+            return null;
+        }
+        return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
+    }
+
+    public BaseResult<List<WalletAgentRecordRes>> getPayList(Long agentId) {
+        if (agentId == null) {
+            return BaseResult.success(new ArrayList<>());
+        }
+        WalletAgent walletAgent = baseMapper.selectById(agentId);
+        if (walletAgent == null || !Objects.equals(walletAgent.getDelFlag(), 0)) {
+            return BaseResult.success(new ArrayList<>());
+        }
+        Long curEntId = LoginEntHolder.getEntId();
+        if (!Objects.equals(walletAgent.getSupEntId(), curEntId) && !Objects.equals(walletAgent.getAgtEntId(), curEntId)) {
+            return BaseResult.failed("无权限查看该支付记录");
+        }
+
+        LambdaQueryWrapper<WalletAgentRecord> wrapper = Wrappers.lambdaQuery(WalletAgentRecord.class)
+                .eq(WalletAgentRecord::getDelFlag, 0)
+                .eq(WalletAgentRecord::getAgentId, agentId)
+                .orderByDesc(WalletAgentRecord::getId);
+        List<WalletAgentRecord> list = walletAgentRecordMapper.selectList(wrapper);
+        if (CollectionUtils.isEmpty(list)) {
+            return BaseResult.success(new ArrayList<>());
+        }
+
+        boolean proxy = isProxyEnt();
+        Long tradeEntId = proxy ? walletAgent.getSupEntId() : walletAgent.getAgtEntId();
+        String tradeEntName = "";
+        if (tradeEntId != null) {
+            EntCacheResDto entCacheResDto = remoteSystemService.queryEntCacheById(tradeEntId);
+            tradeEntName = entCacheResDto == null ? "" : entCacheResDto.getFirmName();
+        }
+        String finalTradeEntName = tradeEntName;
+
+        List<WalletAgentRecordRes> resList = list.stream().map(e -> {
+            WalletAgentRecordRes res = new WalletAgentRecordRes();
+            BeanUtils.copyProperties(e, res);
+            res.setStatusDesc(PayStatusEnum.getByCode(e.getStatus()));
+            res.setCreateTime(toDate(e.getCreateTime()));
+            res.setTradeEntId(tradeEntId);
+            res.setTradeEntName(finalTradeEntName);
+            return res;
+        }).toList();
+
+        return BaseResult.success(resList);
+    }
+}

+ 3 - 1
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletPayableBalanceServiceImpl.java

@@ -15,6 +15,7 @@ import com.sckw.payment.pojo.vo.res.WalletPayableBalanceRes;
 import com.sckw.payment.service.IWalletPayableBalanceService;
 import com.sckw.system.api.RemoteSystemService;
 import com.sckw.system.api.model.dto.res.EntCacheResDto;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -31,6 +32,7 @@ import java.util.stream.Collectors;
  * @author tangys
  * @since  2026-01-12 16:24:22
  */
+@Slf4j
 @Service
 public class WalletPayableBalanceServiceImpl implements IWalletPayableBalanceService {
 
@@ -43,7 +45,7 @@ public class WalletPayableBalanceServiceImpl implements IWalletPayableBalanceSer
     @Override
     public PageInfo<WalletPayableBalanceRes> selectWalletPayableBalanceList(WalletPayableBalanceQuery query) {
         PageInfo<WalletPayableBalanceRes> pageInfo = new PageInfo<>(new ArrayList<>());
-        query.setCurEntId(LoginUserHolder.getUserId());
+        query.setCurEntId(LoginUserHolder.getEntId());
         PageUtils.startPage(query);
         List<WalletPayableBalance> payableBalances = walletPayableBalanceMapper.selectWalletPayableBalanceList(query);
         if(!CollectionUtils.isEmpty(payableBalances)){

+ 113 - 37
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletPayableServiceImpl.java

@@ -1,34 +1,48 @@
 package com.sckw.payment.service.impl;
 
+import cn.hutool.core.util.IdUtil;
 import com.alibaba.fastjson2.JSONObject;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.pagehelper.Page;
 import com.github.pagehelper.PageInfo;
+import com.google.common.collect.Lists;
 import com.sckw.core.exception.BusinessException;
+import com.sckw.core.model.vo.FileInfoVO;
 import com.sckw.core.utils.PageUtils;
+import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.context.LoginUserHolder;
 import com.sckw.core.web.response.BaseResult;
+import com.sckw.file.api.dubbo.RemoteFileService;
+import com.sckw.payment.api.model.dto.common.R;
+import com.sckw.payment.config.ApplicationProperties;
 import com.sckw.payment.entity.*;
 import com.sckw.payment.enums.ExecutionStatusEnum;
 import com.sckw.payment.enums.OrderTypeEnum;
 import com.sckw.payment.enums.PayStatusEnum;
 import com.sckw.payment.enums.TransactionTypeEnum;
 import com.sckw.payment.mapper.*;
+import com.sckw.payment.pojo.dto.CustomSettleDto;
+import com.sckw.payment.pojo.dto.CustomSettleRes;
+import com.sckw.payment.pojo.dto.DivideDto;
 import com.sckw.payment.pojo.vo.PayRes;
 import com.sckw.payment.pojo.vo.req.*;
 import com.sckw.payment.pojo.vo.res.*;
 import com.sckw.payment.service.IWalletPayableService;
+import com.sckw.payment.service.PayXwService;
 import com.sckw.system.api.RemoteSystemService;
 import com.sckw.system.api.model.dto.res.EntCacheResDto;
+import jakarta.annotation.Resource;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
+import org.springframework.web.multipart.MultipartFile;
 
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -39,9 +53,9 @@ import java.util.stream.Collectors;
  * @author tangys
  * @since 2026-01-06 11:03:35
  */
+@Slf4j
 @Service
 public class WalletPayableServiceImpl implements IWalletPayableService {
-    private static final Logger logger = LoggerFactory.getLogger(WalletPayableServiceImpl.class);
 
     @Autowired
     private WalletPayableMapper walletPayableMapper;
@@ -49,20 +63,27 @@ public class WalletPayableServiceImpl implements IWalletPayableService {
     private WalletPayableBalanceMapper walletPayableBalanceMapper;
     @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 8000)
     private RemoteSystemService remoteSystemService;
-
+    @DubboReference(version = "1.0.0", group = "design", check = false)
+    private RemoteFileService remoteFileService;
     @Autowired
     private WalletBusinessFileMapper businessFileMapper;
-
+    @Resource
+    private ApplicationProperties applicationProperties;
+    @Resource
+    private KwpWalletSplitMapper kwpWalletSplitMapper;
     @Autowired
     private WalletPayableApplyMapper walletPayableApplyMapper;
-
+    @Resource
+    private PayXwService payXwService;
     @Autowired
     private WalletPayablePayMapper walletPayablePayMapper;
+    @Autowired
+    private KwpWalletMapper kwpWalletMapper;
 
     @Override
     public PageInfo<WalletPayableRes> selectWalletPayableList(WalletPayableQuery query) {
         PageInfo<WalletPayableRes> pageInfo = new PageInfo<>(new ArrayList<>());
-        query.setCurEntId(LoginUserHolder.getUserId());
+        query.setCurEntId(LoginUserHolder.getEntId());
         PageUtils.startPage(query);
         List<WalletPayable> walletPayables = walletPayableMapper.selectWalletPayableList(query);
         if (!CollectionUtils.isEmpty(walletPayables)) {
@@ -75,7 +96,7 @@ public class WalletPayableServiceImpl implements IWalletPayableService {
             }).toList();
             List<EntCacheResDto> entInfos = remoteSystemService.queryEntCacheByIds(tradeEntIdList);
             Map<Long, String> entNameMap;
-            if(!CollectionUtils.isEmpty(entInfos)){
+            if (!CollectionUtils.isEmpty(entInfos)) {
                 entNameMap = entInfos.stream().collect(Collectors.toMap(EntCacheResDto::getId, EntCacheResDto::getFirmName));
             } else {
                 entNameMap = new HashMap<>();
@@ -122,7 +143,7 @@ public class WalletPayableServiceImpl implements IWalletPayableService {
 
     private int manualEntryFreight(WalletPayable payable, WalletPayableManualDto payableManualDto) {
         // 查询是否存在待待付/代收运费
-        WalletPayable existedPayable = walletPayableMapper.selectByConsignAndCarrier(payableManualDto.getTradeEntId(), LoginUserHolder.get().getEntId());
+        WalletPayable existedPayable = walletPayableMapper.selectByConsignAndCarrier(payableManualDto.getTradeEntId(), LoginUserHolder.getEntId());
         int result = 0;
         if (existedPayable != null) {
             // 如果存在,则更新待待付/代收运费
@@ -140,7 +161,7 @@ public class WalletPayableServiceImpl implements IWalletPayableService {
             if (Objects.equals(payableManualDto.getFreightType(), 1)) {
                 //待付/代收运费
                 payable.setConsignEntId(payableManualDto.getTradeEntId());
-                payable.setCarrierEntId(LoginUserHolder.get().getEntId());
+                payable.setCarrierEntId(LoginUserHolder.getEntId());
                 payable.setFreight(payableManualDto.getTradeAmount());
                 payable.setTradingFreight(BigDecimal.ZERO);
                 payable.setPayingFreight(BigDecimal.ZERO);
@@ -152,10 +173,10 @@ public class WalletPayableServiceImpl implements IWalletPayableService {
 
     private WalletPayableBalance buildWalletManualPayableBalance(WalletPayable payable, WalletPayableManualDto payableManualDto) {
         WalletPayableBalance payableBalance = new WalletPayableBalance();
-        payableBalance.setOrderNo("f" + System.currentTimeMillis());
+        payableBalance.setOrderNo(IdUtil.getSnowflakeNextIdStr());
         payableBalance.setOrderType(OrderTypeEnum.PAYMENT_ORDER.getCode());
         payableBalance.setConsignEntId(payableManualDto.getTradeEntId());
-        payableBalance.setCarrierEntId(LoginUserHolder.get().getEntId());
+        payableBalance.setCarrierEntId(LoginUserHolder.getEntId());
         payableBalance.setTradeType(TransactionTypeEnum.MANUAL_ENTRY.getCode());
         payableBalance.setTradeAmount(payableManualDto.getTradeAmount());
         payableBalance.setFreight(payable.getFreight());
@@ -198,7 +219,7 @@ public class WalletPayableServiceImpl implements IWalletPayableService {
         //待付运费清单处理
         if (Objects.equals(payableUpdateDto.getTradeType(), TransactionTypeEnum.FREEZE.getCode())) {
             //冻结
-            if(payableUpdateDto.getTradeAmount() == null){
+            if (payableUpdateDto.getTradeAmount() == null) {
                 throw new BusinessException("交易金额不能为空");
             }
             existedPayable.setTradingFreight(existedPayable.getTradingFreight().add(payableUpdateDto.getTradeAmount()));
@@ -214,7 +235,7 @@ public class WalletPayableServiceImpl implements IWalletPayableService {
             payableUpdateDto.setTradeAmount(payableBalance.getTradeAmount());
         } else if (Objects.equals(payableUpdateDto.getTradeType(), TransactionTypeEnum.CONSUME.getCode())) {
             //消费
-            if(payableUpdateDto.getTradeAmount() == null){
+            if (payableUpdateDto.getTradeAmount() == null) {
                 throw new BusinessException("交易金额不能为空");
             }
             existedPayable.setFreight(existedPayable.getFreight().add(payableUpdateDto.getTradeAmount()));
@@ -288,7 +309,7 @@ public class WalletPayableServiceImpl implements IWalletPayableService {
     private WalletPayableApply buildWalletPayableApply(WalletPayable payable, WalletPayableApplyPayDto applyPayDto) {
         WalletPayableApply apply = new WalletPayableApply();
         apply.setPayableId(payable.getId());
-        apply.setOrderNo("f" + System.currentTimeMillis());
+        apply.setOrderNo(IdUtil.getSnowflakeNextIdStr());
         apply.setApplyAmount(applyPayDto.getApplyAmount());
         apply.setRemark(applyPayDto.getRemark());
         return apply;
@@ -343,7 +364,7 @@ public class WalletPayableServiceImpl implements IWalletPayableService {
             pageInfo = ((Page<WalletPayablePay>) payablePays).toPageInfo(e -> {
                 WalletPayablePayRes freightRecordRes = new WalletPayablePayRes();
                 BeanUtils.copyProperties(e, freightRecordRes);
-                freightRecordRes.setStatusDesc(PayStatusEnum.getByCode(e.getStatus()).getName());
+                freightRecordRes.setStatusDesc(PayStatusEnum.getByCode(e.getStatus()));
                 return freightRecordRes;
             });
         }
@@ -363,22 +384,18 @@ public class WalletPayableServiceImpl implements IWalletPayableService {
         walletPayAddRes.setSettleAcctNo(data.getSettleAcct());
         walletPayAddRes.setAmount(new BigDecimal(data.getAmt()));
         walletPayAddRes.setBankName("新网银行");
-        return BaseResult.success(generateWalletPayAddRes(payablePay));
+        return BaseResult.success(walletPayAddRes);
     }
 
-
-    private WalletPayAddRes generateWalletPayAddRes(WalletPayablePay walletPayablePay) {
-        //todo 获取打款账户信息
-        //根据供应商企业id查询银行账户信息
-//        Long supEntId = prepaid.getSupEntId();
-
-        WalletPayAddRes res = new WalletPayAddRes();
-        res.setOrderNo(walletPayablePay.getOrderNo());
-        res.setSettleAcctName("xxx");
-        res.setSettleAcctNo("xxx");
-        res.setAmount(walletPayablePay.getApplyAmount());
-        res.setBankName("xxx");
-        return res;
+    private String getUid(Long id) {
+        if (Objects.isNull(id)) {
+            return null;
+        }
+        KwpWallet kwpWallet = kwpWalletMapper.selectOne(Wrappers.lambdaQuery(KwpWallet.class).eq(KwpWallet::getEntId, id).eq(KwpWallet::getStatus, 2).eq(KwpWallet::getDelFlag, 0));
+        if (Objects.isNull(kwpWallet)) {
+            return null;
+        }
+        return kwpWallet.getUid();
     }
 
     //构建支付记录
@@ -386,25 +403,85 @@ public class WalletPayableServiceImpl implements IWalletPayableService {
         WalletPayablePay payablePay = new WalletPayablePay();
         payablePay.setPayableId(payableApply.getPayableId());
         payablePay.setApplyOrderNo(payableApply.getOrderNo());
-        payablePay.setOrderNo("f" + System.currentTimeMillis());
+        payablePay.setOrderNo(IdUtil.getSnowflakeNextIdStr());
         payablePay.setApplyAmount(payableApply.getApplyAmount().subtract(payableApply.getPayingAmount().add(payableApply.getReceivedAmount())));
         payablePay.setReceivedAmount(BigDecimal.ZERO);
         return payablePay;
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public void receivedCallback(ReceivedCallbackDto receivedCallbackDto) {
-        //1.todo 修改在线钱包金额
-        //2.todo 插入在线钱包明细
-        //3.修改支付记录到账金额和状态
+        log.info("运费到账回调接口 {}", JSONObject.toJSONString(receivedCallbackDto));
         WalletPayablePay walletPayablePay = walletPayablePayMapper.selectWalletPayablePayByOrderNo(receivedCallbackDto.getPayOrderNo());
         if (walletPayablePay == null) {
-            throw new BusinessException("支付记录不存在");
+            throw new BusinessException("运费支付记录不存在");
         }
         walletPayablePay.setReceivedAmount(receivedCallbackDto.getTranAmt());
         walletPayablePay.setStatus(1);
         walletPayablePayMapper.updateWalletPayablePay(walletPayablePay);
-        //4.修改申请记录支付中=0,到账金额,判断申请金额是否等于到账金额,等于则修改状态为已完成
+
+        WalletPayable walletPayable = walletPayableMapper.selectById(walletPayablePay.getPayableId());
+
+        CustomSettleDto customSettleDto = new CustomSettleDto();
+
+        KwpWalletSplit kwpWalletSplit = new KwpWalletSplit();
+        try {
+            // 新增清分订单,清分成功后,增加可提现余额
+            customSettleDto.setUid(getUid(walletPayable.getConsignEntId()));
+            customSettleDto.setAmt(String.valueOf(receivedCallbackDto.getTranAmt()));
+            customSettleDto.setMchtFee("0.00");
+            customSettleDto.setNoticeUrl(applicationProperties.getSplit());
+            customSettleDto.setSummery("");
+            customSettleDto.setRemark("清分");
+            DivideDto divideDto = new DivideDto();
+            divideDto.setAmt(String.valueOf(receivedCallbackDto.getTranAmt()));
+            divideDto.setFilter(getUid(walletPayable.getCarrierEntId()));
+            customSettleDto.setDivide(Lists.newArrayList(divideDto));
+
+            R<CustomSettleRes> split = payXwService.split(customSettleDto);
+            kwpWalletSplit.setStatus(1);
+            if (split.getCode() != 200) {
+                log.error("清分失败 {}", JSONObject.toJSONString(split));
+                kwpWalletSplit.setStatus(3);
+            }
+            CustomSettleRes data = split.getData();
+            kwpWalletSplit.setFromEnt(walletPayable.getConsignEntId());
+            kwpWalletSplit.setToEnt(walletPayable.getCarrierEntId());
+            kwpWalletSplit.setPayOrderNo(receivedCallbackDto.getPayOrderNo());
+            kwpWalletSplit.setOrderNo(Objects.nonNull(data) ? data.getTxnNo() : "-");
+            kwpWalletSplit.setAction(1);
+            kwpWalletSplit.setMoney(receivedCallbackDto.getTranAmt());
+            kwpWalletSplit.setRemark("");
+            kwpWalletSplit.setCreateBy(LoginUserHolder.getUserId());
+            kwpWalletSplit.setCreateTime(LocalDateTime.now());
+            kwpWalletSplit.setUpdateBy(LoginUserHolder.getUserId());
+            kwpWalletSplit.setUpdateTime(LocalDateTime.now());
+            kwpWalletSplit.setDelFlag(0);
+        } catch (Exception e) {
+            log.error("清分异常 {} 异常信息 {}", JSONObject.toJSONString(customSettleDto), e.getMessage());
+        } finally {
+            kwpWalletSplitMapper.insert(kwpWalletSplit);
+        }
+
+        WalletBusinessFile walletBusinessFile = new WalletBusinessFile();
+        try {
+            walletBusinessFile.setBusinessId(walletPayablePay.getId());
+            walletBusinessFile.setRemark("");
+            walletBusinessFile.setStatus(0);
+            walletBusinessFile.setDelFlag(0);
+            MultipartFile file = receivedCallbackDto.getFile();
+            BaseResult<FileInfoVO> httpResult = remoteFileService.fileUpload(file);
+            if (HttpStatus.SUCCESS_CODE == httpResult.getCode()) {
+                FileInfoVO data = httpResult.getData();
+                walletBusinessFile.setFilePath(Objects.nonNull(data) ? data.getFileAbsolutePath() : "");
+            }
+        } catch (Exception e) {
+            log.error("支付凭证文件写入异常 {}", e.getMessage());
+        } finally {
+            businessFileMapper.insert(walletBusinessFile);
+        }
+
         WalletPayableApply payableApply = walletPayableApplyMapper.selectWalletPayableApplyByOrderNo(walletPayablePay.getApplyOrderNo());
         payableApply.setPayingAmount(BigDecimal.ZERO);
         payableApply.setReceivedAmount(payableApply.getReceivedAmount().add(receivedCallbackDto.getTranAmt()));
@@ -413,7 +490,6 @@ public class WalletPayableServiceImpl implements IWalletPayableService {
         }
         walletPayableApplyMapper.updateWalletPayableApply(payableApply);
         //5.运费清单付款中金额扣减
-        WalletPayable walletPayable = walletPayableMapper.selectWalletPayableById(walletPayablePay.getPayableId());
         walletPayable.setPayingFreight(walletPayable.getPayingFreight().subtract(receivedCallbackDto.getTranAmt()));
         walletPayableMapper.updateWalletPayable(walletPayable);
         //6.运费明细插入记录

+ 2 - 7
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletPrepaidBalanceServiceImpl.java

@@ -10,16 +10,14 @@ import com.sckw.core.web.context.LoginUserHolder;
 import com.sckw.payment.entity.WalletPrepaidBalance;
 import com.sckw.payment.enums.ExecutionStatusEnum;
 import com.sckw.payment.enums.TransactionTypeEnum;
-import com.sckw.payment.mapper.WalletBusinessFileMapper;
 import com.sckw.payment.mapper.WalletPrepaidBalanceMapper;
 import com.sckw.payment.pojo.vo.req.WalletPrepaidBalanceQuery;
 import com.sckw.payment.pojo.vo.res.WalletPrepaidBalanceRes;
 import com.sckw.payment.service.IWalletPrepaidBalanceService;
 import com.sckw.system.api.RemoteSystemService;
 import com.sckw.system.api.model.dto.res.EntCacheResDto;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -34,18 +32,15 @@ import java.util.stream.Collectors;
  * @author tangys
  * @since  2026-01-12 16:24:22
  */
+@Slf4j
 @Service
 public class WalletPrepaidBalanceServiceImpl implements IWalletPrepaidBalanceService {
-    private static final Logger logger = LoggerFactory.getLogger(WalletPrepaidBalanceServiceImpl.class);
 
     @Autowired
     private WalletPrepaidBalanceMapper walletPrepaidBalanceMapper;
     @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 8000)
     private RemoteSystemService remoteSystemService;
 
-    @Autowired
-    private WalletBusinessFileMapper businessFileMapper;
-
     @Override
     public PageInfo<WalletPrepaidBalanceRes> selectWalletPrepaidBalanceList(WalletPrepaidBalanceQuery query) {
         PageInfo<WalletPrepaidBalanceRes> pageInfo = new PageInfo<>(new ArrayList<>());

+ 40 - 68
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletPrepaidServiceImpl.java

@@ -8,17 +8,20 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.pagehelper.Page;
 import com.github.pagehelper.PageInfo;
 import com.google.common.collect.Lists;
-
 import com.sckw.contract.api.RemoteContractService;
 import com.sckw.contract.api.model.dto.req.TradeEntListQueryFeignDto;
 import com.sckw.contract.api.model.dto.res.TradeEntInfoResVo;
 import com.sckw.core.exception.BusinessException;
 import com.sckw.core.model.enums.EntTypeEnum;
+import com.sckw.core.model.vo.FileInfoVO;
 import com.sckw.core.utils.PageUtils;
+import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.context.LoginEntHolder;
 import com.sckw.core.web.context.LoginUserHolder;
 import com.sckw.core.web.response.BaseResult;
+import com.sckw.file.api.dubbo.RemoteFileService;
 import com.sckw.payment.api.model.dto.common.R;
+import com.sckw.payment.config.ApplicationProperties;
 import com.sckw.payment.entity.*;
 import com.sckw.payment.enums.ExecutionStatusEnum;
 import com.sckw.payment.enums.OrderTypeEnum;
@@ -44,14 +47,13 @@ import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
+import org.springframework.web.multipart.MultipartFile;
 
 import java.io.IOException;
 import java.math.BigDecimal;
@@ -70,13 +72,13 @@ import java.util.stream.Collectors;
 @Slf4j
 @Service
 public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
-    private static final Logger logger = LoggerFactory.getLogger(WalletPrepaidServiceImpl.class);
 
     @Autowired
     private WalletPrepaidMapper walletPrepaidMapper;
     @DubboReference(version = "1.0.0", group = "design", check = false)
     private RemoteSystemService remoteSystemService;
-
+    @DubboReference(version = "1.0.0", group = "design", check = false)
+    private RemoteFileService remoteFileService;
     @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 8000)
     private RemoteContractService remoteContractService;
     @Autowired
@@ -89,7 +91,8 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
     private KwpWalletMapper kwpWalletMapper;
     @Resource
     private KwpWalletSplitMapper kwpWalletSplitMapper;
-
+    @Resource
+    private ApplicationProperties applicationProperties;
     @Autowired
     private WalletPrepaidRecordMapper walletPrepaidRecordMapper;
     @Qualifier("walletPrepaidBalanceMapper")
@@ -99,7 +102,7 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
     @Override
     public PageInfo<WalletPrepaidRes> selectWalletPrepaidList(WalletPrepaidQuery query) {
         PageInfo<WalletPrepaidRes> pageInfo = new PageInfo<>(new ArrayList<>());
-        query.setCurEntId(LoginUserHolder.get().getEntId());
+        query.setCurEntId(LoginUserHolder.getEntId());
         PageUtils.startPage(query);
         List<WalletPrepaid> walletPrepaids = walletPrepaidMapper.selectWalletPrepaidList(query);
         if (!CollectionUtils.isEmpty(walletPrepaids)) {
@@ -159,12 +162,12 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
     }
 
     public WalletPrepaid queryPrepaidBalance(Long supEntId) {
-        return walletPrepaidMapper.selectByProEntIdAndSupEntId(LoginUserHolder.get().getEntId(), supEntId);
+        return walletPrepaidMapper.selectByProEntIdAndSupEntId(LoginUserHolder.getEntId(), supEntId);
     }
 
     private int manualEntryPrepaid(WalletPrepaid walletPrepaid, WalletPrepaidManualDto manualEntryDto) {
         // 查询是否存在待履约/预付数据
-        WalletPrepaid existedPrepaid = walletPrepaidMapper.selectByProEntIdAndSupEntId(manualEntryDto.getTradeEntId(), LoginUserHolder.get().getEntId());
+        WalletPrepaid existedPrepaid = walletPrepaidMapper.selectByProEntIdAndSupEntId(manualEntryDto.getTradeEntId(), LoginUserHolder.getEntId());
         int result;
         if (existedPrepaid != null) {
             // 如果存在,则更新待履约/预付金额
@@ -173,7 +176,7 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
             BeanUtils.copyProperties(existedPrepaid, walletPrepaid);
         } else {
             // 如果不存在,则新增一条待履约/预付数据
-            walletPrepaid.setSupEntId(LoginUserHolder.get().getEntId());
+            walletPrepaid.setSupEntId(LoginUserHolder.getEntId());
             walletPrepaid.setProEntId(manualEntryDto.getTradeEntId());
             walletPrepaid.setPreBalance(manualEntryDto.getTradeAmount());
             result = walletPrepaidMapper.insertWalletPrepaid(walletPrepaid);
@@ -186,7 +189,7 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
         WalletPrepaidBalance prepaidBalance = new WalletPrepaidBalance();
         prepaidBalance.setOrderNo("p" + System.currentTimeMillis());
         prepaidBalance.setOrderType(OrderTypeEnum.PREPAYMENT_ORDER.getCode());
-        prepaidBalance.setSupEntId(LoginUserHolder.get().getEntId());
+        prepaidBalance.setSupEntId(LoginUserHolder.getEntId());
         prepaidBalance.setProEntId(manualEntryDto.getTradeEntId());
         prepaidBalance.setTradeType(TransactionTypeEnum.MANUAL_ENTRY.getCode());
         prepaidBalance.setTradeAmount(manualEntryDto.getTradeAmount());
@@ -199,10 +202,6 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
         return prepaidBalance;
     }
 
-    @Override
-    public WalletPrepaid selectWalletPrepaidById(Long id) {
-        return walletPrepaidMapper.selectWalletPrepaidById(id);
-    }
 
     @Override
     public List<WalletPrepaid> selectWalletPrepaidByIds(List<Long> idList) {
@@ -213,45 +212,6 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
         return walletPrepaidMapper.selectWalletPrepaidByIds(idList);
     }
 
-    @Override
-    public Map<Long, WalletPrepaid> mapWalletPrepaidByIds(List<Long> idList) {
-        List<WalletPrepaid> list = selectWalletPrepaidByIds(idList);
-        return Optional.ofNullable(list).orElse(Collections.emptyList()).stream().collect(Collectors.toMap(WalletPrepaid::getId, WalletPrepaid -> WalletPrepaid));
-    }
-
-    @Transactional(rollbackFor = Exception.class)
-    @Override
-    public int insertWalletPrepaid(WalletPrepaid walletPrepaid) {
-        return walletPrepaidMapper.insertWalletPrepaid(walletPrepaid);
-    }
-
-    @Transactional(rollbackFor = Exception.class)
-    @Override
-    public int updateWalletPrepaid(WalletPrepaid walletPrepaid) {
-        return walletPrepaidMapper.updateWalletPrepaid(walletPrepaid);
-    }
-
-    @Transactional(rollbackFor = Exception.class)
-    @Override
-    public int deleteWalletPrepaidById(Long id) {
-        return walletPrepaidMapper.deleteWalletPrepaidById(id);
-    }
-
-    @Transactional(rollbackFor = Exception.class)
-    @Override
-    public int deleteWalletPrepaidByIds(List<Long> idList) {
-        if (CollectionUtils.isEmpty(idList)) {
-            return 0;
-        }
-        return walletPrepaidMapper.deleteWalletPrepaidByIds(idList);
-    }
-
-    @Transactional(rollbackFor = Exception.class)
-    @Override
-    public int deleteWalletPrepaidLogicByIds(List<Long> idList) {
-        return walletPrepaidMapper.deleteWalletPrepaidLogicByIds(idList, LoginUserHolder.get().getId());
-    }
-
     @Override
     public WalletPrepaidSummary selectWalletPrepaidSummary(WalletPrepaidQuery query) {
         return walletPrepaidMapper.selectWalletPrepaidSummary(query);
@@ -272,7 +232,7 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
             pageInfo = ((Page<WalletPrepaidRecord>) prepaidRecords).toPageInfo(e -> {
                 WalletPrepaidRecordRes prepaidRecordRes = new WalletPrepaidRecordRes();
                 BeanUtils.copyProperties(e, prepaidRecordRes);
-                prepaidRecordRes.setStatusDesc(PayStatusEnum.getByCode(e.getStatus()).getName());
+                prepaidRecordRes.setStatusDesc(PayStatusEnum.getByCode(e.getStatus()));
                 return prepaidRecordRes;
             });
         }
@@ -304,7 +264,7 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
         payReq.setFilter(getUid(prepaid.getSupEntId()));
         payReq.setOrderNo(orderNo);
         payReq.setAmt(prepaidAddDto.getPrepaidAmount().toString());
-        payReq.setNoticeUrl("/walletPrepaid/receivedCallback");//todo
+        payReq.setNoticeUrl(applicationProperties.getCharge());
         payReq.setRemark(prepaidAddDto.getRemark());
         R<PayRes> pay;
         try {
@@ -358,6 +318,7 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
         log.info("支付回调 {}", JSONObject.toJSONString(receivedCallbackDto));
         WalletPrepaidRecord walletPrepaidRecord = walletPrepaidRecordMapper.selectWalletPrepaidRecordByOrderNo(receivedCallbackDto.getPayOrderNo());
         if (walletPrepaidRecord == null) {
+            log.error("预付记录不存在");
             throw new BusinessException("预付记录不存在");
         }
         WalletPrepaid walletPrepaid = walletPrepaidMapper.selectWalletPrepaidById(walletPrepaidRecord.getPrepaidId());
@@ -366,12 +327,11 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
 
         KwpWalletSplit kwpWalletSplit = new KwpWalletSplit();
         try {
-            // 支付 清分 提现
-            //todo 新增清分订单,清分成功后,增加可提现余额
+            // 新增清分订单,清分成功后,增加可提现余额
             customSettleDto.setUid(getUid(walletPrepaid.getProEntId()));
             customSettleDto.setAmt(String.valueOf(receivedCallbackDto.getTranAmt()));
             customSettleDto.setMchtFee("0.00");
-            customSettleDto.setNoticeUrl("/wallet/split");//todo
+            customSettleDto.setNoticeUrl(applicationProperties.getSplit());
             customSettleDto.setSummery("");
             customSettleDto.setRemark("清分");
             DivideDto divideDto = new DivideDto();
@@ -403,6 +363,23 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
         } finally {
             kwpWalletSplitMapper.insert(kwpWalletSplit);
         }
+        WalletBusinessFile walletBusinessFile = new WalletBusinessFile();
+        try {
+            walletBusinessFile.setBusinessId(walletPrepaid.getId());
+            walletBusinessFile.setRemark("");
+            walletBusinessFile.setStatus(0);
+            walletBusinessFile.setDelFlag(0);
+            MultipartFile file = receivedCallbackDto.getFile();
+            BaseResult<FileInfoVO> httpResult = remoteFileService.fileUpload(file);
+            if (HttpStatus.SUCCESS_CODE == httpResult.getCode()) {
+                FileInfoVO data = httpResult.getData();
+                walletBusinessFile.setFilePath(Objects.nonNull(data) ? data.getFileAbsolutePath() : "");
+            }
+        } catch (Exception e) {
+            log.error("支付凭证文件写入异常 {}", e.getMessage());
+        } finally {
+            businessFileMapper.insert(walletBusinessFile);
+        }
         //修改预付记录
         walletPrepaidRecord.setReceivedAmount(receivedCallbackDto.getTranAmt());
         walletPrepaidRecord.setStatus(PayStatusEnum.PAID.getCode());
@@ -526,7 +503,7 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
         }
 
         query.setEntType(EntTypeEnum.SUPPLIER.getCode());
-        query.setCurEntId(LoginUserHolder.get().getEntId());
+        query.setCurEntId(LoginUserHolder.getEntId());
 
         String startTime = query.getStartTime();
         String endTime = query.getEndTime();
@@ -629,7 +606,7 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
     public List<TradeEntInfoResVo> queryPrepaidTradeEntIds() {
         TradeEntListQueryFeignDto queryFeignDto = new TradeEntListQueryFeignDto();
         queryFeignDto.setCurEntId(LoginEntHolder.getEntId());
-        String entTypes = LoginEntHolder.get().getEntTypes();
+        String entTypes = LoginEntHolder.getEntTypes();
         if (entTypes.contains(String.valueOf(EntTypeEnum.SUPPLIER.getCode()))) {
             queryFeignDto.setTradeEntType(EntTypeEnum.PURCHASER.getCode());
         } else if (entTypes.contains(String.valueOf(EntTypeEnum.PURCHASER.getCode()))) {
@@ -637,12 +614,7 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
         } else {
             return Collections.emptyList();
         }
-        BaseResult<List<TradeEntInfoResVo>> result = remoteContractService.queryPrepaidTradeEntIds(queryFeignDto);
-        if (result.getData() != null) {
-            return result.getData();
-        } else {
-            log.error("获取对方企业列表异常,错误信息:{}", result.getMessage());
-        }
-        return Collections.emptyList();
+
+        return remoteContractService.queryPrepaidTradeEntIds(queryFeignDto);
     }
 }

+ 0 - 78
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/impl/WalletRequestLogServiceImpl.java

@@ -1,78 +0,0 @@
-package com.sckw.payment.service.impl;
-
-import com.sckw.payment.entity.WalletRequestLog;
-import com.sckw.payment.mapper.WalletRequestLogMapper;
-import com.sckw.payment.service.IWalletRequestLogService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.CollectionUtils;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-
-/**
- * 钱包接口幂等控制表Service接口实现
- *
- * @author tangys
- * @since  2026-01-06 11:03:35
- */
-@Service
-public class WalletRequestLogServiceImpl implements IWalletRequestLogService {
-
-    @Autowired
-    private WalletRequestLogMapper walletRequestLogMapper;
-
-    @Override
-    public List<WalletRequestLog> selectWalletRequestLogList(WalletRequestLog walletRequestLog) {
-        return walletRequestLogMapper.selectWalletRequestLogList(walletRequestLog);
-    }
-
-    @Override
-    public WalletRequestLog selectWalletRequestLogById(Long id) {
-        return walletRequestLogMapper.selectWalletRequestLogById(id);
-    }
-
-    @Override
-    public List<WalletRequestLog> selectWalletRequestLogByIds(List<Long> idList) {
-        idList = Optional.ofNullable(idList).orElse(Collections.emptyList()).stream().filter(Objects::nonNull).distinct().collect(Collectors.toList());
-        if (CollectionUtils.isEmpty(idList)) {
-            return Collections.emptyList();
-        }
-        return walletRequestLogMapper.selectWalletRequestLogByIds(idList);
-    }
-
-    @Override
-    public Map<Long, WalletRequestLog> mapWalletRequestLogByIds(List<Long> idList) {
-        List<WalletRequestLog> list = selectWalletRequestLogByIds(idList);
-        return Optional.ofNullable(list).orElse(Collections.emptyList()).stream().collect(Collectors.toMap(WalletRequestLog::getId, WalletRequestLog -> WalletRequestLog));
-    }
-
-    @Transactional(rollbackFor = Exception.class)
-    @Override
-    public int insertWalletRequestLog(WalletRequestLog walletRequestLog) {
-        return walletRequestLogMapper.insertWalletRequestLog(walletRequestLog);
-    }
-
-    @Transactional(rollbackFor = Exception.class)
-    @Override
-    public int updateWalletRequestLog(WalletRequestLog walletRequestLog) {
-        return walletRequestLogMapper.updateWalletRequestLog(walletRequestLog);
-    }
-
-    @Transactional(rollbackFor = Exception.class)
-    @Override
-    public int deleteWalletRequestLogById(Long id) {
-        return walletRequestLogMapper.deleteWalletRequestLogById(id);
-    }
-
-    @Transactional(rollbackFor = Exception.class)
-    @Override
-    public int deleteWalletRequestLogByIds(List<Long> idList) {
-        if (CollectionUtils.isEmpty(idList)) {
-            return 0;
-        }
-        return walletRequestLogMapper.deleteWalletRequestLogByIds(idList);
-    }
-}

+ 0 - 144
sckw-modules/sckw-payment/src/main/resources/mapper/WalletAccountMapper.xml

@@ -1,144 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<!-- 钱包账户表(wallet_account) -->
-<mapper namespace="com.sckw.payment.mapper.WalletAccountMapper">
-    <!-- 字段映射 -->
-    <resultMap id="walletAccountMap" type="com.sckw.payment.entity.WalletAccount">
-        <id     column="id"                    property="id" />
-        <result column="ent_id"                property="entId" />
-        <result column="b_withdraw_wallet_no"  property="bWithdrawWalletNo" />
-        <result column="b_freeze_wallet_no"    property="bFreezeWalletNo" />
-        <result column="available_balance"     property="availableBalance" />
-        <result column="frozen_balance"        property="frozenBalance" />
-        <result column="version"               property="version" />
-        <result column="status"                property="status" />
-        <result column="remark"                property="remark" />
-        <result column="del_flag"              property="delFlag" />
-        <result column="create_by"             property="createBy" />
-        <result column="create_time"           property="createTime" />
-        <result column="update_by"             property="updateBy" />
-        <result column="update_time"           property="updateTime" />
-    </resultMap>
-
-    <!-- 表所有字段 -->
-    <sql id="allColumns">
-        wa.id, wa.ent_id, wa.b_withdraw_wallet_no, wa.b_freeze_wallet_no, wa.available_balance, wa.frozen_balance, wa.version, wa.status,
-        wa.remark, wa.del_flag, wa.create_by, wa.create_time, wa.update_by, wa.update_time
-    </sql>
-
-    <!-- 分页查询钱包账户表列表 -->
-    <select id="selectWalletAccountList" resultMap="walletAccountMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_account wa WHERE wa.DEL_FLAG = '0'
-        <if test="entId != null">
-            AND wa.ent_id = #{entId}
-        </if>
-        <if test="bWithdrawWalletNo != null and bWithdrawWalletNo != ''">
-            AND wa.b_withdraw_wallet_no LIKE CONCAT('%', #{bWithdrawWalletNo}, '%')
-        </if>
-    </select>
-
-    <!-- 根据主键ID查询钱包账户表 -->
-    <select id="selectWalletAccountById" resultMap="walletAccountMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_account wa WHERE wa.id = #{id}
-    </select>
-
-    <!-- 根据主键ID列表查询钱包账户表列表 -->
-    <select id="selectWalletAccountByIds" resultMap="walletAccountMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_account wa WHERE wa.id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </select>
-
-    <!-- 新增钱包账户表 -->
-    <insert id="insertWalletAccount" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-        INSERT INTO wallet_account
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">id,</if>
-            <if test="entId != null">ent_id,</if>
-            <if test="bWithdrawWalletNo != null">b_withdraw_wallet_no,</if>
-            <if test="bFreezeWalletNo != null">b_freeze_wallet_no,</if>
-            <if test="availableBalance != null">available_balance,</if>
-            <if test="frozenBalance != null">frozen_balance,</if>
-            <if test="version != null">version,</if>
-            <if test="status != null">status,</if>
-            <if test="remark != null">remark,</if>
-            <if test="delFlag != null">del_flag,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time</if>
-        </trim>
-        <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="entId != null">#{entId},</if>
-            <if test="bWithdrawWalletNo != null">#{bWithdrawWalletNo},</if>
-            <if test="bFreezeWalletNo != null">#{bFreezeWalletNo},</if>
-            <if test="availableBalance != null">#{availableBalance},</if>
-            <if test="frozenBalance != null">#{frozenBalance},</if>
-            <if test="version != null">#{version},</if>
-            <if test="status != null">#{status},</if>
-            <if test="remark != null">#{remark},</if>
-            <if test="delFlag != null">#{delFlag},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime}</if>
-        </trim>
-    </insert>
-
-    <!-- 修改钱包账户表 -->
-    <update id="updateWalletAccount">
-        UPDATE wallet_account
-        <set>
-            <if test="entId != null">ent_id = #{entId},</if>
-            <if test="bWithdrawWalletNo != null">b_withdraw_wallet_no = #{bWithdrawWalletNo},</if>
-            <if test="bFreezeWalletNo != null">b_freeze_wallet_no = #{bFreezeWalletNo},</if>
-            <if test="availableBalance != null">available_balance = #{availableBalance},</if>
-            <if test="frozenBalance != null">frozen_balance = #{frozenBalance},</if>
-            <if test="version != null">version = #{version},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="remark != null">remark = #{remark},</if>
-            <if test="delFlag != null">del_flag = #{delFlag},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime}</if>
-        </set>
-        WHERE id = #{id}
-    </update>
-
-    <!-- 删除钱包账户表 -->
-    <delete id="deleteWalletAccountById">
-        DELETE FROM wallet_account WHERE id = #{id}
-    </delete>
-
-    <!-- 批量删除钱包账户表 -->
-    <delete id="deleteWalletAccountByIds">
-        DELETE FROM wallet_account WHERE id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-
-    <!-- 批量逻辑删除钱包账户表 -->
-    <update id="deleteWalletAccountLogicByIds">
-        UPDATE wallet_account
-        <set>
-            DEL_FLAG = '1',
-            UPDATE_TIME = NOW(),
-            <if test="updateBy != null and updateBy != ''">UPDATE_BY = #{updateBy}</if>
-        </set>
-        WHERE DEL_FLAG = '0' AND id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </update>
-</mapper>

+ 31 - 0
sckw-modules/sckw-payment/src/main/resources/mapper/WalletAgentBalanceMapper.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sckw.payment.mapper.WalletAgentBalanceMapper">
+  <resultMap id="BaseResultMap" type="com.sckw.payment.entity.WalletAgentBalance">
+    <!--@mbg.generated-->
+    <!--@Table wallet_agent_balance-->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
+    <result column="order_type" jdbcType="TINYINT" property="orderType" />
+    <result column="agt_ent_id" jdbcType="BIGINT" property="agtEntId" />
+    <result column="sup_ent_id" jdbcType="BIGINT" property="supEntId" />
+    <result column="trade_type" jdbcType="TINYINT" property="tradeType" />
+    <result column="trade_amount" jdbcType="DECIMAL" property="tradeAmount" />
+    <result column="pre_balance" jdbcType="DECIMAL" property="preBalance" />
+    <result column="trading_amount" jdbcType="DECIMAL" property="tradingAmount" />
+    <result column="file" jdbcType="VARCHAR" property="file" />
+    <result column="status" jdbcType="TINYINT" property="status" />
+    <result column="remark" jdbcType="VARCHAR" property="remark" />
+    <result column="create_by" jdbcType="BIGINT" property="createBy" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_by" jdbcType="BIGINT" property="updateBy" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--@mbg.generated-->
+    id, order_no, order_type, agt_ent_id, sup_ent_id, trade_type, trade_amount, pre_balance, 
+    trading_amount, `file`, `status`, remark, create_by, create_time, update_by, update_time, 
+    del_flag
+  </sql>
+</mapper>

+ 25 - 0
sckw-modules/sckw-payment/src/main/resources/mapper/WalletAgentMapper.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sckw.payment.mapper.WalletAgentMapper">
+  <resultMap id="BaseResultMap" type="com.sckw.payment.entity.WalletAgent">
+    <!--@mbg.generated-->
+    <!--@Table wallet_agent-->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="agt_ent_id" jdbcType="BIGINT" property="agtEntId" />
+    <result column="sup_ent_id" jdbcType="BIGINT" property="supEntId" />
+    <result column="pre_balance" jdbcType="DECIMAL" property="preBalance" />
+    <result column="trading_amount" jdbcType="DECIMAL" property="tradingAmount" />
+    <result column="status" jdbcType="TINYINT" property="status" />
+    <result column="remark" jdbcType="VARCHAR" property="remark" />
+    <result column="create_by" jdbcType="BIGINT" property="createBy" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_by" jdbcType="BIGINT" property="updateBy" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--@mbg.generated-->
+    id, agt_ent_id, sup_ent_id, pre_balance, trading_amount, `status`, remark, create_by, 
+    create_time, update_by, update_time, del_flag
+  </sql>
+</mapper>

+ 26 - 0
sckw-modules/sckw-payment/src/main/resources/mapper/WalletAgentRecordMapper.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sckw.payment.mapper.WalletAgentRecordMapper">
+  <resultMap id="BaseResultMap" type="com.sckw.payment.entity.WalletAgentRecord">
+    <!--@mbg.generated-->
+    <!--@Table wallet_agent_record-->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="agent_id" jdbcType="BIGINT" property="agentId" />
+    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
+    <result column="prepaid_amount" jdbcType="DECIMAL" property="prepaidAmount" />
+    <result column="received_amount" jdbcType="DECIMAL" property="receivedAmount" />
+    <result column="data" jdbcType="VARCHAR" property="data" />
+    <result column="status" jdbcType="TINYINT" property="status" />
+    <result column="remark" jdbcType="VARCHAR" property="remark" />
+    <result column="create_by" jdbcType="BIGINT" property="createBy" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_by" jdbcType="BIGINT" property="updateBy" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--@mbg.generated-->
+    id, agent_id, order_no, prepaid_amount, received_amount, `data`, `status`, remark, 
+    create_by, create_time, update_by, update_time, del_flag
+  </sql>
+</mapper>

+ 0 - 181
sckw-modules/sckw-payment/src/main/resources/mapper/WalletBalanceMapper.xml

@@ -1,181 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<!-- 钱包余额明细表(wallet_balance) -->
-<mapper namespace="com.sckw.payment.mapper.WalletBalanceMapper">
-    <!-- This code was generated by TableGo tools, mark 1 begin. -->
-    <!-- 字段映射 -->
-    <resultMap id="walletBalanceMap" type="com.sckw.payment.entity.WalletBalance">
-        <id     column="id"                    property="id" />
-        <result column="order_no"              property="orderNo" />
-        <result column="order_type"            property="orderType" />
-        <result column="ent_id"                property="entId" />
-        <result column="trade_ent_id"          property="tradeEntId" />
-        <result column="trade_type"            property="tradeType" />
-        <result column="trade_amount"          property="tradeAmount" />
-        <result column="bank_serial_no"        property="bankSerialNo" />
-        <result column="available_before"      property="availableBefore" />
-        <result column="available_after"       property="availableAfter" />
-        <result column="frozen_before"         property="frozenBefore" />
-        <result column="frozen_after"          property="frozenAfter" />
-        <result column="available_prepaid"     property="availablePrepaid" />
-        <result column="counterparty_prepaid"  property="counterpartyPrepaid" />
-        <result column="status"                property="status" />
-        <result column="remark"                property="remark" />
-        <result column="voucher_flag"          property="voucherFlag" />
-        <result column="del_flag"              property="delFlag" />
-        <result column="create_by"             property="createBy" />
-        <result column="create_time"           property="createTime" />
-        <result column="update_by"             property="updateBy" />
-        <result column="update_time"           property="updateTime" />
-    </resultMap>
-
-    <!-- 表所有字段 -->
-    <sql id="allColumns">
-        wb.id, wb.order_no, wb.order_type, wb.ent_id, wb.trade_ent_id, wb.trade_type, wb.trade_amount, wb.bank_serial_no,
-        wb.available_before, wb.available_after, wb.frozen_before, wb.frozen_after, wb.available_prepaid, wb.counterparty_prepaid, wb.status, wb.remark,
-        wb.voucher_flag, wb.del_flag, wb.create_by, wb.create_time, wb.update_by, wb.update_time
-    </sql>
-    <!-- This code was generated by TableGo tools, mark 1 end. -->
-
-    <!-- 分页查询钱包余额明细表列表 -->
-    <select id="selectWalletBalanceList" resultMap="walletBalanceMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_balance wb WHERE wb.DEL_FLAG = '0'
-        <if test="orderNo != null and orderNo != ''">
-            AND wb.order_no LIKE CONCAT('%', #{orderNo}, '%')
-        </if>
-        <if test="orderType != null">
-            AND wb.order_type = #{orderType}
-        </if>
-    </select>
-
-    <!-- 根据主键ID查询钱包余额明细表 -->
-    <select id="selectWalletBalanceById" resultMap="walletBalanceMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_balance wb WHERE wb.id = #{id}
-    </select>
-
-    <!-- 根据主键ID列表查询钱包余额明细表列表 -->
-    <select id="selectWalletBalanceByIds" resultMap="walletBalanceMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_balance wb WHERE wb.id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </select>
-
-    <!-- This code was generated by TableGo tools, mark 2 begin. -->
-    <!-- 新增钱包余额明细表 -->
-    <insert id="insertWalletBalance" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-        INSERT INTO wallet_balance
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">id,</if>
-            <if test="orderNo != null">order_no,</if>
-            <if test="orderType != null">order_type,</if>
-            <if test="entId != null">ent_id,</if>
-            <if test="tradeEntId != null">trade_ent_id,</if>
-            <if test="tradeType != null">trade_type,</if>
-            <if test="tradeAmount != null">trade_amount,</if>
-            <if test="bankSerialNo != null">bank_serial_no,</if>
-            <if test="availableBefore != null">available_before,</if>
-            <if test="availableAfter != null">available_after,</if>
-            <if test="frozenBefore != null">frozen_before,</if>
-            <if test="frozenAfter != null">frozen_after,</if>
-            <if test="availablePrepaid != null">available_prepaid,</if>
-            <if test="counterpartyPrepaid != null">counterparty_prepaid,</if>
-            <if test="status != null">status,</if>
-            <if test="remark != null">remark,</if>
-            <if test="voucherFlag != null">voucher_flag,</if>
-            <if test="delFlag != null">del_flag,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time</if>
-        </trim>
-        <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="orderNo != null">#{orderNo},</if>
-            <if test="orderType != null">#{orderType},</if>
-            <if test="entId != null">#{entId},</if>
-            <if test="tradeEntId != null">#{tradeEntId},</if>
-            <if test="tradeType != null">#{tradeType},</if>
-            <if test="tradeAmount != null">#{tradeAmount},</if>
-            <if test="bankSerialNo != null">#{bankSerialNo},</if>
-            <if test="availableBefore != null">#{availableBefore},</if>
-            <if test="availableAfter != null">#{availableAfter},</if>
-            <if test="frozenBefore != null">#{frozenBefore},</if>
-            <if test="frozenAfter != null">#{frozenAfter},</if>
-            <if test="availablePrepaid != null">#{availablePrepaid},</if>
-            <if test="counterpartyPrepaid != null">#{counterpartyPrepaid},</if>
-            <if test="status != null">#{status},</if>
-            <if test="remark != null">#{remark},</if>
-            <if test="voucherFlag != null">#{voucherFlag},</if>
-            <if test="delFlag != null">#{delFlag},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime}</if>
-        </trim>
-    </insert>
-
-    <!-- 修改钱包余额明细表 -->
-    <update id="updateWalletBalance">
-        UPDATE wallet_balance
-        <set>
-            <if test="orderNo != null">order_no = #{orderNo},</if>
-            <if test="orderType != null">order_type = #{orderType},</if>
-            <if test="entId != null">ent_id = #{entId},</if>
-            <if test="tradeEntId != null">trade_ent_id = #{tradeEntId},</if>
-            <if test="tradeType != null">trade_type = #{tradeType},</if>
-            <if test="tradeAmount != null">trade_amount = #{tradeAmount},</if>
-            <if test="bankSerialNo != null">bank_serial_no = #{bankSerialNo},</if>
-            <if test="availableBefore != null">available_before = #{availableBefore},</if>
-            <if test="availableAfter != null">available_after = #{availableAfter},</if>
-            <if test="frozenBefore != null">frozen_before = #{frozenBefore},</if>
-            <if test="frozenAfter != null">frozen_after = #{frozenAfter},</if>
-            <if test="availablePrepaid != null">available_prepaid = #{availablePrepaid},</if>
-            <if test="counterpartyPrepaid != null">counterparty_prepaid = #{counterpartyPrepaid},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="remark != null">remark = #{remark},</if>
-            <if test="voucherFlag != null">voucher_flag = #{voucherFlag},</if>
-            <if test="delFlag != null">del_flag = #{delFlag},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime}</if>
-        </set>
-        WHERE id = #{id}
-    </update>
-    <!-- This code was generated by TableGo tools, mark 2 end. -->
-
-    <!-- 删除钱包余额明细表 -->
-    <delete id="deleteWalletBalanceById">
-        DELETE FROM wallet_balance WHERE id = #{id}
-    </delete>
-
-    <!-- 批量删除钱包余额明细表 -->
-    <delete id="deleteWalletBalanceByIds">
-        DELETE FROM wallet_balance WHERE id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-
-    <!-- 批量逻辑删除钱包余额明细表 -->
-    <update id="deleteWalletBalanceLogicByIds">
-        UPDATE wallet_balance
-        <set>
-            DEL_FLAG = '2',
-            UPDATE_TIME = NOW(),
-            <if test="loginName != null and loginName != ''">UPDATE_BY = #{loginName}</if>
-        </set>
-        WHERE DEL_FLAG = '0' AND id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </update>
-</mapper>

+ 0 - 105
sckw-modules/sckw-payment/src/main/resources/mapper/WalletBankCallbackMapper.xml

@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<!-- 银行回调日志表(wallet_bank_callback) -->
-<mapper namespace="com.sckw.payment.mapper.WalletBankCallbackMapper">
-    <!-- This code was generated by TableGo tools, mark 1 begin. -->
-    <!-- 字段映射 -->
-    <resultMap id="walletBankCallbackMap" type="com.sckw.payment.entity.WalletBankCallback">
-        <id     column="id"                    property="id" />
-        <result column="biz_no"                property="bizNo" />
-        <result column="callback_type"         property="callbackType" />
-        <result column="raw_content"           property="rawContent" />
-        <result column="remark"                property="remark" />
-        <result column="status"                property="status" />
-        <result column="created_at"            property="createdAt" />
-    </resultMap>
-
-    <!-- 表所有字段 -->
-    <sql id="allColumns">
-        wbc.id, wbc.biz_no, wbc.callback_type, wbc.raw_content, wbc.remark, wbc.status, wbc.created_at
-    </sql>
-    <!-- This code was generated by TableGo tools, mark 1 end. -->
-
-    <!-- 分页查询银行回调日志表列表 -->
-    <select id="selectWalletBankCallbackList" resultMap="walletBankCallbackMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_bank_callback wbc WHERE 1 = 1
-        <if test="bizNo != null and bizNo != ''">
-            AND wbc.biz_no LIKE CONCAT('%', #{bizNo}, '%')
-        </if>
-        <if test="callbackType != null">
-            AND wbc.callback_type = #{callbackType}
-        </if>
-    </select>
-
-    <!-- 根据主键ID查询银行回调日志表 -->
-    <select id="selectWalletBankCallbackById" resultMap="walletBankCallbackMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_bank_callback wbc WHERE wbc.id = #{id}
-    </select>
-
-    <!-- 根据主键ID列表查询银行回调日志表列表 -->
-    <select id="selectWalletBankCallbackByIds" resultMap="walletBankCallbackMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_bank_callback wbc WHERE wbc.id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </select>
-
-    <!-- This code was generated by TableGo tools, mark 2 begin. -->
-    <!-- 新增银行回调日志表 -->
-    <insert id="insertWalletBankCallback" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-        INSERT INTO wallet_bank_callback
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">id,</if>
-            <if test="bizNo != null">biz_no,</if>
-            <if test="callbackType != null">callback_type,</if>
-            <if test="rawContent != null">raw_content,</if>
-            <if test="remark != null">remark,</if>
-            <if test="status != null">status,</if>
-            <if test="createdAt != null">created_at</if>
-        </trim>
-        <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="bizNo != null">#{bizNo},</if>
-            <if test="callbackType != null">#{callbackType},</if>
-            <if test="rawContent != null">#{rawContent},</if>
-            <if test="remark != null">#{remark},</if>
-            <if test="status != null">#{status},</if>
-            <if test="createdAt != null">#{createdAt}</if>
-        </trim>
-    </insert>
-
-    <!-- 修改银行回调日志表 -->
-    <update id="updateWalletBankCallback">
-        UPDATE wallet_bank_callback
-        <set>
-            <if test="bizNo != null">biz_no = #{bizNo},</if>
-            <if test="callbackType != null">callback_type = #{callbackType},</if>
-            <if test="rawContent != null">raw_content = #{rawContent},</if>
-            <if test="remark != null">remark = #{remark},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="createdAt != null">created_at = #{createdAt}</if>
-        </set>
-        WHERE id = #{id}
-    </update>
-    <!-- This code was generated by TableGo tools, mark 2 end. -->
-
-    <!-- 删除银行回调日志表 -->
-    <delete id="deleteWalletBankCallbackById">
-        DELETE FROM wallet_bank_callback WHERE id = #{id}
-    </delete>
-
-    <!-- 批量删除银行回调日志表 -->
-    <delete id="deleteWalletBankCallbackByIds">
-        DELETE FROM wallet_bank_callback WHERE id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-</mapper>

+ 0 - 109
sckw-modules/sckw-payment/src/main/resources/mapper/WalletBankRequestMapper.xml

@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<!-- 银行回调日志表(wallet_bank_request) -->
-<mapper namespace="com.sckw.payment.mapper.WalletBankRequestMapper">
-    <!-- This code was generated by TableGo tools, mark 1 begin. -->
-    <!-- 字段映射 -->
-    <resultMap id="walletBankRequestMap" type="com.sckw.payment.entity.WalletBankRequest">
-        <id     column="id"                    property="id" />
-        <result column="biz_type"              property="bizType" />
-        <result column="biz_no"                property="bizNo" />
-        <result column="resquest_content"      property="resquestContent" />
-        <result column="response_content"      property="responseContent" />
-        <result column="remark"                property="remark" />
-        <result column="status"                property="status" />
-        <result column="created_at"            property="createdAt" />
-    </resultMap>
-
-    <!-- 表所有字段 -->
-    <sql id="allColumns">
-        wbr.id, wbr.biz_type, wbr.biz_no, wbr.resquest_content, wbr.response_content, wbr.remark, wbr.status, wbr.created_at
-    </sql>
-    <!-- This code was generated by TableGo tools, mark 1 end. -->
-
-    <!-- 分页查询银行回调日志表列表 -->
-    <select id="selectWalletBankRequestList" resultMap="walletBankRequestMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_bank_request wbr WHERE 1 = 1
-        <if test="bizType != null and bizType != ''">
-            AND wbr.biz_type = #{bizType}
-        </if>
-        <if test="bizNo != null and bizNo != ''">
-            AND wbr.biz_no LIKE CONCAT('%', #{bizNo}, '%')
-        </if>
-    </select>
-
-    <!-- 根据主键ID查询银行回调日志表 -->
-    <select id="selectWalletBankRequestById" resultMap="walletBankRequestMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_bank_request wbr WHERE wbr.id = #{id}
-    </select>
-
-    <!-- 根据主键ID列表查询银行回调日志表列表 -->
-    <select id="selectWalletBankRequestByIds" resultMap="walletBankRequestMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_bank_request wbr WHERE wbr.id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </select>
-
-    <!-- This code was generated by TableGo tools, mark 2 begin. -->
-    <!-- 新增银行回调日志表 -->
-    <insert id="insertWalletBankRequest" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-        INSERT INTO wallet_bank_request
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">id,</if>
-            <if test="bizType != null">biz_type,</if>
-            <if test="bizNo != null">biz_no,</if>
-            <if test="resquestContent != null">resquest_content,</if>
-            <if test="responseContent != null">response_content,</if>
-            <if test="remark != null">remark,</if>
-            <if test="status != null">status,</if>
-            <if test="createdAt != null">created_at</if>
-        </trim>
-        <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="bizType != null">#{bizType},</if>
-            <if test="bizNo != null">#{bizNo},</if>
-            <if test="resquestContent != null">#{resquestContent},</if>
-            <if test="responseContent != null">#{responseContent},</if>
-            <if test="remark != null">#{remark},</if>
-            <if test="status != null">#{status},</if>
-            <if test="createdAt != null">#{createdAt}</if>
-        </trim>
-    </insert>
-
-    <!-- 修改银行回调日志表 -->
-    <update id="updateWalletBankRequest">
-        UPDATE wallet_bank_request
-        <set>
-            <if test="bizType != null">biz_type = #{bizType},</if>
-            <if test="bizNo != null">biz_no = #{bizNo},</if>
-            <if test="resquestContent != null">resquest_content = #{resquestContent},</if>
-            <if test="responseContent != null">response_content = #{responseContent},</if>
-            <if test="remark != null">remark = #{remark},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="createdAt != null">created_at = #{createdAt}</if>
-        </set>
-        WHERE id = #{id}
-    </update>
-    <!-- This code was generated by TableGo tools, mark 2 end. -->
-
-    <!-- 删除银行回调日志表 -->
-    <delete id="deleteWalletBankRequestById">
-        DELETE FROM wallet_bank_request WHERE id = #{id}
-    </delete>
-
-    <!-- 批量删除银行回调日志表 -->
-    <delete id="deleteWalletBankRequestByIds">
-        DELETE FROM wallet_bank_request WHERE id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-</mapper>

+ 0 - 175
sckw-modules/sckw-payment/src/main/resources/mapper/WalletEntInfoMapper.xml

@@ -1,175 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<!-- 开户企业信息表(wallet_ent_info) -->
-<mapper namespace="com.sckw.payment.mapper.WalletEntInfoMapper">
-    <!-- This code was generated by TableGo tools, mark 1 begin. -->
-    <!-- 字段映射 -->
-    <resultMap id="walletEntInfoMap" type="com.sckw.payment.entity.WalletEntInfo">
-        <id     column="id"                    property="id" />
-        <result column="ent_id"                property="entId" />
-        <result column="full_name"             property="fullName" />
-        <result column="address"               property="address" />
-        <result column="license_code"          property="licenseCode" />
-        <result column="license_start_date"    property="licenseStartDate" />
-        <result column="license_end_date"      property="licenseEndDate" />
-        <result column="real_address"          property="realAddress" />
-        <result column="license_file_id"       property="licenseFileId" />
-        <result column="license_file_duplicate_id" property="licenseFileDuplicateId" />
-        <result column="legal_name"            property="legalName" />
-        <result column="legal_id_card_no"      property="legalIdCardNo" />
-        <result column="legal_phone"           property="legalPhone" />
-        <result column="legal_start_date"      property="legalStartDate" />
-        <result column="legal_end_date"        property="legalEndDate" />
-        <result column="id_card_front_id"      property="idCardFrontId" />
-        <result column="id_card_back_id"       property="idCardBackId" />
-        <result column="contact_name"          property="contactName" />
-        <result column="contact_phone"         property="contactPhone" />
-        <result column="contact_id_card_no"    property="contactIdCardNo" />
-        <result column="contact_id_card_front_id" property="contactIdCardFrontId" />
-        <result column="contact_id_card_back_id" property="contactIdCardBackId" />
-        <result column="create_time"           property="createTime" />
-        <result column="update_time"           property="updateTime" />
-    </resultMap>
-
-    <!-- 表所有字段 -->
-    <sql id="allColumns">
-        wei.id, wei.ent_id, wei.full_name, wei.address, wei.license_code, wei.license_start_date, wei.license_end_date, wei.real_address,
-        wei.license_file_id, wei.license_file_duplicate_id, wei.legal_name, wei.legal_id_card_no, wei.legal_phone, wei.legal_start_date, wei.legal_end_date, wei.id_card_front_id,
-        wei.id_card_back_id, wei.contact_name, wei.contact_phone, wei.contact_id_card_no, wei.contact_id_card_front_id, wei.contact_id_card_back_id, wei.create_time, wei.update_time
-    </sql>
-    <!-- This code was generated by TableGo tools, mark 1 end. -->
-
-    <!-- 分页查询开户企业信息表列表 -->
-    <select id="selectWalletEntInfoList" resultMap="walletEntInfoMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_ent_info wei WHERE 1 = 1
-        <if test="entId != null">
-            AND wei.ent_id = #{entId}
-        </if>
-        <if test="fullName != null and fullName != ''">
-            AND wei.full_name LIKE CONCAT('%', #{fullName}, '%')
-        </if>
-    </select>
-
-    <!-- 根据主键ID查询开户企业信息表 -->
-    <select id="selectWalletEntInfoById" resultMap="walletEntInfoMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_ent_info wei WHERE wei.id = #{id}
-    </select>
-
-    <!-- 根据主键ID列表查询开户企业信息表列表 -->
-    <select id="selectWalletEntInfoByIds" resultMap="walletEntInfoMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_ent_info wei WHERE wei.id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </select>
-
-    <!-- This code was generated by TableGo tools, mark 2 begin. -->
-    <!-- 新增开户企业信息表 -->
-    <insert id="insertWalletEntInfo" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-        INSERT INTO wallet_ent_info
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">id,</if>
-            <if test="entId != null">ent_id,</if>
-            <if test="fullName != null">full_name,</if>
-            <if test="address != null">address,</if>
-            <if test="licenseCode != null">license_code,</if>
-            <if test="licenseStartDate != null">license_start_date,</if>
-            <if test="licenseEndDate != null">license_end_date,</if>
-            <if test="realAddress != null">real_address,</if>
-            <if test="licenseFileId != null">license_file_id,</if>
-            <if test="licenseFileDuplicateId != null">license_file_duplicate_id,</if>
-            <if test="legalName != null">legal_name,</if>
-            <if test="legalIdCardNo != null">legal_id_card_no,</if>
-            <if test="legalPhone != null">legal_phone,</if>
-            <if test="legalStartDate != null">legal_start_date,</if>
-            <if test="legalEndDate != null">legal_end_date,</if>
-            <if test="idCardFrontId != null">id_card_front_id,</if>
-            <if test="idCardBackId != null">id_card_back_id,</if>
-            <if test="contactName != null">contact_name,</if>
-            <if test="contactPhone != null">contact_phone,</if>
-            <if test="contactIdCardNo != null">contact_id_card_no,</if>
-            <if test="contactIdCardFrontId != null">contact_id_card_front_id,</if>
-            <if test="contactIdCardBackId != null">contact_id_card_back_id,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateTime != null">update_time</if>
-        </trim>
-        <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="entId != null">#{entId},</if>
-            <if test="fullName != null">#{fullName},</if>
-            <if test="address != null">#{address},</if>
-            <if test="licenseCode != null">#{licenseCode},</if>
-            <if test="licenseStartDate != null">#{licenseStartDate},</if>
-            <if test="licenseEndDate != null">#{licenseEndDate},</if>
-            <if test="realAddress != null">#{realAddress},</if>
-            <if test="licenseFileId != null">#{licenseFileId},</if>
-            <if test="licenseFileDuplicateId != null">#{licenseFileDuplicateId},</if>
-            <if test="legalName != null">#{legalName},</if>
-            <if test="legalIdCardNo != null">#{legalIdCardNo},</if>
-            <if test="legalPhone != null">#{legalPhone},</if>
-            <if test="legalStartDate != null">#{legalStartDate},</if>
-            <if test="legalEndDate != null">#{legalEndDate},</if>
-            <if test="idCardFrontId != null">#{idCardFrontId},</if>
-            <if test="idCardBackId != null">#{idCardBackId},</if>
-            <if test="contactName != null">#{contactName},</if>
-            <if test="contactPhone != null">#{contactPhone},</if>
-            <if test="contactIdCardNo != null">#{contactIdCardNo},</if>
-            <if test="contactIdCardFrontId != null">#{contactIdCardFrontId},</if>
-            <if test="contactIdCardBackId != null">#{contactIdCardBackId},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateTime != null">#{updateTime}</if>
-        </trim>
-    </insert>
-
-    <!-- 修改开户企业信息表 -->
-    <update id="updateWalletEntInfo">
-        UPDATE wallet_ent_info
-        <set>
-            <if test="entId != null">ent_id = #{entId},</if>
-            <if test="fullName != null">full_name = #{fullName},</if>
-            <if test="address != null">address = #{address},</if>
-            <if test="licenseCode != null">license_code = #{licenseCode},</if>
-            <if test="licenseStartDate != null">license_start_date = #{licenseStartDate},</if>
-            <if test="licenseEndDate != null">license_end_date = #{licenseEndDate},</if>
-            <if test="realAddress != null">real_address = #{realAddress},</if>
-            <if test="licenseFileId != null">license_file_id = #{licenseFileId},</if>
-            <if test="licenseFileDuplicateId != null">license_file_duplicate_id = #{licenseFileDuplicateId},</if>
-            <if test="legalName != null">legal_name = #{legalName},</if>
-            <if test="legalIdCardNo != null">legal_id_card_no = #{legalIdCardNo},</if>
-            <if test="legalPhone != null">legal_phone = #{legalPhone},</if>
-            <if test="legalStartDate != null">legal_start_date = #{legalStartDate},</if>
-            <if test="legalEndDate != null">legal_end_date = #{legalEndDate},</if>
-            <if test="idCardFrontId != null">id_card_front_id = #{idCardFrontId},</if>
-            <if test="idCardBackId != null">id_card_back_id = #{idCardBackId},</if>
-            <if test="contactName != null">contact_name = #{contactName},</if>
-            <if test="contactPhone != null">contact_phone = #{contactPhone},</if>
-            <if test="contactIdCardNo != null">contact_id_card_no = #{contactIdCardNo},</if>
-            <if test="contactIdCardFrontId != null">contact_id_card_front_id = #{contactIdCardFrontId},</if>
-            <if test="contactIdCardBackId != null">contact_id_card_back_id = #{contactIdCardBackId},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateTime != null">update_time = #{updateTime}</if>
-        </set>
-        WHERE id = #{id}
-    </update>
-    <!-- This code was generated by TableGo tools, mark 2 end. -->
-
-    <!-- 删除开户企业信息表 -->
-    <delete id="deleteWalletEntInfoById">
-        DELETE FROM wallet_ent_info WHERE id = #{id}
-    </delete>
-
-    <!-- 批量删除开户企业信息表 -->
-    <delete id="deleteWalletEntInfoByIds">
-        DELETE FROM wallet_ent_info WHERE id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-</mapper>

+ 0 - 137
sckw-modules/sckw-payment/src/main/resources/mapper/WalletEntUserMapper.xml

@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<!-- 企业股东或最终收益人(wallet_ent_user) -->
-<mapper namespace="com.sckw.payment.mapper.WalletEntUserMapper">
-    <!-- This code was generated by TableGo tools, mark 1 begin. -->
-    <!-- 字段映射 -->
-    <resultMap id="walletEntUserMap" type="com.sckw.payment.entity.WalletEntUser">
-        <id     column="id"                    property="id" />
-        <result column="ent_id"                property="entId" />
-        <result column="type"                  property="type" />
-        <result column="name"                  property="name" />
-        <result column="id_card_no"            property="idCardNo" />
-        <result column="id_card_start_date"    property="idCardStartDate" />
-        <result column="id_card_end_date"      property="idCardEndDate" />
-        <result column="phone"                 property="phone" />
-        <result column="address"               property="address" />
-        <result column="income_type"           property="incomeType" />
-        <result column="create_time"           property="createTime" />
-        <result column="update_time"           property="updateTime" />
-    </resultMap>
-
-    <!-- 表所有字段 -->
-    <sql id="allColumns">
-        weu.id, weu.ent_id, weu.type, weu.name, weu.id_card_no, weu.id_card_start_date, weu.id_card_end_date, weu.phone,
-        weu.address, weu.income_type, weu.create_time, weu.update_time
-    </sql>
-    <!-- This code was generated by TableGo tools, mark 1 end. -->
-
-    <!-- 分页查询企业股东或最终收益人列表 -->
-    <select id="selectWalletEntUserList" resultMap="walletEntUserMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_ent_user weu WHERE 1 = 1
-        <if test="entId != null">
-            AND weu.ent_id = #{entId}
-        </if>
-        <if test="type != null">
-            AND weu.type = #{type}
-        </if>
-    </select>
-
-    <!-- 根据主键ID查询企业股东或最终收益人 -->
-    <select id="selectWalletEntUserById" resultMap="walletEntUserMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_ent_user weu WHERE weu.id = #{id}
-    </select>
-
-    <!-- 根据主键ID列表查询企业股东或最终收益人列表 -->
-    <select id="selectWalletEntUserByIds" resultMap="walletEntUserMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_ent_user weu WHERE weu.id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </select>
-
-    <!-- This code was generated by TableGo tools, mark 2 begin. -->
-    <!-- 新增企业股东或最终收益人 -->
-    <insert id="insertWalletEntUser" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-        INSERT INTO wallet_ent_user
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">id,</if>
-            <if test="entId != null">ent_id,</if>
-            <if test="type != null">type,</if>
-            <if test="name != null">name,</if>
-            <if test="idCardNo != null">id_card_no,</if>
-            <if test="idCardStartDate != null">id_card_start_date,</if>
-            <if test="idCardEndDate != null">id_card_end_date,</if>
-            <if test="phone != null">phone,</if>
-            <if test="address != null">address,</if>
-            <if test="incomeType != null">income_type,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateTime != null">update_time</if>
-        </trim>
-        <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="entId != null">#{entId},</if>
-            <if test="type != null">#{type},</if>
-            <if test="name != null">#{name},</if>
-            <if test="idCardNo != null">#{idCardNo},</if>
-            <if test="idCardStartDate != null">#{idCardStartDate},</if>
-            <if test="idCardEndDate != null">#{idCardEndDate},</if>
-            <if test="phone != null">#{phone},</if>
-            <if test="address != null">#{address},</if>
-            <if test="incomeType != null">#{incomeType},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateTime != null">#{updateTime}</if>
-        </trim>
-    </insert>
-
-
-    <insert id="insertBatch">
-        insert into wallet_ent_user (id,ent_id,type,name,id_card_no,id_card_start_date,id_card_end_date,phone,address,income_type,create_time,update_time)
-        values
-        <foreach collection="walletEntUsers" item="walletEntUser" separator=",">
-            (
-            #{walletEntUser.id},#{walletEntUser.entId},#{walletEntUser.type},#{walletEntUser.name},#{walletEntUser.idCardNo},#{walletEntUser.idCardStartDate},#{walletEntUser.idCardEndDate},#{walletEntUser.phone},#{walletEntUser.address},#{walletEntUser.incomeType},#{walletEntUser.createTime},#{walletEntUser.updateTime}
-            )
-        </foreach>
-    </insert>
-
-    <!-- 修改企业股东或最终收益人 -->
-    <update id="updateWalletEntUser">
-        UPDATE wallet_ent_user
-        <set>
-            <if test="entId != null">ent_id = #{entId},</if>
-            <if test="type != null">type = #{type},</if>
-            <if test="name != null">name = #{name},</if>
-            <if test="idCardNo != null">id_card_no = #{idCardNo},</if>
-            <if test="idCardStartDate != null">id_card_start_date = #{idCardStartDate},</if>
-            <if test="idCardEndDate != null">id_card_end_date = #{idCardEndDate},</if>
-            <if test="phone != null">phone = #{phone},</if>
-            <if test="address != null">address = #{address},</if>
-            <if test="incomeType != null">income_type = #{incomeType},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateTime != null">update_time = #{updateTime}</if>
-        </set>
-        WHERE id = #{id}
-    </update>
-    <!-- This code was generated by TableGo tools, mark 2 end. -->
-
-    <!-- 删除企业股东或最终收益人 -->
-    <delete id="deleteWalletEntUserById">
-        DELETE FROM wallet_ent_user WHERE id = #{id}
-    </delete>
-
-    <!-- 批量删除企业股东或最终收益人 -->
-    <delete id="deleteWalletEntUserByIds">
-        DELETE FROM wallet_ent_user WHERE id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-</mapper>

+ 2 - 2
sckw-modules/sckw-payment/src/main/resources/mapper/WalletPayableMapper.xml

@@ -39,10 +39,10 @@
         SELECT 1
         FROM wallet_payable_apply wpp
         WHERE wp.id=wpp.payable_id
-        AND wpp.status = 0 -- 这里判断 b 表的 target_field 是否为指定值
+        AND wpp.status = 0
         ) THEN 1
         ELSE 0
-        END AS existsApply  -- 标识字段,存在为 1,不存在为 0
+        END AS existsApply
         FROM wallet_payable wp WHERE wp.DEL_FLAG = '0'
         <choose>
             <when test="freightType == 1">

+ 0 - 105
sckw-modules/sckw-payment/src/main/resources/mapper/WalletRequestLogMapper.xml

@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<!-- 钱包接口幂等控制表(wallet_request_log) -->
-<mapper namespace="com.sckw.payment.mapper.WalletRequestLogMapper">
-    <!-- This code was generated by TableGo tools, mark 1 begin. -->
-    <!-- 字段映射 -->
-    <resultMap id="walletRequestLogMap" type="com.sckw.payment.entity.WalletRequestLog">
-        <id     column="id"                    property="id" />
-        <result column="request_id"            property="requestId" />
-        <result column="biz_type"              property="bizType" />
-        <result column="biz_no"                property="bizNo" />
-        <result column="status"                property="status" />
-        <result column="last_error"            property="lastError" />
-        <result column="created_at"            property="createdAt" />
-    </resultMap>
-
-    <!-- 表所有字段 -->
-    <sql id="allColumns">
-        wrl.id, wrl.request_id, wrl.biz_type, wrl.biz_no, wrl.status, wrl.last_error, wrl.created_at
-    </sql>
-    <!-- This code was generated by TableGo tools, mark 1 end. -->
-
-    <!-- 分页查询钱包接口幂等控制表列表 -->
-    <select id="selectWalletRequestLogList" resultMap="walletRequestLogMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_request_log wrl WHERE 1 = 1
-        <if test="requestId != null and requestId != ''">
-            AND wrl.request_id = #{requestId}
-        </if>
-        <if test="bizType != null and bizType != ''">
-            AND wrl.biz_type = #{bizType}
-        </if>
-    </select>
-
-    <!-- 根据主键ID查询钱包接口幂等控制表 -->
-    <select id="selectWalletRequestLogById" resultMap="walletRequestLogMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_request_log wrl WHERE wrl.id = #{id}
-    </select>
-
-    <!-- 根据主键ID列表查询钱包接口幂等控制表列表 -->
-    <select id="selectWalletRequestLogByIds" resultMap="walletRequestLogMap">
-        SELECT
-            <include refid="allColumns" />
-        FROM wallet_request_log wrl WHERE wrl.id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </select>
-
-    <!-- This code was generated by TableGo tools, mark 2 begin. -->
-    <!-- 新增钱包接口幂等控制表 -->
-    <insert id="insertWalletRequestLog" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-        INSERT INTO wallet_request_log
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">id,</if>
-            <if test="requestId != null">request_id,</if>
-            <if test="bizType != null">biz_type,</if>
-            <if test="bizNo != null">biz_no,</if>
-            <if test="status != null">status,</if>
-            <if test="lastError != null">last_error,</if>
-            <if test="createdAt != null">created_at</if>
-        </trim>
-        <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="requestId != null">#{requestId},</if>
-            <if test="bizType != null">#{bizType},</if>
-            <if test="bizNo != null">#{bizNo},</if>
-            <if test="status != null">#{status},</if>
-            <if test="lastError != null">#{lastError},</if>
-            <if test="createdAt != null">#{createdAt}</if>
-        </trim>
-    </insert>
-
-    <!-- 修改钱包接口幂等控制表 -->
-    <update id="updateWalletRequestLog">
-        UPDATE wallet_request_log
-        <set>
-            <if test="requestId != null">request_id = #{requestId},</if>
-            <if test="bizType != null">biz_type = #{bizType},</if>
-            <if test="bizNo != null">biz_no = #{bizNo},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="lastError != null">last_error = #{lastError},</if>
-            <if test="createdAt != null">created_at = #{createdAt}</if>
-        </set>
-        WHERE id = #{id}
-    </update>
-    <!-- This code was generated by TableGo tools, mark 2 end. -->
-
-    <!-- 删除钱包接口幂等控制表 -->
-    <delete id="deleteWalletRequestLogById">
-        DELETE FROM wallet_request_log WHERE id = #{id}
-    </delete>
-
-    <!-- 批量删除钱包接口幂等控制表 -->
-    <delete id="deleteWalletRequestLogByIds">
-        DELETE FROM wallet_request_log WHERE id IN
-        <foreach collection="idList" index="index" item="id" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-</mapper>