UserRealNamePassMapper.xml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.juxiao.xchat.module.xbd.mapper.users.UserRealNamePassMapper" >
  4. <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.users.UserRealNamePass" >
  5. <id column="id" property="id" jdbcType="INTEGER" />
  6. <result column="id_card_no" property="idCardNo" jdbcType="VARCHAR" />
  7. <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
  8. </resultMap>
  9. <sql id="Base_Column_List" >
  10. id, id_card_no, create_date
  11. </sql>
  12. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  13. select
  14. <include refid="Base_Column_List" />
  15. from user_real_name_pass
  16. where id = #{id,jdbcType=INTEGER}
  17. </select>
  18. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  19. delete from user_real_name_pass
  20. where id = #{id,jdbcType=INTEGER}
  21. </delete>
  22. <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.users.UserRealNamePass" >
  23. insert into user_real_name_pass (id, id_card_no, create_date
  24. )
  25. values (#{id,jdbcType=INTEGER}, #{idCardNo,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}
  26. )
  27. </insert>
  28. <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.UserRealNamePass" >
  29. insert into user_real_name_pass
  30. <trim prefix="(" suffix=")" suffixOverrides="," >
  31. <if test="id != null" >
  32. id,
  33. </if>
  34. <if test="idCardNo != null" >
  35. id_card_no,
  36. </if>
  37. <if test="createDate != null" >
  38. create_date,
  39. </if>
  40. </trim>
  41. <trim prefix="values (" suffix=")" suffixOverrides="," >
  42. <if test="id != null" >
  43. #{id,jdbcType=INTEGER},
  44. </if>
  45. <if test="idCardNo != null" >
  46. #{idCardNo,jdbcType=VARCHAR},
  47. </if>
  48. <if test="createDate != null" >
  49. #{createDate,jdbcType=TIMESTAMP},
  50. </if>
  51. </trim>
  52. </insert>
  53. <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.users.UserRealNamePass" >
  54. update user_real_name_pass
  55. <set >
  56. <if test="idCardNo != null" >
  57. id_card_no = #{idCardNo,jdbcType=VARCHAR},
  58. </if>
  59. <if test="createDate != null" >
  60. create_date = #{createDate,jdbcType=TIMESTAMP},
  61. </if>
  62. </set>
  63. where id = #{id,jdbcType=INTEGER}
  64. </update>
  65. <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.users.UserRealNamePass" >
  66. update user_real_name_pass
  67. set id_card_no = #{idCardNo,jdbcType=VARCHAR},
  68. create_date = #{createDate,jdbcType=TIMESTAMP}
  69. where id = #{id,jdbcType=INTEGER}
  70. </update>
  71. <select id="countByIdCardNo" resultType="java.lang.Integer">
  72. select count(*) from user_real_name_pass where id_card_no = #{idCardNo}
  73. </select>
  74. </mapper>