xucaiqin 2 днів тому
батько
коміт
ef34dfb5b7

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

@@ -15,7 +15,6 @@ public class ApplicationProperties {
     private String charge2;
     //代理费到账回调
     private String charge3;
-    private String prefix;
     private String account;
     private String split;
     private String cash;

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

@@ -107,7 +107,6 @@ public class WalletPayableController  {
      *
      * @return ModelAndView
      */
-
     @Operation(summary =  "人工录入")
     @PostMapping("/manualEntry")
     public BaseResult<Object> manualEntry(@RequestBody @Validated WalletPayableManualDto payableManualDto) {

+ 10 - 10
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);
+    }
     /**
      * 查询财务报表数据
      */
@@ -191,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);
-    }
+
 }

+ 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> {
     /**
      * 分页查询钱包_业务文件列表
      *

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

@@ -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("");

+ 34 - 10
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")
@@ -304,7 +307,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 +361,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 +370,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 +406,27 @@ public class WalletPrepaidServiceImpl implements IWalletPrepaidService {
         } finally {
             kwpWalletSplitMapper.insert(kwpWalletSplit);
         }
+        WalletBusinessFile walletBusinessFile = new WalletBusinessFile();
+        try {
+            walletBusinessFile.setBusinessId(kwpWalletSplit.getId());
+            walletBusinessFile.setRemark("");
+            walletBusinessFile.setStatus(0);
+            walletBusinessFile.setDelFlag(0);
+            walletBusinessFile.setCreateBy(LoginUserHolder.getUserId());
+            walletBusinessFile.setCreateTime(new Date());
+            walletBusinessFile.setUpdateBy(LoginUserHolder.getUserId());
+            walletBusinessFile.setUpdateTime(new Date());
+            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());