package com.trade.service;

import com.trade.service.filestorage.entity.TFileStorage;
import com.trade.service.filestorage.mapper.TFileStorageMapper;
import com.trade.service.filestorage.service.TFileStorageService;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;
import java.util.List;

@SpringBootTest
public class FileStorageTest {

    @Resource
    private TFileStorageMapper tFileStorageMapper;
    @Resource
    private TFileStorageService fileStorageService;

    @Test
    public void test() {
        System.out.println(("----- selectAll method test ------"));
        List<TFileStorage> userList = tFileStorageMapper.selectList(null);
        userList.forEach(System.out::println);
    }

    @Test
    public void test2() {
        List<TFileStorage> userList = fileStorageService.getFilesByBizNoAndBizType("123456", "1");
        userList.forEach(System.out::println);
    }

    @Test
    public void test3() {
        List<TFileStorage> userList = fileStorageService.getFilesByBizAndFileType("123456", "1","2");
        userList.forEach(e -> System.out.println(e.getFileType()));
    }
}
