package com.hai.dao; import com.hai.entity.SecUserRoleRel; import com.hai.entity.SecUserRoleRelExample; import org.apache.ibatis.annotations.*; import org.apache.ibatis.type.JdbcType; import org.springframework.stereotype.Repository; import java.util.List; /** * * 代码由工具生成,请勿修改!!! * 如果需要扩展请在其父类进行扩展 * **/ @Repository public interface SecUserRoleRelMapper extends SecUserRoleRelMapperExt { @SelectProvider(type=SecUserRoleRelSqlProvider.class, method="countByExample") long countByExample(SecUserRoleRelExample example); @DeleteProvider(type=SecUserRoleRelSqlProvider.class, method="deleteByExample") int deleteByExample(SecUserRoleRelExample example); @Delete({ "delete from sec_user_role_rel", "where id = #{id,jdbcType=BIGINT}" }) int deleteByPrimaryKey(Long id); @Insert({ "insert into sec_user_role_rel (user_id, role_id)", "values (#{userId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(SecUserRoleRel record); @InsertProvider(type=SecUserRoleRelSqlProvider.class, method="insertSelective") @Options(useGeneratedKeys=true,keyProperty="id") int insertSelective(SecUserRoleRel record); @SelectProvider(type=SecUserRoleRelSqlProvider.class, method="selectByExample") @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="role_id", property="roleId", jdbcType=JdbcType.BIGINT) }) List selectByExample(SecUserRoleRelExample example); @Select({ "select", "id, user_id, role_id", "from sec_user_role_rel", "where id = #{id,jdbcType=BIGINT}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="role_id", property="roleId", jdbcType=JdbcType.BIGINT) }) SecUserRoleRel selectByPrimaryKey(Long id); @UpdateProvider(type=SecUserRoleRelSqlProvider.class, method="updateByExampleSelective") int updateByExampleSelective(@Param("record") SecUserRoleRel record, @Param("example") SecUserRoleRelExample example); @UpdateProvider(type=SecUserRoleRelSqlProvider.class, method="updateByExample") int updateByExample(@Param("record") SecUserRoleRel record, @Param("example") SecUserRoleRelExample example); @UpdateProvider(type=SecUserRoleRelSqlProvider.class, method="updateByPrimaryKeySelective") int updateByPrimaryKeySelective(SecUserRoleRel record); @Update({ "update sec_user_role_rel", "set user_id = #{userId,jdbcType=BIGINT},", "role_id = #{roleId,jdbcType=BIGINT}", "where id = #{id,jdbcType=BIGINT}" }) int updateByPrimaryKey(SecUserRoleRel record); }