package com.seamew.lottery.test;

import com.seamew.lottery.infrastructure.dao.IActivityDao;
import com.seamew.lottery.infrastructure.po.Activity;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.Date;

/**
 * @Author: seamew
 * @Title: ApiTest
 * @CreateTime: 2023年02月07日 17:23:00
 * @Description:
 * @Version: 1.0
 */
@RunWith(SpringRunner.class)
@SpringBootTest
public class ApiTest {
    @Autowired
    IActivityDao activityDao;
    @Test
    public void context() {
        // Activity activity = new Activity();
        // activity.setActivityId(100002l);
        // activity.setActivityName("测试活动");
        // activity.setActivityDesc("仅用于插入数据测试");
        // activity.setBeginDateTime(new Date());
        // activity.setEndDateTime(new Date());
        // activity.setStockCount(10);
        // activity.setTakeCount(10);
        // activity.setState(0);
        // activity.setCreator("admin");
        //
        // activityDao.insert(activity);

        Activity activity = activityDao.queryActivityById(100001L);
        System.out.println(activity);
    }

}


