admin
2022-04-26 36681e15e12aaa9135f69260472de65303cdcba3
app/src/test/java/test/goldcorn/GoldCornTest.java
@@ -10,6 +10,7 @@
import com.yeshi.makemoney.app.exception.user.UserInfoException;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornGetRecordService;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornMakeService;
import com.yeshi.makemoney.app.service.inter.goldcorn.GoldCornSettleService;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@@ -32,6 +33,9 @@
    @Resource
    private GoldCornMakeService goldCornMakeService;
    @Resource
    private GoldCornSettleService goldCornSettleService;
    @Test
    public void addGoldRecord() throws GoldCornGetRecordException {
        GoldCornGetRecord record = new GoldCornGetRecord();
@@ -45,7 +49,7 @@
    @Test
    public void statistic() {
        Long count = goldCornGetRecordService.getGoldCornByDay(null, "2022-04-07");
        Long count = goldCornGetRecordService.getGoldCornByDay(null, new Date());
        System.out.println(count);
        count = goldCornGetRecordService.countUidsByDay("2022-04-07");
@@ -70,7 +74,7 @@
    @Test
    public void makeGoldCorn() {
        try {
            goldCornMakeService.addGoldCorn(22380L, GoldCornGetType.watchVideo,false,new Date());
            goldCornMakeService.addGoldCorn(22384L, GoldCornGetType.watchVideo,false,new Date(),null);
//            goldCornMakeService.addGoldCorn(22380L,GoldCornGetType.readNovel,new Date());
        } catch (UserInfoException e) {
            e.printStackTrace();
@@ -83,5 +87,10 @@
        }
    }
    @Test
    public void settle(){
        goldCornSettleService.startSettle(new Date(System.currentTimeMillis()-1000*60*60*24L));
    }
}