package org.jeecg.modules.dataVue.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import jtznyj.common.api.vo.AFocusWarn;
import org.aspectj.weaver.loadtime.Aj;
import org.jeecg.modules.dataVue.entity.Ajh;
import org.jeecg.modules.dataVue.entity.Mock;
import jtznyj.engineer.vo.LtdRecord;
import org.jeecg.modules.warning.entity.Ltd;

import java.util.List;
import java.util.Map;

public interface MockMapper extends BaseMapper<Mock> {
    @Select("${sqlStr}")
    List<Map<String, Object>> querySqlA(@Param(value = "sqlStr") String sqlStr);

    @Select("${sqlStr}")
    List<LtdRecord> querySqlLTD(@Param(value = "sqlStr") String sqlStr);

    @Select("${sqlStr}")
    int queryCountA(@Param(value = "sqlStr") String sqlStr);

    @Select("${sql}")
    AFocusWarn queryOneBySql(@Param("sql") String sql);

    List<Ltd> selectList(Map<String,Object> map);
    List<Ajh> selectNotNullList();
    List<Ltd> selectYData(Map<String,Object> map);
    Ltd selectDate(Map<String,Object> map);

    //@Select("select distinct SUBSTR(TIME, 1, 10) as TIME from ${table} order by TIME desc")
    List<Map<String,Object>> selectAllDate(Map<String,Object> map);

    int updateAjhWarnByJh(@Param("jh") String jh , @Param("warnTime") String warnTime , @Param("count") int count);
}