package com.izouma.wenlvju.service;


import com.izouma.wenlvju.ApplicationTests;
import com.izouma.wenlvju.domain.PerformanceApply;
import com.izouma.wenlvju.exception.BusinessException;
import com.izouma.wenlvju.repo.PerformanceApplyRepo;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

public class PerformanceApplyServiceTest extends ApplicationTests {

    @Autowired
    private PerformanceApplyService performanceApplyService;
    @Autowired
    private PerformanceApplyRepo    performanceApplyRepo;

    @Test
    public void test() {
        performanceApplyService.autoArrangement1(115L).forEach(System.out::println);

    }

    @Test
    public void test1() {
        performanceApplyService.score(14L, 79, 1L);
    }

    @Test
    public void test2() {
        PerformanceApply performanceApply = performanceApplyRepo.findById(895L)
                .orElseThrow(new BusinessException("无此表演"));
        System.out.println(performanceApplyService.getAuth(895L, "15150689190", performanceApply.getPhone()));
    }

}