You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
136 lines
6.4 KiB
136 lines
6.4 KiB
package com.hai.dao;
|
|
|
|
import com.hai.entity.HighUser;
|
|
import com.hai.entity.HighUserExample;
|
|
import java.util.List;
|
|
import org.apache.ibatis.annotations.Delete;
|
|
import org.apache.ibatis.annotations.DeleteProvider;
|
|
import org.apache.ibatis.annotations.Insert;
|
|
import org.apache.ibatis.annotations.InsertProvider;
|
|
import org.apache.ibatis.annotations.Options;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Result;
|
|
import org.apache.ibatis.annotations.Results;
|
|
import org.apache.ibatis.annotations.Select;
|
|
import org.apache.ibatis.annotations.SelectProvider;
|
|
import org.apache.ibatis.annotations.Update;
|
|
import org.apache.ibatis.annotations.UpdateProvider;
|
|
import org.apache.ibatis.type.JdbcType;
|
|
import org.springframework.stereotype.Repository;
|
|
|
|
/**
|
|
*
|
|
* 代码由工具生成,请勿修改!!!
|
|
* 如果需要扩展请在其父类进行扩展
|
|
*
|
|
**/
|
|
@Repository
|
|
public interface HighUserMapper extends HighUserMapperExt {
|
|
@SelectProvider(type=HighUserSqlProvider.class, method="countByExample")
|
|
long countByExample(HighUserExample example);
|
|
|
|
@DeleteProvider(type=HighUserSqlProvider.class, method="deleteByExample")
|
|
int deleteByExample(HighUserExample example);
|
|
|
|
@Delete({
|
|
"delete from high_user",
|
|
"where id = #{id,jdbcType=BIGINT}"
|
|
})
|
|
int deleteByPrimaryKey(Long id);
|
|
|
|
@Insert({
|
|
"insert into high_user (header_img, `name`, ",
|
|
"phone, `password`, ",
|
|
"sex, birthdate, reg_time, ",
|
|
"gold, `status`, open_id, ",
|
|
"ext_1, ext_2, ext_3, ",
|
|
"ext_4)",
|
|
"values (#{headerImg,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, ",
|
|
"#{phone,jdbcType=BIGINT}, #{password,jdbcType=VARCHAR}, ",
|
|
"#{sex,jdbcType=VARCHAR}, #{birthdate,jdbcType=DATE}, #{regTime,jdbcType=TIMESTAMP}, ",
|
|
"#{gold,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{openId,jdbcType=VARCHAR}, ",
|
|
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ",
|
|
"#{ext4,jdbcType=VARCHAR})"
|
|
})
|
|
@Options(useGeneratedKeys=true,keyProperty="id")
|
|
int insert(HighUser record);
|
|
|
|
@InsertProvider(type=HighUserSqlProvider.class, method="insertSelective")
|
|
@Options(useGeneratedKeys=true,keyProperty="id")
|
|
int insertSelective(HighUser record);
|
|
|
|
@SelectProvider(type=HighUserSqlProvider.class, method="selectByExample")
|
|
@Results({
|
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
|
|
@Result(column="header_img", property="headerImg", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="phone", property="phone", jdbcType=JdbcType.BIGINT),
|
|
@Result(column="password", property="password", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="sex", property="sex", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="birthdate", property="birthdate", jdbcType=JdbcType.DATE),
|
|
@Result(column="reg_time", property="regTime", jdbcType=JdbcType.TIMESTAMP),
|
|
@Result(column="gold", property="gold", jdbcType=JdbcType.INTEGER),
|
|
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
|
|
@Result(column="open_id", property="openId", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="ext_4", property="ext4", jdbcType=JdbcType.VARCHAR)
|
|
})
|
|
List<HighUser> selectByExample(HighUserExample example);
|
|
|
|
@Select({
|
|
"select",
|
|
"id, header_img, `name`, phone, `password`, sex, birthdate, reg_time, gold, `status`, ",
|
|
"open_id, ext_1, ext_2, ext_3, ext_4",
|
|
"from high_user",
|
|
"where id = #{id,jdbcType=BIGINT}"
|
|
})
|
|
@Results({
|
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
|
|
@Result(column="header_img", property="headerImg", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="phone", property="phone", jdbcType=JdbcType.BIGINT),
|
|
@Result(column="password", property="password", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="sex", property="sex", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="birthdate", property="birthdate", jdbcType=JdbcType.DATE),
|
|
@Result(column="reg_time", property="regTime", jdbcType=JdbcType.TIMESTAMP),
|
|
@Result(column="gold", property="gold", jdbcType=JdbcType.INTEGER),
|
|
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
|
|
@Result(column="open_id", property="openId", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR),
|
|
@Result(column="ext_4", property="ext4", jdbcType=JdbcType.VARCHAR)
|
|
})
|
|
HighUser selectByPrimaryKey(Long id);
|
|
|
|
@UpdateProvider(type=HighUserSqlProvider.class, method="updateByExampleSelective")
|
|
int updateByExampleSelective(@Param("record") HighUser record, @Param("example") HighUserExample example);
|
|
|
|
@UpdateProvider(type=HighUserSqlProvider.class, method="updateByExample")
|
|
int updateByExample(@Param("record") HighUser record, @Param("example") HighUserExample example);
|
|
|
|
@UpdateProvider(type=HighUserSqlProvider.class, method="updateByPrimaryKeySelective")
|
|
int updateByPrimaryKeySelective(HighUser record);
|
|
|
|
@Update({
|
|
"update high_user",
|
|
"set header_img = #{headerImg,jdbcType=VARCHAR},",
|
|
"`name` = #{name,jdbcType=VARCHAR},",
|
|
"phone = #{phone,jdbcType=BIGINT},",
|
|
"`password` = #{password,jdbcType=VARCHAR},",
|
|
"sex = #{sex,jdbcType=VARCHAR},",
|
|
"birthdate = #{birthdate,jdbcType=DATE},",
|
|
"reg_time = #{regTime,jdbcType=TIMESTAMP},",
|
|
"gold = #{gold,jdbcType=INTEGER},",
|
|
"`status` = #{status,jdbcType=INTEGER},",
|
|
"open_id = #{openId,jdbcType=VARCHAR},",
|
|
"ext_1 = #{ext1,jdbcType=VARCHAR},",
|
|
"ext_2 = #{ext2,jdbcType=VARCHAR},",
|
|
"ext_3 = #{ext3,jdbcType=VARCHAR},",
|
|
"ext_4 = #{ext4,jdbcType=VARCHAR}",
|
|
"where id = #{id,jdbcType=BIGINT}"
|
|
})
|
|
int updateByPrimaryKey(HighUser record);
|
|
} |