MemberLogMapper.xml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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.goafanti.common.dao.MemberLogMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.MemberLog">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="pid" jdbcType="INTEGER" property="pid" />
  7. <result column="status" jdbcType="INTEGER" property="status" />
  8. <result column="remarks" jdbcType="VARCHAR" property="remarks" />
  9. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  10. </resultMap>
  11. <sql id="Base_Column_List">
  12. id, pid, `status`, remarks, create_time
  13. </sql>
  14. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  15. select
  16. <include refid="Base_Column_List" />
  17. from member_log
  18. where id = #{id,jdbcType=INTEGER}
  19. </select>
  20. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  21. delete from member_log
  22. where id = #{id,jdbcType=INTEGER}
  23. </delete>
  24. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.MemberLog" useGeneratedKeys="true">
  25. insert into member_log (pid, `status`, remarks,
  26. create_time)
  27. values (#{pid,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{remarks,jdbcType=VARCHAR},
  28. #{createTime,jdbcType=TIMESTAMP})
  29. </insert>
  30. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.MemberLog" useGeneratedKeys="true">
  31. insert into member_log
  32. <trim prefix="(" suffix=")" suffixOverrides=",">
  33. <if test="pid != null">
  34. pid,
  35. </if>
  36. <if test="status != null">
  37. `status`,
  38. </if>
  39. <if test="remarks != null">
  40. remarks,
  41. </if>
  42. <if test="createTime != null">
  43. create_time,
  44. </if>
  45. </trim>
  46. <trim prefix="values (" suffix=")" suffixOverrides=",">
  47. <if test="pid != null">
  48. #{pid,jdbcType=INTEGER},
  49. </if>
  50. <if test="status != null">
  51. #{status,jdbcType=INTEGER},
  52. </if>
  53. <if test="remarks != null">
  54. #{remarks,jdbcType=VARCHAR},
  55. </if>
  56. <if test="createTime != null">
  57. #{createTime,jdbcType=TIMESTAMP},
  58. </if>
  59. </trim>
  60. </insert>
  61. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.MemberLog">
  62. update member_log
  63. <set>
  64. <if test="pid != null">
  65. pid = #{pid,jdbcType=INTEGER},
  66. </if>
  67. <if test="status != null">
  68. `status` = #{status,jdbcType=INTEGER},
  69. </if>
  70. <if test="remarks != null">
  71. remarks = #{remarks,jdbcType=VARCHAR},
  72. </if>
  73. <if test="createTime != null">
  74. create_time = #{createTime,jdbcType=TIMESTAMP},
  75. </if>
  76. </set>
  77. where id = #{id,jdbcType=INTEGER}
  78. </update>
  79. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.MemberLog">
  80. update member_log
  81. set pid = #{pid,jdbcType=INTEGER},
  82. `status` = #{status,jdbcType=INTEGER},
  83. remarks = #{remarks,jdbcType=VARCHAR},
  84. create_time = #{createTime,jdbcType=TIMESTAMP}
  85. where id = #{id,jdbcType=INTEGER}
  86. </update>
  87. </mapper>