OrgIntellectualPropertyMapper.xml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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.OrgIntellectualPropertyMapper" >
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgIntellectualProperty" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="uid" property="uid" jdbcType="VARCHAR" />
  7. <result column="intellectual_property_number" property="intellectualPropertyNumber" jdbcType="VARCHAR" />
  8. <result column="intellectual_property_name" property="intellectualPropertyName" jdbcType="VARCHAR" />
  9. <result column="sort_number" property="sortNumber" jdbcType="VARCHAR" />
  10. <result column="catagory" property="catagory" jdbcType="INTEGER" />
  11. <result column="obtain_way" property="obtainWay" jdbcType="INTEGER" />
  12. <result column="authorization_number" property="authorizationNumber" jdbcType="VARCHAR" />
  13. <result column="authorization_date" property="authorizationDate" jdbcType="TIMESTAMP" />
  14. <result column="evaluation_category" property="evaluationCategory" jdbcType="INTEGER" />
  15. <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
  16. </resultMap>
  17. <sql id="Base_Column_List" >
  18. id, uid, intellectual_property_number, intellectual_property_name, sort_number, catagory,
  19. obtain_way, authorization_number, authorization_date, evaluation_category, deleted_sign
  20. </sql>
  21. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  22. select
  23. <include refid="Base_Column_List" />
  24. from org_intellectual_property
  25. where id = #{id,jdbcType=VARCHAR}
  26. </select>
  27. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  28. delete from org_intellectual_property
  29. where id = #{id,jdbcType=VARCHAR}
  30. </delete>
  31. <insert id="insert" parameterType="com.goafanti.common.model.OrgIntellectualProperty" >
  32. insert into org_intellectual_property (id, uid, intellectual_property_number,
  33. intellectual_property_name, sort_number, catagory,
  34. obtain_way, authorization_number, authorization_date,
  35. evaluation_category, deleted_sign)
  36. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{intellectualPropertyNumber,jdbcType=VARCHAR},
  37. #{intellectualPropertyName,jdbcType=VARCHAR}, #{sortNumber,jdbcType=VARCHAR}, #{catagory,jdbcType=INTEGER},
  38. #{obtainWay,jdbcType=INTEGER}, #{authorizationNumber,jdbcType=VARCHAR}, #{authorizationDate,jdbcType=TIMESTAMP},
  39. #{evaluationCategory,jdbcType=INTEGER}, #{deletedSign,jdbcType=INTEGER})
  40. </insert>
  41. <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgIntellectualProperty" >
  42. insert into org_intellectual_property
  43. <trim prefix="(" suffix=")" suffixOverrides="," >
  44. <if test="id != null" >
  45. id,
  46. </if>
  47. <if test="uid != null" >
  48. uid,
  49. </if>
  50. <if test="intellectualPropertyNumber != null" >
  51. intellectual_property_number,
  52. </if>
  53. <if test="intellectualPropertyName != null" >
  54. intellectual_property_name,
  55. </if>
  56. <if test="sortNumber != null" >
  57. sort_number,
  58. </if>
  59. <if test="catagory != null" >
  60. catagory,
  61. </if>
  62. <if test="obtainWay != null" >
  63. obtain_way,
  64. </if>
  65. <if test="authorizationNumber != null" >
  66. authorization_number,
  67. </if>
  68. <if test="authorizationDate != null" >
  69. authorization_date,
  70. </if>
  71. <if test="evaluationCategory != null" >
  72. evaluation_category,
  73. </if>
  74. <if test="deletedSign != null" >
  75. deleted_sign,
  76. </if>
  77. </trim>
  78. <trim prefix="values (" suffix=")" suffixOverrides="," >
  79. <if test="id != null" >
  80. #{id,jdbcType=VARCHAR},
  81. </if>
  82. <if test="uid != null" >
  83. #{uid,jdbcType=VARCHAR},
  84. </if>
  85. <if test="intellectualPropertyNumber != null" >
  86. #{intellectualPropertyNumber,jdbcType=VARCHAR},
  87. </if>
  88. <if test="intellectualPropertyName != null" >
  89. #{intellectualPropertyName,jdbcType=VARCHAR},
  90. </if>
  91. <if test="sortNumber != null" >
  92. #{sortNumber,jdbcType=VARCHAR},
  93. </if>
  94. <if test="catagory != null" >
  95. #{catagory,jdbcType=INTEGER},
  96. </if>
  97. <if test="obtainWay != null" >
  98. #{obtainWay,jdbcType=INTEGER},
  99. </if>
  100. <if test="authorizationNumber != null" >
  101. #{authorizationNumber,jdbcType=VARCHAR},
  102. </if>
  103. <if test="authorizationDate != null" >
  104. #{authorizationDate,jdbcType=TIMESTAMP},
  105. </if>
  106. <if test="evaluationCategory != null" >
  107. #{evaluationCategory,jdbcType=INTEGER},
  108. </if>
  109. <if test="deletedSign != null" >
  110. #{deletedSign,jdbcType=INTEGER},
  111. </if>
  112. </trim>
  113. </insert>
  114. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgIntellectualProperty" >
  115. update org_intellectual_property
  116. <set >
  117. <if test="uid != null" >
  118. uid = #{uid,jdbcType=VARCHAR},
  119. </if>
  120. <if test="intellectualPropertyNumber != null" >
  121. intellectual_property_number = #{intellectualPropertyNumber,jdbcType=VARCHAR},
  122. </if>
  123. <if test="intellectualPropertyName != null" >
  124. intellectual_property_name = #{intellectualPropertyName,jdbcType=VARCHAR},
  125. </if>
  126. <if test="sortNumber != null" >
  127. sort_number = #{sortNumber,jdbcType=VARCHAR},
  128. </if>
  129. <if test="catagory != null" >
  130. catagory = #{catagory,jdbcType=INTEGER},
  131. </if>
  132. <if test="obtainWay != null" >
  133. obtain_way = #{obtainWay,jdbcType=INTEGER},
  134. </if>
  135. <if test="authorizationNumber != null" >
  136. authorization_number = #{authorizationNumber,jdbcType=VARCHAR},
  137. </if>
  138. <if test="authorizationDate != null" >
  139. authorization_date = #{authorizationDate,jdbcType=TIMESTAMP},
  140. </if>
  141. <if test="evaluationCategory != null" >
  142. evaluation_category = #{evaluationCategory,jdbcType=INTEGER},
  143. </if>
  144. <if test="deletedSign != null" >
  145. deleted_sign = #{deletedSign,jdbcType=INTEGER},
  146. </if>
  147. </set>
  148. where id = #{id,jdbcType=VARCHAR}
  149. </update>
  150. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgIntellectualProperty" >
  151. update org_intellectual_property
  152. set uid = #{uid,jdbcType=VARCHAR},
  153. intellectual_property_number = #{intellectualPropertyNumber,jdbcType=VARCHAR},
  154. intellectual_property_name = #{intellectualPropertyName,jdbcType=VARCHAR},
  155. sort_number = #{sortNumber,jdbcType=VARCHAR},
  156. catagory = #{catagory,jdbcType=INTEGER},
  157. obtain_way = #{obtainWay,jdbcType=INTEGER},
  158. authorization_number = #{authorizationNumber,jdbcType=VARCHAR},
  159. authorization_date = #{authorizationDate,jdbcType=TIMESTAMP},
  160. evaluation_category = #{evaluationCategory,jdbcType=INTEGER},
  161. deleted_sign = #{deletedSign,jdbcType=INTEGER}
  162. where id = #{id,jdbcType=VARCHAR}
  163. </update>
  164. <select id="findOrgIntellectualPropertyListByPage" parameterType="java.lang.String" resultMap="BaseResultMap">
  165. select
  166. <include refid="Base_Column_List" />
  167. from org_intellectual_property
  168. where deleted_sign = 0
  169. <if test="uid != null">
  170. and uid = #{uid,jdbcType=VARCHAR}
  171. </if>
  172. order by authorization_date desc
  173. <if test="page_sql != null">
  174. ${page_sql}
  175. </if>
  176. </select>
  177. <select id="findOrgIntellectualPropertyCount" resultType="java.lang.Integer" parameterType="String">
  178. select count(1)
  179. from org_intellectual_property
  180. where deleted_sign = 0
  181. <if test="uid != null">
  182. and uid = #{uid,jdbcType=VARCHAR}
  183. </if>
  184. </select>
  185. <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
  186. update org_intellectual_property set deleted_sign = 1
  187. where id in
  188. <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
  189. #{item}
  190. </foreach>
  191. </update>
  192. </mapper>