KKSU
2024-03-13 e9c73e4187d6502963055a152dbd07f9b73221e9
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() {