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.SysGlobal;
import net.wicp.tams.app.duckula.controller.bean.models.SysGlobalExample;

public interface SysGlobalMapper extends BaseMapper<SysGlobal>{

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table sys_global
	 * @mbg.generated
	 */
	long countByExample(SysGlobalExample example);

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

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

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table sys_global
	 * @mbg.generated
	 */
	@Insert({ "insert into sys_global (id, config_globle, ", "last_username, last_updatetime)",
			"values (#{id,jdbcType=BIGINT}, #{configGloble,jdbcType=VARCHAR}, ",
			"#{lastUsername,jdbcType=VARCHAR}, #{lastUpdatetime,jdbcType=TIMESTAMP})" })
	int insert(SysGlobal record);

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

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

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table sys_global
	 * @mbg.generated
	 */
	@Select({ "select", "id, config_globle, last_username, last_updatetime", "from sys_global",
			"where id = #{id,jdbcType=BIGINT}" })
	@ResultMap("net.wicp.tams.app.duckula.controller.dao.SysGlobalMapper.BaseResultMap")
	SysGlobal selectByPrimaryKey(Long id);

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

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

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

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table sys_global
	 * @mbg.generated
	 */
	@Update({ "update sys_global", "set config_globle = #{configGloble,jdbcType=VARCHAR},",
			"last_username = #{lastUsername,jdbcType=VARCHAR},",
			"last_updatetime = #{lastUpdatetime,jdbcType=TIMESTAMP}", "where id = #{id,jdbcType=BIGINT}" })
	int updateByPrimaryKey(SysGlobal record);
}