package com.gyee.frame.mapper.auto;

import com.gyee.frame.model.auto.Misdailydata;
import com.gyee.frame.model.auto.MisdailydataExample;

import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import javax.xml.crypto.Data;

public interface MisdailydataMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table MISDAILYDATA
     *
     * @mbg.generated
     */
    long countByExample(MisdailydataExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table MISDAILYDATA
     *
     * @mbg.generated
     */
    int deleteByExample(MisdailydataExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table MISDAILYDATA
     *
     * @mbg.generated
     */
    int deleteByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table MISDAILYDATA
     *
     * @mbg.generated
     */
    int insert(Misdailydata record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table MISDAILYDATA
     *
     * @mbg.generated
     */
    int insertSelective(Misdailydata record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table MISDAILYDATA
     *
     * @mbg.generated
     */
    List<Misdailydata> selectByExample(MisdailydataExample example);


    @Select("select * from NXFDPROD.MISDAILYDATA  where IMPORTDATE = to_date ('${IMPORTDATE}','yyyy-MM-dd') and UNIT_NO is null and PROJECTID ='${PROJECTID}'")
    List<Misdailydata> selectByExamplegz(@Param("IMPORTDATE") String IMPORTDATE, @Param("PROJECTID") String PROJECTID);

    @Select("select * from NXFDPROD.MISDAILYDATA  where IMPORTDATE = to_date ('${IMPORTDATE}','yyyy-MM-dd') and UNIT_NO is null and NAME ='${NAME}'")
    List<Misdailydata> selectByExamplegl(@Param("IMPORTDATE") String IMPORTDATE, @Param("NAME") String NAME);

//    @Select("select wc.windplant_no,wc.abbr_name,nd.data_time,nd.value,wc.wpfmodel_no from NOSCALE_WF_DA_PF_PERIOD_DATA nd left join wf_file_config wc on nd.windplant_no = wc.windplant_no order by nd.data_time desc")


    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table MISDAILYDATA
     *
     * @mbg.generated
     */
    Misdailydata selectByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table MISDAILYDATA
     *
     * @mbg.generated
     */
    int updateByExampleSelective(@Param("record") Misdailydata record, @Param("example") MisdailydataExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table MISDAILYDATA
     *
     * @mbg.generated
     */
    int updateByExample(@Param("record") Misdailydata record, @Param("example") MisdailydataExample example);

    @Update("update misdailydata set dqglyczql=${dqglyczql} where id=${id}")
    int updategl(@Param("dqglyczql") Double dqglyczql,@Param("id") String id);
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table MISDAILYDATA
     *
     * @mbg.generated
     */
    int updateByPrimaryKeySelective(Misdailydata record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table MISDAILYDATA
     *
     * @mbg.generated
     */
    int updateByPrimaryKey(Misdailydata record);
}