From b87c5549fe471167882192944db3f2d6b729476c Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Fri, 15 Mar 2024 14:13:55 +0800
Subject: [PATCH] 抽奖

---
 src/test/java/cc/mrbird/febs/AgentTest.java |   57 +++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 39 insertions(+), 18 deletions(-)

diff --git a/src/test/java/cc/mrbird/febs/AgentTest.java b/src/test/java/cc/mrbird/febs/AgentTest.java
index 18a1ded..164c7db 100644
--- a/src/test/java/cc/mrbird/febs/AgentTest.java
+++ b/src/test/java/cc/mrbird/febs/AgentTest.java
@@ -1,7 +1,17 @@
 package cc.mrbird.febs;
 
+import cc.mrbird.febs.common.enumerates.AgentLevelEnum;
+import cc.mrbird.febs.mall.entity.AgentInfo;
+import cc.mrbird.febs.mall.entity.DataDictionaryCustom;
+import cc.mrbird.febs.mall.entity.TzInfo;
+import cc.mrbird.febs.mall.mapper.DataDictionaryCustomMapper;
+import cc.mrbird.febs.mall.mapper.TzInfoMapper;
 import lombok.extern.slf4j.Slf4j;
+import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
+
+import java.math.BigDecimal;
 
 
 /**
@@ -12,11 +22,29 @@
 @SpringBootTest
 public class AgentTest {
 
+
+    @Autowired
+    private TzInfoMapper tzInfoMapper;
+
+    @Test
+    public void insertTzInfo(){
+        TzInfo tzInfo = new TzInfo();
+        tzInfo.setType(4);
+        tzInfo.setTzCode("红");
+        tzInfo.setTzPercent(new BigDecimal("20"));
+        tzInfoMapper.insert(tzInfo);
+        TzInfo tzInfo1 = new TzInfo();
+        tzInfo1.setType(4);
+        tzInfo1.setTzCode("蓝");
+        tzInfo1.setTzPercent(new BigDecimal("20"));
+        tzInfoMapper.insert(tzInfo1);
+    }
+
 //    @Autowired
 //    private AgentProducer agentProducer;
 //
-//    @Autowired
-//    private DataDictionaryCustomMapper dataDictionaryCustomMapper;
+    @Autowired
+    private DataDictionaryCustomMapper dataDictionaryCustomMapper;
 //
 //    @Autowired
 //    private IAgentService agentService;
@@ -501,22 +529,15 @@
 //        System.out.println(apiMallActWinDetailsVoIPage);
 //    }
 //
-//    @Test
-//    public void insertAgentTest() {
-////        AgentInfo agentInfo = new AgentInfo();
-////        agentInfo.setOrderType(2);
-////        agentInfo.setOrderCnt(2000);
-////        agentInfo.setLastCnt(3);
-////        agentInfo.setDirectIncome(BigDecimal.valueOf(50));
-////        agentInfo.setTeamIncome(BigDecimal.valueOf(15));
-////        agentInfo.setTeamIncomeType(2);
-////
-////        DataDictionaryCustom data = new DataDictionaryCustom();
-////        data.setType("AGENT_LEVEL_REQUIRE");
-////        data.setCode(AgentLevelEnum.FOUR_LEVEL.name());
-////        data.setValue(JSONObject.toJSONString(agentInfo));
-////        dataDictionaryCustomMapper.insert(data);
-//    }
+    @Test
+    public void insertAgentTest() {
+
+        DataDictionaryCustom data = new DataDictionaryCustom();
+        data.setType("AGENT_LEVEL_REQUIRE");
+        data.setCode(AgentLevelEnum.FOUR_LEVEL.name());
+        data.setValue("1");
+        dataDictionaryCustomMapper.insert(data);
+    }
 //
 //    @Test
 //    public void insertData() {

--
Gitblit v1.9.1