CustomercontactMapper.xml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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.usoftchina.saas.document.mapper.CustomercontactMapper">
  4. <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Customercontact">
  5. <id column="cc_id" jdbcType="INTEGER" property="id" />
  6. <result column="cc_cuid" jdbcType="INTEGER" property="cc_cuid" />
  7. <result column="cc_detno" jdbcType="INTEGER" property="cc_detno" />
  8. <result column="cc_name" jdbcType="VARCHAR" property="cc_name" />
  9. <result column="cc_tel" jdbcType="INTEGER" property="cc_tel" />
  10. <result column="cc_qq" jdbcType="VARCHAR" property="cc_qq" />
  11. <result column="cc_email" jdbcType="VARCHAR" property="cc_email" />
  12. <result column="companyid" jdbcType="INTEGER" property="companyId" />
  13. <result column="updaterid" jdbcType="INTEGER" property="updaterId" />
  14. <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
  15. <result column="cc_text1" jdbcType="VARCHAR" property="cc_text1" />
  16. <result column="cc_text2" jdbcType="VARCHAR" property="cc_text2" />
  17. <result column="cc_text3" jdbcType="VARCHAR" property="cc_text3" />
  18. <result column="cc_text4" jdbcType="VARCHAR" property="cc_text4" />
  19. <result column="cc_text5" jdbcType="VARCHAR" property="cc_text5" />
  20. </resultMap>
  21. <sql id="Base_Column_List">
  22. cc_id, cc_cuid, cc_detno, cc_name, cc_tel, cc_qq, cc_email, companyid, updaterid,
  23. updatetime, cc_text1, cc_text2, cc_text3, cc_text4, cc_text5
  24. </sql>
  25. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  26. select
  27. <include refid="Base_Column_List" />
  28. from customercontact
  29. where cc_id = #{cc_id,jdbcType=INTEGER}
  30. </select>
  31. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  32. delete from customercontact
  33. where cc_id = #{cc_id,jdbcType=INTEGER}
  34. </delete>
  35. <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Customercontact">
  36. insert into customercontact (cc_id, cc_cuid, cc_detno,
  37. cc_name, cc_tel, cc_qq,
  38. cc_email, companyid, updaterid,
  39. updatetime, cc_text1, cc_text2,
  40. cc_text3, cc_text4, cc_text5
  41. )
  42. values (#{cc_id,jdbcType=INTEGER}, #{cc_cuid,jdbcType=INTEGER}, #{cc_detno,jdbcType=INTEGER},
  43. #{cc_name,jdbcType=VARCHAR}, #{cc_tel,jdbcType=INTEGER}, #{cc_qq,jdbcType=VARCHAR},
  44. #{cc_email,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER},
  45. #{updatetime,jdbcType=TIMESTAMP}, #{cc_text1,jdbcType=VARCHAR}, #{cc_text2,jdbcType=VARCHAR},
  46. #{cc_text3,jdbcType=VARCHAR}, #{cc_text4,jdbcType=VARCHAR}, #{cc_text5,jdbcType=VARCHAR}
  47. )
  48. </insert>
  49. <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Customercontact">
  50. insert into customercontact
  51. <trim prefix="(" suffix=")" suffixOverrides=",">
  52. <if test="cc_id != null">
  53. cc_id,
  54. </if>
  55. <if test="cc_cuid != null">
  56. cc_cuid,
  57. </if>
  58. <if test="cc_detno != null">
  59. cc_detno,
  60. </if>
  61. <if test="cc_name != null">
  62. cc_name,
  63. </if>
  64. <if test="cc_tel != null">
  65. cc_tel,
  66. </if>
  67. <if test="cc_qq != null">
  68. cc_qq,
  69. </if>
  70. <if test="cc_email != null">
  71. cc_email,
  72. </if>
  73. <if test="companyid != null">
  74. companyid,
  75. </if>
  76. <if test="updaterid != null">
  77. updaterid,
  78. </if>
  79. <if test="updatetime != null">
  80. updatetime,
  81. </if>
  82. <if test="cc_text1 != null">
  83. cc_text1,
  84. </if>
  85. <if test="cc_text2 != null">
  86. cc_text2,
  87. </if>
  88. <if test="cc_text3 != null">
  89. cc_text3,
  90. </if>
  91. <if test="cc_text4 != null">
  92. cc_text4,
  93. </if>
  94. <if test="cc_text5 != null">
  95. cc_text5,
  96. </if>
  97. </trim>
  98. <trim prefix="values (" suffix=")" suffixOverrides=",">
  99. <if test="cc_id != null">
  100. #{cc_id,jdbcType=INTEGER},
  101. </if>
  102. <if test="cc_cuid != null">
  103. #{cc_cuid,jdbcType=INTEGER},
  104. </if>
  105. <if test="cc_detno != null">
  106. #{cc_detno,jdbcType=INTEGER},
  107. </if>
  108. <if test="cc_name != null">
  109. #{cc_name,jdbcType=VARCHAR},
  110. </if>
  111. <if test="cc_tel != null">
  112. #{cc_tel,jdbcType=INTEGER},
  113. </if>
  114. <if test="cc_qq != null">
  115. #{cc_qq,jdbcType=VARCHAR},
  116. </if>
  117. <if test="cc_email != null">
  118. #{cc_email,jdbcType=VARCHAR},
  119. </if>
  120. <if test="companyid != null">
  121. #{companyid,jdbcType=INTEGER},
  122. </if>
  123. <if test="updaterid != null">
  124. #{updaterid,jdbcType=INTEGER},
  125. </if>
  126. <if test="updatetime != null">
  127. #{updatetime,jdbcType=TIMESTAMP},
  128. </if>
  129. <if test="cc_text1 != null">
  130. #{cc_text1,jdbcType=VARCHAR},
  131. </if>
  132. <if test="cc_text2 != null">
  133. #{cc_text2,jdbcType=VARCHAR},
  134. </if>
  135. <if test="cc_text3 != null">
  136. #{cc_text3,jdbcType=VARCHAR},
  137. </if>
  138. <if test="cc_text4 != null">
  139. #{cc_text4,jdbcType=VARCHAR},
  140. </if>
  141. <if test="cc_text5 != null">
  142. #{cc_text5,jdbcType=VARCHAR},
  143. </if>
  144. </trim>
  145. </insert>
  146. <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Customercontact">
  147. update customercontact
  148. <set>
  149. <if test="cc_cuid != null">
  150. cc_cuid = #{cc_cuid,jdbcType=INTEGER},
  151. </if>
  152. <if test="cc_detno != null">
  153. cc_detno = #{cc_detno,jdbcType=INTEGER},
  154. </if>
  155. <if test="cc_name != null">
  156. cc_name = #{cc_name,jdbcType=VARCHAR},
  157. </if>
  158. <if test="cc_tel != null">
  159. cc_tel = #{cc_tel,jdbcType=INTEGER},
  160. </if>
  161. <if test="cc_qq != null">
  162. cc_qq = #{cc_qq,jdbcType=VARCHAR},
  163. </if>
  164. <if test="cc_email != null">
  165. cc_email = #{cc_email,jdbcType=VARCHAR},
  166. </if>
  167. <if test="companyid != null">
  168. companyid = #{companyid,jdbcType=INTEGER},
  169. </if>
  170. <if test="updaterid != null">
  171. updaterid = #{updaterid,jdbcType=INTEGER},
  172. </if>
  173. <if test="updatetime != null">
  174. updatetime = #{updatetime,jdbcType=TIMESTAMP},
  175. </if>
  176. <if test="cc_text1 != null">
  177. cc_text1 = #{cc_text1,jdbcType=VARCHAR},
  178. </if>
  179. <if test="cc_text2 != null">
  180. cc_text2 = #{cc_text2,jdbcType=VARCHAR},
  181. </if>
  182. <if test="cc_text3 != null">
  183. cc_text3 = #{cc_text3,jdbcType=VARCHAR},
  184. </if>
  185. <if test="cc_text4 != null">
  186. cc_text4 = #{cc_text4,jdbcType=VARCHAR},
  187. </if>
  188. <if test="cc_text5 != null">
  189. cc_text5 = #{cc_text5,jdbcType=VARCHAR},
  190. </if>
  191. </set>
  192. where cc_id = #{cc_id,jdbcType=INTEGER}
  193. </update>
  194. <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Customercontact">
  195. update customercontact
  196. set cc_cuid = #{cc_cuid,jdbcType=INTEGER},
  197. cc_detno = #{cc_detno,jdbcType=INTEGER},
  198. cc_name = #{cc_name,jdbcType=VARCHAR},
  199. cc_tel = #{cc_tel,jdbcType=INTEGER},
  200. cc_qq = #{cc_qq,jdbcType=VARCHAR},
  201. cc_email = #{cc_email,jdbcType=VARCHAR},
  202. companyid = #{companyid,jdbcType=INTEGER},
  203. updaterid = #{updaterid,jdbcType=INTEGER},
  204. updatetime = #{updatetime,jdbcType=TIMESTAMP},
  205. cc_text1 = #{cc_text1,jdbcType=VARCHAR},
  206. cc_text2 = #{cc_text2,jdbcType=VARCHAR},
  207. cc_text3 = #{cc_text3,jdbcType=VARCHAR},
  208. cc_text4 = #{cc_text4,jdbcType=VARCHAR},
  209. cc_text5 = #{cc_text5,jdbcType=VARCHAR}
  210. where cc_id = #{cc_id,jdbcType=INTEGER}
  211. </update>
  212. <select id="selectByFK" parameterType="java.lang.Long" resultMap="BaseResultMap">
  213. select
  214. <include refid="Base_Column_List" />
  215. from customercontact
  216. where cc_cuid = #{fk_i,jdbcType=INTEGER}
  217. </select>
  218. </mapper>