From 8d6f2fe54a4456d6e56c4473b951f773b2b362d8 Mon Sep 17 00:00:00 2001
From: Administrator <1101184511@qq.com>
Date: 星期日, 27 七月 2025 22:58:05 +0800
Subject: [PATCH] 后台管理页面完成

---
 src/test/java/com/taoke/autopay/AgentTest.java |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 56 insertions(+), 4 deletions(-)

diff --git a/src/test/java/com/taoke/autopay/AgentTest.java b/src/test/java/com/taoke/autopay/AgentTest.java
index 919c5d9..cd32aaa 100644
--- a/src/test/java/com/taoke/autopay/AgentTest.java
+++ b/src/test/java/com/taoke/autopay/AgentTest.java
@@ -1,17 +1,23 @@
 package com.taoke.autopay;
 
-import com.taoke.autopay.dao.agent.ChannelAgentMapper;
+import com.taoke.autopay.dao.agent.ChannelAgentSettleDetailMapper;
+import com.taoke.autopay.dao.agent.ChannelAgentSettleRecordMapper;
 import com.taoke.autopay.dao.agent.ChannelAgentSharingRatioMapper;
-import com.taoke.autopay.entity.OrderChannelEnum;
 import com.taoke.autopay.entity.agent.ChannelAgent;
-import com.taoke.autopay.entity.agent.ChannelAgentSharingRatio;
+import com.taoke.autopay.entity.agent.ChannelAgentSettings;
+import com.taoke.autopay.entity.agent.ChannelAgentSettleRecord;
 import com.taoke.autopay.exception.ChannelAgentException;
+import com.taoke.autopay.exception.ChannelAgentSettleException;
 import com.taoke.autopay.service.agent.ChannelAgentService;
+import com.taoke.autopay.service.agent.ChannelAgentSettingService;
+import com.taoke.autopay.service.agent.ChannelAgentSettleService;
+import com.taoke.autopay.utils.StringUtil;
+import com.taoke.autopay.utils.TimeUtil;
 import org.junit.jupiter.api.Test;
 import org.springframework.boot.test.context.SpringBootTest;
 
 import javax.annotation.Resource;
-import java.math.BigDecimal;
+import java.util.List;
 
 /**
  * @author hxh
@@ -27,6 +33,15 @@
 
     @Resource
     private ChannelAgentSharingRatioMapper channelAgentSharingRatioMapper;
+    @Resource
+    private ChannelAgentSettleService channelAgentSettleService;
+
+    @Resource
+    private ChannelAgentSettleRecordMapper channelAgentSettleRecordMapper;
+
+
+    @Resource
+    private ChannelAgentSettleDetailMapper channelAgentSettleDetailMapper;
 
 
     @Test
@@ -39,4 +54,41 @@
 //        ChannelAgentSharingRatio
     }
 
+    @Test
+    public void testSettle() throws ChannelAgentSettleException {
+
+        channelAgentSettleService.startSettle("2024-07-28");
+
+    }
+
+    @Test
+    public void testGetSettle() throws ChannelAgentSettleException {
+//        channelAgentSettleDetailMapper.listBySettleId(1L);
+//        channelAgentSettleRecordMapper.selectByPrimaryKey(1L);
+
+        ChannelAgentSettleRecordMapper.DaoQuery daoQuery= new  ChannelAgentSettleRecordMapper.DaoQuery();
+        daoQuery.count=100;
+//
+        List<ChannelAgentSettleRecord> records = channelAgentSettleService.list(daoQuery);
+        System.out.println(records);
+
+    }
+
+    @Resource
+    private ChannelAgentSettingService channelAgentSettingService;
+
+    @Test
+    public void testSettings(){
+        ChannelAgentSettings settings = channelAgentSettingService.selectByAgentId(16L);
+        if(settings!=null&&!StringUtil.isNullOrEmpty(settings.getStartSubmitTime())&&!StringUtil.isNullOrEmpty(settings.getEndSubmitTime())){
+            String now = TimeUtil.getGernalTime(System.currentTimeMillis(), "HHmmss");
+            String startTime = settings.getStartSubmitTime().replace(":","");
+            String endTime = settings.getEndSubmitTime().replace(":","");
+            if (Integer.parseInt(now) < Integer.parseInt(startTime) || Integer.parseInt(now) > Integer.parseInt(endTime)) {
+              System.out.println("");
+            }
+        }
+
+    }
+
 }

--
Gitblit v1.8.0