1
0

ApiSysParamMapper.xml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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.kmall.api.dao.ApiSysParamMapper" >
  4. <resultMap id="BaseResultMap" type="com.kmall.api.entity.SysParam" >
  5. <id column="param_id" property="paramId" jdbcType="INTEGER" />
  6. <result column="param_name" property="paramName" jdbcType="VARCHAR" />
  7. <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
  8. <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  9. <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
  10. <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
  11. <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
  12. </resultMap>
  13. <sql id="Base_Column_List" >
  14. param_id, param_name, creater_sn, create_time, moder_sn, mod_time, tstm
  15. </sql>
  16. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  17. select
  18. <include refid="Base_Column_List" />
  19. from sys_param
  20. where param_id = #{paramId,jdbcType=INTEGER}
  21. </select>
  22. <delete id="delete" parameterType="java.lang.Integer" >
  23. delete from sys_param
  24. where param_id = #{paramId,jdbcType=INTEGER}
  25. </delete>
  26. <insert id="save" parameterType="com.kmall.api.entity.SysParam" useGeneratedKeys="true" keyProperty="id">
  27. insert into sys_param
  28. <trim prefix="(" suffix=")" suffixOverrides="," >
  29. <if test="paramId != null" >
  30. param_id,
  31. </if>
  32. <if test="paramName != null" >
  33. param_name,
  34. </if>
  35. <if test="createrSn != null" >
  36. creater_sn,
  37. </if>
  38. <if test="createTime != null" >
  39. create_time,
  40. </if>
  41. <if test="moderSn != null" >
  42. moder_sn,
  43. </if>
  44. <if test="modTime != null" >
  45. mod_time,
  46. </if>
  47. <if test="tstm != null" >
  48. tstm,
  49. </if>
  50. </trim>
  51. <trim prefix="values (" suffix=")" suffixOverrides="," >
  52. <if test="paramId != null" >
  53. #{paramId,jdbcType=INTEGER},
  54. </if>
  55. <if test="paramName != null" >
  56. #{paramName,jdbcType=VARCHAR},
  57. </if>
  58. <if test="createrSn != null" >
  59. #{createrSn,jdbcType=VARCHAR},
  60. </if>
  61. <if test="createTime != null" >
  62. #{createTime,jdbcType=TIMESTAMP},
  63. </if>
  64. <if test="moderSn != null" >
  65. #{moderSn,jdbcType=VARCHAR},
  66. </if>
  67. <if test="modTime != null" >
  68. #{modTime,jdbcType=TIMESTAMP},
  69. </if>
  70. <if test="tstm != null" >
  71. #{tstm,jdbcType=TIMESTAMP},
  72. </if>
  73. </trim>
  74. </insert>
  75. <update id="update" parameterType="com.kmall.api.entity.SysParam" >
  76. update sys_param
  77. <set >
  78. <if test="paramName != null" >
  79. param_name = #{paramName,jdbcType=VARCHAR},
  80. </if>
  81. <if test="createrSn != null" >
  82. creater_sn = #{createrSn,jdbcType=VARCHAR},
  83. </if>
  84. <if test="createTime != null" >
  85. create_time = #{createTime,jdbcType=TIMESTAMP},
  86. </if>
  87. <if test="moderSn != null" >
  88. moder_sn = #{moderSn,jdbcType=VARCHAR},
  89. </if>
  90. <if test="modTime != null" >
  91. mod_time = #{modTime,jdbcType=TIMESTAMP},
  92. </if>
  93. <if test="tstm != null" >
  94. tstm = #{tstm,jdbcType=TIMESTAMP},
  95. </if>
  96. </set>
  97. where param_id = #{paramId,jdbcType=INTEGER}
  98. </update>
  99. </mapper>