package net.wicp.tams.app.duckula.controller.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import net.wicp.tams.app.duckula.controller.bean.models.RtdwFlinkbaseimage;
import net.wicp.tams.app.duckula.controller.bean.models.RtdwFlinkbaseimageExample;

public interface RtdwFlinkbaseimageMapper extends BaseMapper<RtdwFlinkbaseimage>{
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table rtdw_flinkbaseimage
     *
     * @mbg.generated
     */
    long countByExample(RtdwFlinkbaseimageExample example);

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

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table rtdw_flinkbaseimage
     *
     * @mbg.generated
     */
    @Delete({
        "delete from rtdw_flinkbaseimage",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table rtdw_flinkbaseimage
     *
     * @mbg.generated
     */
    @Insert({
        "insert into rtdw_flinkbaseimage (id, name, ",
        "image_rep, image_tag, ",
        "deploy_date, remark)",
        "values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, ",
        "#{imageRep,jdbcType=VARCHAR}, #{imageTag,jdbcType=VARCHAR}, ",
        "#{deployDate,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR})"
    })
    int insert(RtdwFlinkbaseimage record);

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

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

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table rtdw_flinkbaseimage
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "id, name, image_rep, image_tag, deploy_date, remark",
        "from rtdw_flinkbaseimage",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @ResultMap("net.wicp.tams.app.duckula.controller.dao.RtdwFlinkbaseimageMapper.BaseResultMap")
    RtdwFlinkbaseimage selectByPrimaryKey(Long id);

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

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

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table rtdw_flinkbaseimage
     *
     * @mbg.generated
     */
    int updateByPrimaryKeySelective(RtdwFlinkbaseimage record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table rtdw_flinkbaseimage
     *
     * @mbg.generated
     */
    @Update({
        "update rtdw_flinkbaseimage",
        "set name = #{name,jdbcType=VARCHAR},",
          "image_rep = #{imageRep,jdbcType=VARCHAR},",
          "image_tag = #{imageTag,jdbcType=VARCHAR},",
          "deploy_date = #{deployDate,jdbcType=TIMESTAMP},",
          "remark = #{remark,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(RtdwFlinkbaseimage record);
}