From bc56870059cca013649077af0e53891cba8dbfd1 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期日, 04 八月 2024 09:43:41 +0800
Subject: [PATCH] 代理新功能完善

---
 src/test/java/com/taoke/autopay/KeyTest.java |   48 ++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 40 insertions(+), 8 deletions(-)

diff --git a/src/test/java/com/taoke/autopay/KeyTest.java b/src/test/java/com/taoke/autopay/KeyTest.java
index 61a3cac..8a7dbfb 100644
--- a/src/test/java/com/taoke/autopay/KeyTest.java
+++ b/src/test/java/com/taoke/autopay/KeyTest.java
@@ -1,7 +1,9 @@
 package com.taoke.autopay;
 
+import com.taoke.autopay.dao.KeyOrderMapper;
 import com.taoke.autopay.dto.DYOrderDto;
 import com.taoke.autopay.entity.KeyOrder;
+import com.taoke.autopay.entity.OrderCountTypeEnum;
 import com.taoke.autopay.entity.SystemConfigKeyEnum;
 import com.taoke.autopay.exception.KeyOrderException;
 import com.taoke.autopay.exception.KeyVerifyException;
@@ -45,7 +47,7 @@
 
 
         String verifyAlipayKey = systemConfigService.getValueCache(SystemConfigKeyEnum.ALIPAY_KEY_VERIFY);
-        if(verifyAlipayKey!=null&&verifyAlipayKey.trim().equalsIgnoreCase("1")||true) {
+        if (verifyAlipayKey != null && verifyAlipayKey.trim().equalsIgnoreCase("1") || true) {
             try {
                 // 闇�瑕侀獙璇佹敮浠樺疂鍙d护
                 if (urllist.size() < 1) {
@@ -71,18 +73,17 @@
                 }
                 // 楠岃瘉鍐呭
                 DYOrderDto dto = keyOrderService.verifyKey(tradeInfo.getGoodsTitle(), orderStatus, tradeInfo.getItemRealAmount());
-            }catch(KeyVerifyException ee){
-                throw  ee;
-            }
-            catch(Exception e){
+            } catch (KeyVerifyException ee) {
+                throw ee;
+            } catch (Exception e) {
                 throw new KeyVerifyException(KeyVerifyException.CODE_COMMON, e.getMessage());
             }
         }
     }
 
     @Test
-    public void test1()  {
-        SubmitKeyInfo keyInfo=new SubmitKeyInfo();
+    public void test1() {
+        SubmitKeyInfo keyInfo = new SubmitKeyInfo();
         keyInfo.setKey("銆愭敮fu`瀵炽�戜翰锛屽鍒� Q:/dYsUzQV77s5  p:/S ZH2412 2020/11/27鎵撳紑鏀粯瀹濆氨鍙互甯垜馃彯浠樻鍟︷煉猦ttps://ur.alipay.com/_Ig4toHTlLHbBqiJqb3dpC");
         try {
             addKey(keyInfo, 1L);
@@ -97,11 +98,42 @@
 
     @Test
     public void testRePay() throws InterruptedException {
-        for(int i=0;i<10;i++) {
+        for (int i = 0; i < 10; i++) {
             orderPayFailProcessor.processPayFail("2c9d0dd55cd845819c8e6010fe10def4", "璇诲彇鏀粯瀹濈矘璐存澘瓒呮椂");
             Thread.sleep(2000);
             orderPayFailProcessor.processFromQueue();
         }
     }
 
+    @Test
+    public void statisticAgentId() {
+        KeyOrderMapper.DaoQuery query=new KeyOrderMapper.DaoQuery();
+        query.hasAgentId=true;
+        query.hasPayTime = true;
+        query.state =2;
+        query.count = 100;
+
+        List<Long> list =   keyOrderService.listAgentId(query);
+        System.out.println(list);
+    }
+
+    @Test
+    public void repaire(){
+        KeyOrderMapper.DaoQuery query=new KeyOrderMapper.DaoQuery();
+        query.state=3;
+        query.minCreateTime=new Date(TimeUtil.convertToTimeTemp("2024-08-02","yyyy-MM-dd"));
+        query.stateDesc="璁㈠崟宸叉敮浠�";
+        query.count = 1000;
+        List<KeyOrder>  list =  keyOrderService.list(query);
+        for(KeyOrder o:list){
+            KeyOrder update=new KeyOrder();
+            update.setId(o.getId());
+            update.setState(KeyOrder.STATE_PAY);
+            update.setPayTime(o.getExcutePayTime());
+            keyOrderService.update(update);
+        }
+
+    }
+
+
 }

--
Gitblit v1.8.0