OrgTechCenterMapper.xml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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.OrgTechCenterMapper" >
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgTechCenter" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="uid" property="uid" jdbcType="VARCHAR" />
  7. <result column="center_name" property="centerName" jdbcType="VARCHAR" />
  8. <result column="founding_time" property="foundingTime" jdbcType="TIMESTAMP" />
  9. <result column="principal" property="principal" jdbcType="VARCHAR" />
  10. <result column="comment" property="comment" jdbcType="VARCHAR" />
  11. <result column="system_url" property="systemUrl" jdbcType="VARCHAR" />
  12. <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
  13. </resultMap>
  14. <resultMap id="ResultMapWithBLOBs" type="com.goafanti.common.model.OrgTechCenter" extends="BaseResultMap" >
  15. <result column="system_catalog" property="systemCatalog" jdbcType="LONGVARCHAR" />
  16. </resultMap>
  17. <sql id="Base_Column_List" >
  18. id, uid, center_name, founding_time, principal, comment, system_url, deleted_sign
  19. </sql>
  20. <sql id="Blob_Column_List" >
  21. system_catalog
  22. </sql>
  23. <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
  24. select
  25. <include refid="Base_Column_List" />
  26. ,
  27. <include refid="Blob_Column_List" />
  28. from org_tech_center
  29. where id = #{id,jdbcType=VARCHAR}
  30. </select>
  31. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  32. delete from org_tech_center
  33. where id = #{id,jdbcType=VARCHAR}
  34. </delete>
  35. <insert id="insert" parameterType="com.goafanti.common.model.OrgTechCenter" >
  36. insert into org_tech_center (id, uid, center_name, founding_time,
  37. principal, comment, system_url, deleted_sign,
  38. system_catalog)
  39. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{centerName,jdbcType=VARCHAR}, #{foundingTime,jdbcType=TIMESTAMP},
  40. #{principal,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{systemUrl,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER},
  41. #{systemCatalog,jdbcType=LONGVARCHAR})
  42. </insert>
  43. <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgTechCenter" >
  44. insert into org_tech_center
  45. <trim prefix="(" suffix=")" suffixOverrides="," >
  46. <if test="id != null" >
  47. id,
  48. </if>
  49. <if test="uid != null" >
  50. uid,
  51. </if>
  52. <if test="centerName != null" >
  53. center_name,
  54. </if>
  55. <if test="foundingTime != null" >
  56. founding_time,
  57. </if>
  58. <if test="principal != null" >
  59. principal,
  60. </if>
  61. <if test="comment != null" >
  62. comment,
  63. </if>
  64. <if test="systemUrl != null" >
  65. system_url,
  66. </if>
  67. <if test="deletedSign != null" >
  68. deleted_sign,
  69. </if>
  70. <if test="systemCatalog != null" >
  71. system_catalog,
  72. </if>
  73. </trim>
  74. <trim prefix="values (" suffix=")" suffixOverrides="," >
  75. <if test="id != null" >
  76. #{id,jdbcType=VARCHAR},
  77. </if>
  78. <if test="uid != null" >
  79. #{uid,jdbcType=VARCHAR},
  80. </if>
  81. <if test="centerName != null" >
  82. #{centerName,jdbcType=VARCHAR},
  83. </if>
  84. <if test="foundingTime != null" >
  85. #{foundingTime,jdbcType=TIMESTAMP},
  86. </if>
  87. <if test="principal != null" >
  88. #{principal,jdbcType=VARCHAR},
  89. </if>
  90. <if test="comment != null" >
  91. #{comment,jdbcType=VARCHAR},
  92. </if>
  93. <if test="systemUrl != null" >
  94. #{systemUrl,jdbcType=VARCHAR},
  95. </if>
  96. <if test="deletedSign != null" >
  97. #{deletedSign,jdbcType=INTEGER},
  98. </if>
  99. <if test="systemCatalog != null" >
  100. #{systemCatalog,jdbcType=LONGVARCHAR},
  101. </if>
  102. </trim>
  103. </insert>
  104. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgTechCenter" >
  105. update org_tech_center
  106. <set >
  107. <if test="uid != null" >
  108. uid = #{uid,jdbcType=VARCHAR},
  109. </if>
  110. <if test="centerName != null" >
  111. center_name = #{centerName,jdbcType=VARCHAR},
  112. </if>
  113. <if test="foundingTime != null" >
  114. founding_time = #{foundingTime,jdbcType=TIMESTAMP},
  115. </if>
  116. <if test="principal != null" >
  117. principal = #{principal,jdbcType=VARCHAR},
  118. </if>
  119. <if test="comment != null" >
  120. comment = #{comment,jdbcType=VARCHAR},
  121. </if>
  122. <if test="systemUrl != null" >
  123. system_url = #{systemUrl,jdbcType=VARCHAR},
  124. </if>
  125. <if test="deletedSign != null" >
  126. deleted_sign = #{deletedSign,jdbcType=INTEGER},
  127. </if>
  128. <if test="systemCatalog != null" >
  129. system_catalog = #{systemCatalog,jdbcType=LONGVARCHAR},
  130. </if>
  131. </set>
  132. where id = #{id,jdbcType=VARCHAR}
  133. </update>
  134. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.OrgTechCenter" >
  135. update org_tech_center
  136. set uid = #{uid,jdbcType=VARCHAR},
  137. center_name = #{centerName,jdbcType=VARCHAR},
  138. founding_time = #{foundingTime,jdbcType=TIMESTAMP},
  139. principal = #{principal,jdbcType=VARCHAR},
  140. comment = #{comment,jdbcType=VARCHAR},
  141. system_url = #{systemUrl,jdbcType=VARCHAR},
  142. deleted_sign = #{deletedSign,jdbcType=INTEGER},
  143. system_catalog = #{systemCatalog,jdbcType=LONGVARCHAR}
  144. where id = #{id,jdbcType=VARCHAR}
  145. </update>
  146. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgTechCenter" >
  147. update org_tech_center
  148. set uid = #{uid,jdbcType=VARCHAR},
  149. center_name = #{centerName,jdbcType=VARCHAR},
  150. founding_time = #{foundingTime,jdbcType=TIMESTAMP},
  151. principal = #{principal,jdbcType=VARCHAR},
  152. comment = #{comment,jdbcType=VARCHAR},
  153. system_url = #{systemUrl,jdbcType=VARCHAR},
  154. deleted_sign = #{deletedSign,jdbcType=INTEGER}
  155. where id = #{id,jdbcType=VARCHAR}
  156. </update>
  157. <select id="selectOrgTechCenterByUid" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
  158. select
  159. <include refid="Base_Column_List" />
  160. ,
  161. <include refid="Blob_Column_List" />
  162. from org_tech_center
  163. where uid = #{uid,jdbcType=VARCHAR}
  164. </select>
  165. </mapper>