package com.itbaizhan.trave;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itbaizhan.trave.bean.RoleWithStatus;
import com.itbaizhan.trave.mapper.ProductMapper;
import com.itbaizhan.trave.pojo.Admin;
import com.itbaizhan.trave.pojo.Category;
import com.itbaizhan.trave.service.AdminService;
import com.itbaizhan.trave.service.CategoryService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;

@SpringBootTest
class TraveApplicationTests {
    @Autowired
    private AdminService adminService;
    @Autowired
    private ProductMapper productMapper;
    @Autowired
    private CategoryService categoryService;

    @Test
    void contextLoads() {
//        Page<Admin> page = adminService.findPage(1, 5);
//        System.out.println(page);
//        Admin desc = adminService.findDesc(1);
//        System.out.println(desc);
//        List<RoleWithStatus> roleList = adminService.findRole(2);
//        System.out.println(roleList);
//        Page productPage = productMapper.findProductPage(new Page(1, 5));
//        System.out.println(productPage);
//        List<Category> all = categoryService.findAll();
//        System.out.println(all);
    }

}
