OrganizationInfoMapper.xml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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.OrganizationInfoMapper" >
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrganizationInfo" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="uid" property="uid" jdbcType="VARCHAR" />
  7. <result column="identity_type" property="identityType" jdbcType="VARCHAR" />
  8. <result column="company_name" property="companyName" jdbcType="VARCHAR" />
  9. <result column="location" property="location" jdbcType="VARCHAR" />
  10. <result column="unit_size" property="unitSize" jdbcType="VARCHAR" />
  11. <result column="company_introduction" property="companyIntroduction" jdbcType="VARCHAR" />
  12. <result column="home_unit" property="homeUnit" jdbcType="VARCHAR" />
  13. <result column="enterprise qualification" property="enterpriseQualification" jdbcType="VARCHAR" />
  14. <result column="logo" property="logo" jdbcType="VARCHAR" />
  15. <result column="publicity _picture" property="publicityPicture" jdbcType="VARCHAR" />
  16. </resultMap>
  17. <sql id="Base_Column_List" >
  18. id, uid, identity_type, company_name, location, unit_size, company_introduction,
  19. home_unit, "enterprise qualification", logo, "publicity _picture"
  20. </sql>
  21. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  22. select
  23. <include refid="Base_Column_List" />
  24. from organization_info
  25. where id = #{id,jdbcType=VARCHAR}
  26. </select>
  27. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  28. delete from organization_info
  29. where id = #{id,jdbcType=VARCHAR}
  30. </delete>
  31. <insert id="insert" parameterType="com.goafanti.common.model.OrganizationInfo" >
  32. insert into organization_info (id, uid, identity_type,
  33. company_name, location, unit_size,
  34. company_introduction, home_unit, "enterprise qualification",
  35. logo, "publicity _picture")
  36. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{identityType,jdbcType=VARCHAR},
  37. #{companyName,jdbcType=VARCHAR}, #{location,jdbcType=VARCHAR}, #{unitSize,jdbcType=VARCHAR},
  38. #{companyIntroduction,jdbcType=VARCHAR}, #{homeUnit,jdbcType=VARCHAR}, #{enterpriseQualification,jdbcType=VARCHAR},
  39. #{logo,jdbcType=VARCHAR}, #{publicityPicture,jdbcType=VARCHAR})
  40. </insert>
  41. <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationInfo" >
  42. insert into organization_info
  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="identityType != null" >
  51. identity_type,
  52. </if>
  53. <if test="companyName != null" >
  54. company_name,
  55. </if>
  56. <if test="location != null" >
  57. location,
  58. </if>
  59. <if test="unitSize != null" >
  60. unit_size,
  61. </if>
  62. <if test="companyIntroduction != null" >
  63. company_introduction,
  64. </if>
  65. <if test="homeUnit != null" >
  66. home_unit,
  67. </if>
  68. <if test="enterpriseQualification != null" >
  69. "enterprise qualification",
  70. </if>
  71. <if test="logo != null" >
  72. logo,
  73. </if>
  74. <if test="publicityPicture != null" >
  75. "publicity _picture",
  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="identityType != null" >
  86. #{identityType,jdbcType=VARCHAR},
  87. </if>
  88. <if test="companyName != null" >
  89. #{companyName,jdbcType=VARCHAR},
  90. </if>
  91. <if test="location != null" >
  92. #{location,jdbcType=VARCHAR},
  93. </if>
  94. <if test="unitSize != null" >
  95. #{unitSize,jdbcType=VARCHAR},
  96. </if>
  97. <if test="companyIntroduction != null" >
  98. #{companyIntroduction,jdbcType=VARCHAR},
  99. </if>
  100. <if test="homeUnit != null" >
  101. #{homeUnit,jdbcType=VARCHAR},
  102. </if>
  103. <if test="enterpriseQualification != null" >
  104. #{enterpriseQualification,jdbcType=VARCHAR},
  105. </if>
  106. <if test="logo != null" >
  107. #{logo,jdbcType=VARCHAR},
  108. </if>
  109. <if test="publicityPicture != null" >
  110. #{publicityPicture,jdbcType=VARCHAR},
  111. </if>
  112. </trim>
  113. </insert>
  114. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationInfo" >
  115. update organization_info
  116. <set >
  117. <if test="uid != null" >
  118. uid = #{uid,jdbcType=VARCHAR},
  119. </if>
  120. <if test="identityType != null" >
  121. identity_type = #{identityType,jdbcType=VARCHAR},
  122. </if>
  123. <if test="companyName != null" >
  124. company_name = #{companyName,jdbcType=VARCHAR},
  125. </if>
  126. <if test="location != null" >
  127. location = #{location,jdbcType=VARCHAR},
  128. </if>
  129. <if test="unitSize != null" >
  130. unit_size = #{unitSize,jdbcType=VARCHAR},
  131. </if>
  132. <if test="companyIntroduction != null" >
  133. company_introduction = #{companyIntroduction,jdbcType=VARCHAR},
  134. </if>
  135. <if test="homeUnit != null" >
  136. home_unit = #{homeUnit,jdbcType=VARCHAR},
  137. </if>
  138. <if test="enterpriseQualification != null" >
  139. "enterprise qualification" = #{enterpriseQualification,jdbcType=VARCHAR},
  140. </if>
  141. <if test="logo != null" >
  142. logo = #{logo,jdbcType=VARCHAR},
  143. </if>
  144. <if test="publicityPicture != null" >
  145. "publicity _picture" = #{publicityPicture,jdbcType=VARCHAR},
  146. </if>
  147. </set>
  148. where id = #{id,jdbcType=VARCHAR}
  149. </update>
  150. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrganizationInfo" >
  151. update organization_info
  152. set uid = #{uid,jdbcType=VARCHAR},
  153. identity_type = #{identityType,jdbcType=VARCHAR},
  154. company_name = #{companyName,jdbcType=VARCHAR},
  155. location = #{location,jdbcType=VARCHAR},
  156. unit_size = #{unitSize,jdbcType=VARCHAR},
  157. company_introduction = #{companyIntroduction,jdbcType=VARCHAR},
  158. home_unit = #{homeUnit,jdbcType=VARCHAR},
  159. "enterprise qualification" = #{enterpriseQualification,jdbcType=VARCHAR},
  160. logo = #{logo,jdbcType=VARCHAR},
  161. "publicity _picture" = #{publicityPicture,jdbcType=VARCHAR}
  162. where id = #{id,jdbcType=VARCHAR}
  163. </update>
  164. <select id="selectOrgInfoByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
  165. select
  166. <include refid="Base_Column_List" />
  167. from organization_info
  168. where uid = #{uid,jdbcType=VARCHAR}
  169. </select>
  170. </mapper>