فهرست منبع

处理过滤失败问题

sptkw 2 سال پیش
والد
کامیت
5f87140524

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

@@ -2,6 +2,7 @@ package com.sckw.payment.controller;
 
 import com.sckw.core.web.response.HttpResult;
 import com.sckw.payment.model.constant.SettlementOrderTypeEnum;
+import com.sckw.payment.model.constant.SettlementWalletPayTypeEnum;
 import com.sckw.payment.model.vo.req.OfflinePaymentReq;
 import com.sckw.payment.model.vo.req.SettlementOfflinePayReq;
 import com.sckw.payment.model.vo.req.SettlementOfflineReq;

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

@@ -38,7 +38,8 @@ public class KwpSettlementWalletController {
 
     @GetMapping(name = "物流-电子钱包付款(货到付款)结算记录-详情", path = "detailLogisticsPayment")
     public HttpResult detailLogisticsPayment(@RequestParam("id") Long id) {
-        return HttpResult.ok(kwpSettlementWalletService.detailLogisticsPayment(id));
+//        return HttpResult.ok(kwpSettlementWalletService.detailLogisticsPayment(id));
+        return HttpResult.ok(null);
     }
 
     /**

+ 1 - 1
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementOfflineMapper.java

@@ -16,7 +16,7 @@ import java.util.List;
  */
 @Mapper
 public interface KwpSettlementOfflineMapper extends BaseMapper<KwpSettlementOffline> {
-    List<SettlementOfflineDto> pageListLogisticsCollection(SettlementOfflineReq settlementOfflineReq);
+    List<SettlementOfflineDto> pageListLogisticsCollection(@Param("offlineReq") SettlementOfflineReq settlementOfflineReq);
 
     SettlementOfflineDto detailLogisticsCollection(@Param("id") Long id);
 

+ 5 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/req/SettlementWalletReq.java

@@ -13,6 +13,11 @@ import lombok.Setter;
 @Setter
 public class SettlementWalletReq extends BasePara {
 
+    /**
+     * 用于过滤当前登录者企业id
+     */
+    private Long entId;
+
     /**
      * 交易方式
      */

+ 7 - 4
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementWalletService.java

@@ -74,7 +74,7 @@ public class KwpSettlementWalletService {
     private TradeOrderInfoService tradeOrderInfoService;
     private final KwpSettlementLogisticsTrackMapper kwpSettlementLogisticsTrackMapper;
     @Resource
-    private  KwpLedgerTradeService ledgerTradeService;
+    private KwpLedgerTradeService ledgerTradeService;
 
 
     /**
@@ -84,16 +84,19 @@ public class KwpSettlementWalletService {
      * @date 2023-07-26 16:43
      */
     public PageRes<SettlementWalletVo> pageListLogisticsPayment(SettlementWalletReq settlementWalletReq) {
+//        //加上当前登录者顶级企业id用于过滤数据
+//        settlementWalletReq.setEntId(LoginUserHolder.getEntId());
+        //添加默认分页数据
         PageHelper.startPage(settlementWalletReq.getPage(), settlementWalletReq.getPageSize());
-        List<SettlementWalletDto> settlementWalletLogisticsList = settlementWalletMapper.pageListLogisticsPayment(settlementWalletReq);
+        List<SettlementWalletDto> settlementWalletLogisticsList = settlementWalletMapper.pageList(settlementWalletReq);
         PageInfo<SettlementWalletDto> pageInfo = new PageInfo<>(settlementWalletLogisticsList);
         if (CollectionUtils.isEmpty(settlementWalletLogisticsList)) {
             return new PageRes<>();
         }
         //增加对应创建人和更新人名称
         for (SettlementWalletDto entity : settlementWalletLogisticsList) {
-            entity.setCreateByText("创建人名称");
-            entity.setUpdateByText("更新人名称");
+            entity.setCreateByText("未知创建人");
+            entity.setUpdateByText("未知更新人");
         }
 
         Map<Long, UserCacheResDto> map = new HashMap<>();

+ 47 - 28
sckw-modules/sckw-payment/src/main/resources/mapper/KwpSettlementOfflineMapper.xml

@@ -1,44 +1,63 @@
 <?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.dao.KwpSettlementOfflineMapper">
-  <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpSettlementOffline">
-    <!--@mbg.generated-->
-    <!--@Table kwp_settlement_offline-->
-    <id column="id" jdbcType="BIGINT" property="id" />
-    <result column="ent_id" jdbcType="BIGINT" property="entId" />
-    <result column="settlement_id" jdbcType="BIGINT" property="settlementId" />
-    <result column="order_type" jdbcType="BOOLEAN" property="orderType" />
-    <result column="pay_time" jdbcType="TIMESTAMP" property="payTime" />
-    <result column="pay_price" jdbcType="DECIMAL" property="payPrice" />
-    <result column="topay_price" jdbcType="DECIMAL" property="topayPrice" />
-    <result column="url" jdbcType="VARCHAR" property="url" />
-    <result column="remark" jdbcType="VARCHAR" property="remark" />
-    <result column="status" jdbcType="INTEGER" property="status" />
-    <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="INTEGER" property="delFlag" />
-  </resultMap>
-  <sql id="Base_Column_List">
-    <!--@mbg.generated-->
-    id, ent_id, settlement_id, order_type, pay_time, pay_price, topay_price, url, remark, 
-    `status`, create_by, create_time, update_by, update_time, del_flag
-  </sql>
+    <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpSettlementOffline">
+        <!--@mbg.generated-->
+        <!--@Table kwp_settlement_offline-->
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="ent_id" jdbcType="BIGINT" property="entId"/>
+        <result column="settlement_id" jdbcType="BIGINT" property="settlementId"/>
+        <result column="order_type" jdbcType="BOOLEAN" property="orderType"/>
+        <result column="pay_time" jdbcType="TIMESTAMP" property="payTime"/>
+        <result column="pay_price" jdbcType="DECIMAL" property="payPrice"/>
+        <result column="topay_price" jdbcType="DECIMAL" property="topayPrice"/>
+        <result column="url" jdbcType="VARCHAR" property="url"/>
+        <result column="remark" jdbcType="VARCHAR" property="remark"/>
+        <result column="status" jdbcType="INTEGER" property="status"/>
+        <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="INTEGER" property="delFlag"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <!--@mbg.generated-->
+        id,
+        ent_id,
+        settlement_id,
+        order_type,
+        pay_time,
+        pay_price,
+        topay_price,
+        url,
+        remark,
+        `status`,
+        create_by,
+        create_time,
+        update_by,
+        update_time,
+        del_flag
+    </sql>
 
     <!-- 物流-线下付款(运费收款)记录-列表 -->
     <select id="pageListLogisticsCollection" resultType="com.sckw.payment.model.dto.SettlementOfflineDto">
         select
-        <include refid="Base_Column_List" />
+        <include refid="Base_Column_List"/>
         FROM kwp_settlement_offline
         <where>
-            order_type = 1
+            del_flag = 0
+            <if test="offlineReq.orderType != null">
+                and order_type = #{offlineReq.orderType,jdbcType=INTEGER}
+            </if>
+            <if test="offlineReq.id != null and offlineReq.id != ''">
+                and settlement_id = #{offlineReq.id,jdbcType=INTEGER}
+            </if>
         </where>
     </select>
 
     <select id="detailLogisticsCollection" resultType="com.sckw.payment.model.dto.SettlementOfflineDto">
         select
-        <include refid="Base_Column_List" />
+        <include refid="Base_Column_List"/>
         FROM kwp_settlement_offline
         <where>
             order_type = 1
@@ -50,7 +69,7 @@
 
     <select id="pageList" resultType="com.sckw.payment.model.dto.SettlementOfflineDto">
         select
-        <include refid="Base_Column_List" />
+        <include refid="Base_Column_List"/>
         FROM kwp_settlement_offline
         <where>
             del_flag = 0

+ 10 - 1
sckw-modules/sckw-payment/src/main/resources/mapper/KwpSettlementWalletMapper.xml

@@ -66,7 +66,16 @@
         <include refid="Join_Column_List"/>
         from kwp_settlement_wallet w
         <where>
-            w.type = #{settlementWalletReq.payType}
+            w.del_flag = 0
+            <if test="settlementWalletReq.id != null and settlementWalletReq.id != ''">
+                and w.settlement_id = #{settlementWalletReq.id,jdbcType=INTEGER}
+            </if>
+            <if test="settlementWalletReq.orderType != null">
+                and w.order_type = #{settlementWalletReq.orderType,jdbcType=INTEGER}
+            </if>
+            <if test="settlementWalletReq.payType != null">
+                and w.type = #{settlementWalletReq.payType,jdbcType=INTEGER}
+            </if>
         </where>
         order by w.update_time desc
     </select>