Helius
2022-05-19 7e6bbd05a75b07cb0717812d0b51aad128361012
src/test/java/cc/mrbird/febs/AgentTest.java
@@ -4,7 +4,10 @@
import cc.mrbird.febs.mall.dto.AgentLevelUpdateDto;
import cc.mrbird.febs.mall.entity.AgentInfo;
import cc.mrbird.febs.mall.entity.DataDictionaryCustom;
import cc.mrbird.febs.mall.entity.MallGoodsStyle;
import cc.mrbird.febs.mall.mapper.DataDictionaryCustomMapper;
import cc.mrbird.febs.mall.mapper.MallGoodsStyleMapper;
import cc.mrbird.febs.mall.quartz.ProfitJob;
import cc.mrbird.febs.mall.service.IAgentService;
import cc.mrbird.febs.rabbit.producter.AgentProducer;
import com.alibaba.fastjson.JSONObject;
@@ -16,6 +19,7 @@
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.List;
/**
 * @author wzy
@@ -33,6 +37,15 @@
    @Autowired
    private IAgentService agentService;
    @Autowired
    private MallGoodsStyleMapper mallGoodsStyleMapper;
    @Test
    public void skusTest() {
        List<MallGoodsStyle> mallGoodsStyles = mallGoodsStyleMapper.selectByGoodsId(1L);
        System.out.println(mallGoodsStyles);
    }
    @Test
    public void agentTest() {
@@ -99,9 +112,17 @@
    @Test
    public void autoLevelUp() {
        // agentService.autoUpAgentLevel(3L);
        agentProducer.sendAutoLevelUpMsg(4L);
//        agentProducer.sendAutoLevelUpMsg(5L);
//        agentProducer.sendReturnMoneyMsg(24L);
        agentProducer.sendReturnMoneyMsg(2L);
    }
    @Test
    public void returnMoney() {
        // agentService.autoUpAgentLevel(3L);
//        agentProducer.sendAutoLevelUpMsg(5L);
//        agentProducer.sendReturnMoneyMsg(52L);
        agentService.returnMoneyToAgent(52L);
    }
    @Test
@@ -111,4 +132,12 @@
        System.out.println(aa.setScale(2, RoundingMode.DOWN));
        System.out.println(aa.setScale(2, RoundingMode.UP));
    }
    @Autowired
    private ProfitJob profitJob;
    @Test
    public void profitJobTest() {
        profitJob.profitJob();
    }
}