TSysLogMapper.xml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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.sooka.mybatis.mapper.TSysLogMapper">
  4. <resultMap id="BaseResultMap" type="com.sooka.mybatis.model.TSysLog">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="content" jdbcType="VARCHAR" property="content" />
  7. <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
  8. <result column="username" jdbcType="VARCHAR" property="username" />
  9. <result column="type" jdbcType="VARCHAR" property="type" />
  10. </resultMap>
  11. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  12. delete from t_sys_log
  13. where id = #{id,jdbcType=INTEGER}
  14. </delete>
  15. <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.sooka.mybatis.model.TSysLog">
  16. insert into t_sys_log ( content, createTime,
  17. username, type)
  18. values (#{content,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP},
  19. #{username,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR})
  20. </insert>
  21. <update id="updateByPrimaryKey" parameterType="com.sooka.mybatis.model.TSysLog">
  22. update t_sys_log
  23. set content = #{content,jdbcType=VARCHAR},
  24. createTime = #{createtime,jdbcType=TIMESTAMP},
  25. username = #{username,jdbcType=VARCHAR},
  26. type = #{type,jdbcType=VARCHAR}
  27. where id = #{id,jdbcType=INTEGER}
  28. </update>
  29. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  30. select id, content, createTime, username, type
  31. from t_sys_log
  32. where id = #{id,jdbcType=INTEGER}
  33. </select>
  34. <select id="selectAll" resultMap="BaseResultMap">
  35. select id, content, createTime, username, type
  36. from t_sys_log
  37. </select>
  38. </mapper>