skyline 2 лет назад
Родитель
Сommit
a84c411b34

+ 33 - 32
admin-web/src/views/admin/finance/index.vue

@@ -54,23 +54,23 @@
             @blur="loadData(true)"
             class="wd150 mr10">
         </el-input>
-<!--        <el-input
-            v-model="state.formQuery.tradeType"
-            placeholder="交易类型,枚举值:JSAPI:公众号支付 NATIVE:扫码支付 APP:APP支付 MICROPAY:付款码支付 MWEB:H5支付 FACEPAY:刷脸支付"
-            clearable
-            @blur="loadData(true)"
-            class="wd150 mr10">
-        </el-input>-->
-<!--        <el-input
-            v-model="state.formQuery.tradeState"
-            placeholder="交易状态,枚举值:SUCCESS:支付成功REFUND:转入退款NOTPAY:未支付CLOSED:已关闭REVOKED:已撤销(付款码支付)USERPAYING:用户支付中(付款码支付)PAYERROR:支付失败(其他原因,如银行返回失败)"
-            clearable
-            @blur="loadData(true)"
-            class="wd150 mr10">
-        </el-input>-->
-
-
-        <el-button class="ml10"  plain size="default" type="success" @click="loadData(true)">
+        <!--        <el-input
+                    v-model="state.formQuery.tradeType"
+                    placeholder="交易类型,枚举值:JSAPI:公众号支付 NATIVE:扫码支付 APP:APP支付 MICROPAY:付款码支付 MWEB:H5支付 FACEPAY:刷脸支付"
+                    clearable
+                    @blur="loadData(true)"
+                    class="wd150 mr10">
+                </el-input>-->
+        <!--        <el-input
+                    v-model="state.formQuery.tradeState"
+                    placeholder="交易状态,枚举值:SUCCESS:支付成功REFUND:转入退款NOTPAY:未支付CLOSED:已关闭REVOKED:已撤销(付款码支付)USERPAYING:用户支付中(付款码支付)PAYERROR:支付失败(其他原因,如银行返回失败)"
+                    clearable
+                    @blur="loadData(true)"
+                    class="wd150 mr10">
+                </el-input>-->
+
+
+        <el-button class="ml10" plain size="default" type="success" @click="loadData(true)">
           <SvgIcon name="ele-Search"/>
           查询
         </el-button>
@@ -106,7 +106,7 @@
               <p style="padding-left: 2em;" v-html="row[field.prop]"></p>
             </template>
             <template v-else>
-              <div>{{row[field.prop]}}</div>
+              <div>{{ row[field.prop] }}</div>
             </template>
 
           </template>
@@ -119,17 +119,17 @@
 </template>
 
 <script setup lang="ts" name="PayLogList">
-import {defineAsyncComponent, reactive, onMounted, onBeforeMount, ref, getCurrentInstance, nextTick, onBeforeUnmount} from 'vue';
-import {$body,$get} from "/@/utils/request";
+import {nextTick, onBeforeMount, onBeforeUnmount, onMounted, reactive, ref} from 'vue';
+import {$get} from "/@/utils/request";
 import {Msg} from "/@/utils/message";
 
 import {useRoute} from "vue-router";
-
-const route = useRoute();
 import ExtPage from '/@/components/form/ExtPage.vue'
 
 import mittBus from '/@/utils/mitt';
 
+const route = useRoute();
+
 
 //定义引用
 const queryRef = ref();
@@ -145,17 +145,18 @@ const state = reactive({
   },
   tableData: {
     height: 500,
-    data: [] as Array < any >,
+    data: [] as Array<any>,
     loading: false,
     columns: [
-      {label: '用户手机号', prop: 'mobilePhone',width:150, resizable: true,fixed:'left'},
-      {label: '商户订单号', prop: 'outTradeNo', width:250,resizable: true},
-      {label: '微信订单号', prop: 'transactionId', width:250,resizable: true},
-      {label: '交易类型', prop: 'tradeType', width:150,resizable: true},
-      // {label: '交易状态', prop: 'tradeState', resizable: true},
-      {label: '订单总金额', prop: 'rechargeAmount', resizable: true,width:130},
-      {label: '用户支付币种', prop: 'currency', width:150,resizable: true},
-      {label: '支付完成时间', prop: 'transactionTime', sortable: 'custom', resizable: true,width:200,fixed:'right'},
+      {label: '用户ID', prop: 'userId', width: 200, resizable: true, fixed: 'left'},
+      {label: '用户手机号', prop: 'mobilePhone', width: 150, resizable: true, fixed: 'left'},
+      {label: '商户订单号', prop: 'outTradeNo', width: 250, resizable: true},
+      {label: '微信订单号', prop: 'transactionId', width: 250, resizable: true},
+      {label: '订单总金额', prop: 'rechargeAmount', resizable: true, width: 130},
+      // {label: '交易类型', prop: 'tradeType', width: 150, resizable: true},
+      {label: '交易状态', prop: 'tradeState', width: 150, resizable: true},
+      {label: '用户支付币种', prop: 'currency', width: 150, resizable: true},
+      {label: '支付完成时间', prop: 'transactionTime', sortable: 'custom', resizable: true, width: 200, fixed: 'right'},
     ],
   },
 })
@@ -176,7 +177,7 @@ onBeforeMount(() => {
 onMounted(() => {
   var query = route.query;
   console.log(route.params, route.query)
-  if(query.mobilePhone){
+  if (query.mobilePhone) {
     state.formQuery.mobilePhone = query.mobilePhone;
   }
 

+ 1 - 0
entity/src/main/java/com/kym/entity/admin/vo/CustomRechargeVo.java

@@ -22,4 +22,5 @@ public class CustomRechargeVo {
     private String transactionId;
     @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private String transactionTime;
+    private String tradeState;
 }

+ 8 - 5
mapper/src/main/resources/mappers/miniapp/PayLogMapper.xml

@@ -31,6 +31,7 @@
         <result column="out_trade_no" property="outTradeNo"/>
         <result column="transaction_id" property="transactionId"/>
         <result column="transaction_time" property="transactionTime"/>
+        <result column="trade_state" property="tradeState"/>
     </resultMap>
 
 
@@ -44,24 +45,26 @@
         SELECT
         t1.user_id,
         t2.`mobile_phone`,
-        t1.total AS rechargeAmount,
+        t1.total AS recharge_amount,
         t1.currency,
         t1.out_trade_no,
         t1.transaction_id,
-        CONVERT(t1.success_time,DATETIME) AS transaction_time
+        CONVERT(t1.success_time,DATETIME) AS transaction_time,
+        t1.trade_state
         FROM
         t_pay_log t1
         LEFT JOIN t_user t2
         ON t1.`user_id` = t2.`id`
         <if test="params.mobilePhone != null and params.mobilePhone!=''">
-            where t2.mobile_phone = ${params.mobilePhone}
+            where t2.mobile_phone = #{params.mobilePhone}
         </if>
         <if test="params.transactionId != null and params.transactionId!=''">
-            where t1.transaction_id = ${params.transactionId}
+            where t1.transaction_id = #{params.transactionId}
         </if>
         <if test="params.outTradeNo != null and params.outTradeNo!=''">
-            where t1.out_trade_no = ${params.outTradeNo}
+            where t1.out_trade_no = #{params.outTradeNo}
         </if>
+        order by t1.create_time desc
     </select>
 
 </mapper>