| | |
| | | package cc.mrbird.febs; |
| | | |
| | | import cc.mrbird.febs.dapp.entity.DappMemberEntity; |
| | | import cc.mrbird.febs.dapp.mapper.DappMemberDao; |
| | | import cc.mrbird.febs.job.MineProfitJob; |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUnit; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author |
| | |
| | | |
| | | @Autowired |
| | | private MineProfitJob mineProfitJob; |
| | | @Autowired |
| | | private DappMemberDao dappMemberDao; |
| | | |
| | | @Test |
| | | public void incomeTest() { |
| | | mineProfitJob.start(); |
| | | } |
| | | |
| | | @Test |
| | | public void userTest() { |
| | | DappMemberEntity member = dappMemberDao.selectById(6L); |
| | | mineProfitJob.calAgentMoney(member, BigDecimal.TEN); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | DateTime tomorrow = DateUtil.beginOfDay(DateUtil.tomorrow()); |
| | | System.out.println(DateUtil.between(new Date(), tomorrow, DateUnit.SECOND, true)); |
| | | } |
| | | } |