FreezeMapper.xml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.mofangchuxing.aska.dao.mapper.FreezeMapper">
  6. <resultMap id="BaseResultMap" type="com.mofangchuxing.aska.dao.domain.Freeze">
  7. <id property="id" column="id" jdbcType="INTEGER"/>
  8. <result property="orderNo" column="order_no" jdbcType="VARCHAR"/>
  9. <result property="tranId" column="tran_id" jdbcType="VARCHAR"/>
  10. </resultMap>
  11. <sql id="Base_Column_List">
  12. id,order_no,tran_id
  13. </sql>
  14. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  15. select
  16. <include refid="Base_Column_List" />
  17. from freeze
  18. where id = #{id,jdbcType=INTEGER}
  19. </select>
  20. <select id="getAllList" resultMap="BaseResultMap">
  21. select
  22. <include refid="Base_Column_List" />
  23. from freeze
  24. order by id
  25. </select>
  26. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  27. delete from freeze
  28. where id = #{id,jdbcType=INTEGER}
  29. </delete>
  30. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.Freeze" useGeneratedKeys="true">
  31. insert into freeze
  32. ( id,order_no,tran_id
  33. )
  34. values (#{id,jdbcType=INTEGER},#{orderNo,jdbcType=VARCHAR},#{tranId,jdbcType=VARCHAR}
  35. )
  36. </insert>
  37. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.Freeze" useGeneratedKeys="true">
  38. insert into freeze
  39. <trim prefix="(" suffix=")" suffixOverrides=",">
  40. <if test="id != null">id,</if>
  41. <if test="orderNo != null">order_no,</if>
  42. <if test="tranId != null">tran_id,</if>
  43. </trim>
  44. <trim prefix="values (" suffix=")" suffixOverrides=",">
  45. <if test="id != null">#{id,jdbcType=INTEGER},</if>
  46. <if test="orderNo != null">#{orderNo,jdbcType=VARCHAR},</if>
  47. <if test="tranId != null">#{tranId,jdbcType=VARCHAR},</if>
  48. </trim>
  49. </insert>
  50. <update id="updateByPrimaryKeySelective" parameterType="com.mofangchuxing.aska.dao.domain.Freeze">
  51. update freeze
  52. <set>
  53. <if test="orderNo != null">
  54. order_no = #{orderNo,jdbcType=VARCHAR},
  55. </if>
  56. <if test="tranId != null">
  57. tran_id = #{tranId,jdbcType=VARCHAR},
  58. </if>
  59. </set>
  60. where id = #{id,jdbcType=INTEGER}
  61. </update>
  62. <update id="updateByPrimaryKey" parameterType="com.mofangchuxing.aska.dao.domain.Freeze">
  63. update freeze
  64. set
  65. order_no = #{orderNo,jdbcType=VARCHAR},
  66. tran_id = #{tranId,jdbcType=VARCHAR}
  67. where id = #{id,jdbcType=INTEGER}
  68. </update>
  69. </mapper>