package link.at17.mid.tushare.dao;

import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.github.yulichang.base.MPJBaseMapper;

import link.at17.mid.tushare.annotation.BatchInsert;
import link.at17.mid.tushare.annotation.BatchList;
import link.at17.mid.tushare.data.models.StockInfo;
import link.at17.mid.tushare.enums.ListStatus;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface StockInfoDao extends MPJBaseMapper<StockInfo> {
    @BatchInsert
    void insertOrUpdateList(@BatchList List<JSONObject> list);
    StockInfo getStockInfoByStockCode(@Param("stockCode") String stockCode);
    List<StockInfo> getStockListByListStatus(ListStatus listStatus);
    List<StockInfo> selectListWithoutThs(@Param("ew") Wrapper<StockInfo> ew);
}
