From 0066395d8a6ea70d622e5173144e9dee2c7a8f1e Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Tue, 28 Nov 2023 10:30:02 +0800
Subject: [PATCH] 匹配

---
 src/main/resources/mapper/modules/MallProductNftMapper.xml                  |   20 +++++++++++++++++---
 src/main/resources/templates/febs/views/modules/news/productBuyListNew.html |   30 +++++++++++++++++++++++++-----
 src/main/resources/templates/febs/views/modules/news/productSellList.html   |    1 +
 src/main/java/cc/mrbird/febs/mall/vo/AdminMallProductSellVo.java            |    1 +
 src/main/java/cc/mrbird/febs/mall/entity/MallProductBuy.java                |    4 ++--
 5 files changed, 46 insertions(+), 10 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/mall/entity/MallProductBuy.java b/src/main/java/cc/mrbird/febs/mall/entity/MallProductBuy.java
index d410e25..466bae6 100644
--- a/src/main/java/cc/mrbird/febs/mall/entity/MallProductBuy.java
+++ b/src/main/java/cc/mrbird/febs/mall/entity/MallProductBuy.java
@@ -17,8 +17,8 @@
     private String orderNo;
     private Long sellId;//出售ID
     private Long productNftId;//预约NFTID
-    private int state;//预约状态  0:失败 1:进行中 2:超时  3:已完成
-    private int mateState;//转换卖单状态 0:未转换 1:已转换
+    private Integer state;//预约状态  0:失败 1:进行中 2:超时  3:已完成
+    private Integer mateState;//转换卖单状态 0:未转换 1:已转换
     private BigDecimal nftTotal;//nft预约额度
     private BigDecimal nftAva;//待分配额度
     private Date orderTime;//匹配时间
diff --git a/src/main/java/cc/mrbird/febs/mall/vo/AdminMallProductSellVo.java b/src/main/java/cc/mrbird/febs/mall/vo/AdminMallProductSellVo.java
index 99a8c35..dfc0edf 100644
--- a/src/main/java/cc/mrbird/febs/mall/vo/AdminMallProductSellVo.java
+++ b/src/main/java/cc/mrbird/febs/mall/vo/AdminMallProductSellVo.java
@@ -11,6 +11,7 @@
 
     private Long id;
     private String accountLogin;//登录账户
+    private String orderNo;//登录账户
     private BigDecimal nftTotal;//动态NFT总数
     private BigDecimal nftCnt;//实际提现数量
     private BigDecimal nftCntAva;//剩余数量
diff --git a/src/main/resources/mapper/modules/MallProductNftMapper.xml b/src/main/resources/mapper/modules/MallProductNftMapper.xml
index 3cfd8fd..fcdfe1b 100644
--- a/src/main/resources/mapper/modules/MallProductNftMapper.xml
+++ b/src/main/resources/mapper/modules/MallProductNftMapper.xml
@@ -27,6 +27,12 @@
                 <if test="record.accountLogin!=null and record.accountLogin!=''">
                     and b.account_login like concat('%',  #{record.accountLogin},'%')
                 </if>
+                <if test="record.orderNo!=null and record.orderNo!=''">
+                    and a.order_no = #{record.orderNo}
+                </if>
+                <if test="record.state != null">
+                    and a.state = #{record.state}
+                </if>
             </if>
         </where>
         order by a.CREATED_TIME desc
@@ -40,15 +46,23 @@
         left join mall_member b on a.member_id = b.id
         <where>
             <if test="record != null" >
-                <if test="record.accountLogin!=null and record.accountLogin!=''">
                     and a.buy_id in  (
                     SELECT
                     c.id
                     FROM mall_product_buy c
                     left join mall_member d on c.member_id = d.id
-                        where d.account_login like concat('%',  #{record.accountLogin},'%')
+                    <where>
+                         <if test="record.accountLogin!=null and record.accountLogin!=''">
+                            and d.account_login like concat('%',  #{record.accountLogin},'%')
+                         </if>
+                        <if test="record.orderNo!=null and record.orderNo!=''">
+                            and c.order_no = #{record.orderNo}
+                        </if>
+                        <if test="record.state!=null">
+                            and c.state = #{record.state}
+                        </if>
+                    </where>
                     )
-                </if>
             </if>
         </where>
         order by a.CREATED_TIME desc
diff --git a/src/main/resources/templates/febs/views/modules/news/productBuyListNew.html b/src/main/resources/templates/febs/views/modules/news/productBuyListNew.html
index eb86ec8..42a33ad 100644
--- a/src/main/resources/templates/febs/views/modules/news/productBuyListNew.html
+++ b/src/main/resources/templates/febs/views/modules/news/productBuyListNew.html
@@ -5,13 +5,30 @@
                 <div class="layui-card-body febs-table-full">
                     <form class="layui-form layui-table-form" lay-filter="user-table-form">
                         <div class="layui-row">
-
                             <div class="layui-col-md10">
                                 <div class="layui-form-item">
                                     <div class="layui-inline">
                                         <label class="layui-form-label">登录账户:</label>
                                         <div class="layui-input-inline">
                                             <input type="text" placeholder="登录账户" name="accountLogin" autocomplete="off" class="layui-input">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">编号:</label>
+                                        <div class="layui-input-inline">
+                                            <input type="text" placeholder="编号" name="orderNo" autocomplete="off" class="layui-input">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">预约状态:</label>
+                                        <div class="layui-input-inline">
+                                            <select name="state">
+                                                <option value="">请选择</option>
+                                                <option value="0">失败</option>
+                                                <option value="1">进行中</option>
+                                                <option value="2">超时</option>
+                                                <option value="3">已完成</option>
+                                            </select>
                                         </div>
                                     </div>
                                 </div>
@@ -240,11 +257,12 @@
                 url: ctx + 'admin/news/getBuyList',
                 cols: [[
                     {field: 'accountLogin', title: '登录账户', minWidth: 120,align:'center'},
-                    {field: 'nftTotal', title: '预约额度', minWidth: 120,align:'center'},
-                    {field: 'nftAva', title: '可分配', minWidth: 120,align:'center'},
+                    {field: 'orderNo', title: '编号', minWidth: 200,align:'center'},
+                    {field: 'nftTotal', title: '预约额度', minWidth: 100,align:'center'},
+                    {field: 'nftAva', title: '可分配', minWidth: 100,align:'center'},
                     {field: 'orderTime', title: '匹配时间', minWidth: 120,align:'center'},
-                    {templet: '#isBuyState', title: '预约状态', minWidth: 120,align:'center'},
-                    {templet: '#isBuyMateState', title: '匹配状态', minWidth: 120,align:'center'},
+                    {templet: '#isBuyState', title: '预约状态', minWidth: 100,align:'center'},
+                    {templet: '#isBuyMateState', title: '匹配状态', minWidth: 100,align:'center'},
                     {title: '操作',
                         templet: function (d) {
                             if(d.state == 1){
@@ -279,6 +297,8 @@
         function getQueryParams() {
             return {
                 accountLogin: $searchForm.find('input[name="accountLogin"]').val().trim(),
+                orderNo: $searchForm.find('input[name="orderNo"]').val().trim(),
+                state: $searchForm.find("select[name='state']").val(),
             };
         }
 
diff --git a/src/main/resources/templates/febs/views/modules/news/productSellList.html b/src/main/resources/templates/febs/views/modules/news/productSellList.html
index efeedd2..1f785b5 100644
--- a/src/main/resources/templates/febs/views/modules/news/productSellList.html
+++ b/src/main/resources/templates/febs/views/modules/news/productSellList.html
@@ -144,6 +144,7 @@
                 url: ctx + 'admin/news/getSellList',
                 cols: [[
                     {field: 'accountLogin', title: '登录账户', minWidth: 120,align:'center'},
+                    {field: 'orderNo', title: '编号', minWidth: 220,align:'center'},
                     {field: 'nftTotal', title: '动态NFT', minWidth: 120,align:'center'},
                     {field: 'nftCnt', title: '实际提现', minWidth: 120,align:'center'},
                     {field: 'nftCntAva', title: '剩余数量', minWidth: 120,align:'center'},

--
Gitblit v1.9.1