CustomerUserInfoMapper.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  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.CustomerUserInfoMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.CustomerUserInfo">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Mon Oct 09 17:40:56 CST 2017.
  9. -->
  10. <id column="id" jdbcType="VARCHAR" property="id" />
  11. <result column="cid" jdbcType="VARCHAR" property="cid" />
  12. <result column="name" jdbcType="VARCHAR" property="name" />
  13. <result column="sex" jdbcType="CHAR" property="sex" />
  14. <result column="mobile" jdbcType="VARCHAR" property="mobile" />
  15. <result column="email" jdbcType="VARCHAR" property="email" />
  16. <result column="qq" jdbcType="VARCHAR" property="qq" />
  17. <result column="wechat" jdbcType="VARCHAR" property="wechat" />
  18. <result column="depatrment" jdbcType="VARCHAR" property="depatrment" />
  19. <result column="customer_position" jdbcType="VARCHAR" property="customerPosition" />
  20. <result column="remarks" jdbcType="VARCHAR" property="remarks" />
  21. </resultMap>
  22. <sql id="Example_Where_Clause">
  23. <!--
  24. WARNING - @mbg.generated
  25. This element is automatically generated by MyBatis Generator, do not modify.
  26. This element was generated on Mon Oct 09 17:40:56 CST 2017.
  27. -->
  28. <where>
  29. <foreach collection="oredCriteria" item="criteria" separator="or">
  30. <if test="criteria.valid">
  31. <trim prefix="(" prefixOverrides="and" suffix=")">
  32. <foreach collection="criteria.criteria" item="criterion">
  33. <choose>
  34. <when test="criterion.noValue">
  35. and ${criterion.condition}
  36. </when>
  37. <when test="criterion.singleValue">
  38. and ${criterion.condition} #{criterion.value}
  39. </when>
  40. <when test="criterion.betweenValue">
  41. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  42. </when>
  43. <when test="criterion.listValue">
  44. and ${criterion.condition}
  45. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  46. #{listItem}
  47. </foreach>
  48. </when>
  49. </choose>
  50. </foreach>
  51. </trim>
  52. </if>
  53. </foreach>
  54. </where>
  55. </sql>
  56. <sql id="Update_By_Example_Where_Clause">
  57. <!--
  58. WARNING - @mbg.generated
  59. This element is automatically generated by MyBatis Generator, do not modify.
  60. This element was generated on Mon Oct 09 17:40:56 CST 2017.
  61. -->
  62. <where>
  63. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  64. <if test="criteria.valid">
  65. <trim prefix="(" prefixOverrides="and" suffix=")">
  66. <foreach collection="criteria.criteria" item="criterion">
  67. <choose>
  68. <when test="criterion.noValue">
  69. and ${criterion.condition}
  70. </when>
  71. <when test="criterion.singleValue">
  72. and ${criterion.condition} #{criterion.value}
  73. </when>
  74. <when test="criterion.betweenValue">
  75. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  76. </when>
  77. <when test="criterion.listValue">
  78. and ${criterion.condition}
  79. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  80. #{listItem}
  81. </foreach>
  82. </when>
  83. </choose>
  84. </foreach>
  85. </trim>
  86. </if>
  87. </foreach>
  88. </where>
  89. </sql>
  90. <sql id="Base_Column_List">
  91. <!--
  92. WARNING - @mbg.generated
  93. This element is automatically generated by MyBatis Generator, do not modify.
  94. This element was generated on Mon Oct 09 17:40:56 CST 2017.
  95. -->
  96. id, cid, name, sex, mobile, email, qq, wechat, depatrment, customer_position, remarks
  97. </sql>
  98. <select id="selectByExample" parameterType="com.goafanti.common.model.CustomerUserInfoExample" resultMap="BaseResultMap">
  99. <!--
  100. WARNING - @mbg.generated
  101. This element is automatically generated by MyBatis Generator, do not modify.
  102. This element was generated on Mon Oct 09 17:40:56 CST 2017.
  103. -->
  104. select
  105. <if test="distinct">
  106. distinct
  107. </if>
  108. <include refid="Base_Column_List" />
  109. from customer_user_info
  110. <if test="_parameter != null">
  111. <include refid="Example_Where_Clause" />
  112. </if>
  113. <if test="orderByClause != null">
  114. order by ${orderByClause}
  115. </if>
  116. </select>
  117. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  118. <!--
  119. WARNING - @mbg.generated
  120. This element is automatically generated by MyBatis Generator, do not modify.
  121. This element was generated on Mon Oct 09 17:40:56 CST 2017.
  122. -->
  123. select
  124. <include refid="Base_Column_List" />
  125. from customer_user_info
  126. where id = #{id,jdbcType=VARCHAR}
  127. </select>
  128. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  129. <!--
  130. WARNING - @mbg.generated
  131. This element is automatically generated by MyBatis Generator, do not modify.
  132. This element was generated on Mon Oct 09 17:40:56 CST 2017.
  133. -->
  134. delete from customer_user_info
  135. where id = #{id,jdbcType=VARCHAR}
  136. </delete>
  137. <delete id="deleteByExample" parameterType="com.goafanti.common.model.CustomerUserInfoExample">
  138. <!--
  139. WARNING - @mbg.generated
  140. This element is automatically generated by MyBatis Generator, do not modify.
  141. This element was generated on Mon Oct 09 17:40:56 CST 2017.
  142. -->
  143. delete from customer_user_info
  144. <if test="_parameter != null">
  145. <include refid="Example_Where_Clause" />
  146. </if>
  147. </delete>
  148. <insert id="insert" parameterType="com.goafanti.common.model.CustomerUserInfo">
  149. <!--
  150. WARNING - @mbg.generated
  151. This element is automatically generated by MyBatis Generator, do not modify.
  152. This element was generated on Mon Oct 09 17:40:56 CST 2017.
  153. -->
  154. insert into customer_user_info (id, cid, name,
  155. sex, mobile, email, qq,
  156. wechat, depatrment, customer_position,
  157. remarks)
  158. values (#{id,jdbcType=VARCHAR}, #{cid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
  159. #{sex,jdbcType=CHAR}, #{mobile,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR},
  160. #{wechat,jdbcType=VARCHAR}, #{depatrment,jdbcType=VARCHAR}, #{customerPosition,jdbcType=VARCHAR},
  161. #{remarks,jdbcType=VARCHAR})
  162. </insert>
  163. <insert id="insertSelective" parameterType="com.goafanti.common.model.CustomerUserInfo">
  164. <!--
  165. WARNING - @mbg.generated
  166. This element is automatically generated by MyBatis Generator, do not modify.
  167. This element was generated on Mon Oct 09 17:40:56 CST 2017.
  168. -->
  169. insert into customer_user_info
  170. <trim prefix="(" suffix=")" suffixOverrides=",">
  171. <if test="id != null">
  172. id,
  173. </if>
  174. <if test="cid != null">
  175. cid,
  176. </if>
  177. <if test="name != null">
  178. name,
  179. </if>
  180. <if test="sex != null">
  181. sex,
  182. </if>
  183. <if test="mobile != null">
  184. mobile,
  185. </if>
  186. <if test="email != null">
  187. email,
  188. </if>
  189. <if test="qq != null">
  190. qq,
  191. </if>
  192. <if test="wechat != null">
  193. wechat,
  194. </if>
  195. <if test="depatrment != null">
  196. depatrment,
  197. </if>
  198. <if test="customerPosition != null">
  199. customer_position,
  200. </if>
  201. <if test="remarks != null">
  202. remarks,
  203. </if>
  204. </trim>
  205. <trim prefix="values (" suffix=")" suffixOverrides=",">
  206. <if test="id != null">
  207. #{id,jdbcType=VARCHAR},
  208. </if>
  209. <if test="cid != null">
  210. #{cid,jdbcType=VARCHAR},
  211. </if>
  212. <if test="name != null">
  213. #{name,jdbcType=VARCHAR},
  214. </if>
  215. <if test="sex != null">
  216. #{sex,jdbcType=CHAR},
  217. </if>
  218. <if test="mobile != null">
  219. #{mobile,jdbcType=VARCHAR},
  220. </if>
  221. <if test="email != null">
  222. #{email,jdbcType=VARCHAR},
  223. </if>
  224. <if test="qq != null">
  225. #{qq,jdbcType=VARCHAR},
  226. </if>
  227. <if test="wechat != null">
  228. #{wechat,jdbcType=VARCHAR},
  229. </if>
  230. <if test="depatrment != null">
  231. #{depatrment,jdbcType=VARCHAR},
  232. </if>
  233. <if test="customerPosition != null">
  234. #{customerPosition,jdbcType=VARCHAR},
  235. </if>
  236. <if test="remarks != null">
  237. #{remarks,jdbcType=VARCHAR},
  238. </if>
  239. </trim>
  240. </insert>
  241. <select id="countByExample" parameterType="com.goafanti.common.model.CustomerUserInfoExample" resultType="java.lang.Long">
  242. <!--
  243. WARNING - @mbg.generated
  244. This element is automatically generated by MyBatis Generator, do not modify.
  245. This element was generated on Mon Oct 09 17:40:56 CST 2017.
  246. -->
  247. select count(*) from customer_user_info
  248. <if test="_parameter != null">
  249. <include refid="Example_Where_Clause" />
  250. </if>
  251. </select>
  252. <update id="updateByExampleSelective" parameterType="map">
  253. <!--
  254. WARNING - @mbg.generated
  255. This element is automatically generated by MyBatis Generator, do not modify.
  256. This element was generated on Mon Oct 09 17:40:56 CST 2017.
  257. -->
  258. update customer_user_info
  259. <set>
  260. <if test="record.id != null">
  261. id = #{record.id,jdbcType=VARCHAR},
  262. </if>
  263. <if test="record.cid != null">
  264. cid = #{record.cid,jdbcType=VARCHAR},
  265. </if>
  266. <if test="record.name != null">
  267. name = #{record.name,jdbcType=VARCHAR},
  268. </if>
  269. <if test="record.sex != null">
  270. sex = #{record.sex,jdbcType=CHAR},
  271. </if>
  272. <if test="record.mobile != null">
  273. mobile = #{record.mobile,jdbcType=VARCHAR},
  274. </if>
  275. <if test="record.email != null">
  276. email = #{record.email,jdbcType=VARCHAR},
  277. </if>
  278. <if test="record.qq != null">
  279. qq = #{record.qq,jdbcType=VARCHAR},
  280. </if>
  281. <if test="record.wechat != null">
  282. wechat = #{record.wechat,jdbcType=VARCHAR},
  283. </if>
  284. <if test="record.depatrment != null">
  285. depatrment = #{record.depatrment,jdbcType=VARCHAR},
  286. </if>
  287. <if test="record.customerPosition != null">
  288. customer_position = #{record.customerPosition,jdbcType=VARCHAR},
  289. </if>
  290. <if test="record.remarks != null">
  291. remarks = #{record.remarks,jdbcType=VARCHAR},
  292. </if>
  293. </set>
  294. <if test="_parameter != null">
  295. <include refid="Update_By_Example_Where_Clause" />
  296. </if>
  297. </update>
  298. <update id="updateByExample" parameterType="map">
  299. <!--
  300. WARNING - @mbg.generated
  301. This element is automatically generated by MyBatis Generator, do not modify.
  302. This element was generated on Mon Oct 09 17:40:56 CST 2017.
  303. -->
  304. update customer_user_info
  305. set id = #{record.id,jdbcType=VARCHAR},
  306. cid = #{record.cid,jdbcType=VARCHAR},
  307. name = #{record.name,jdbcType=VARCHAR},
  308. sex = #{record.sex,jdbcType=CHAR},
  309. mobile = #{record.mobile,jdbcType=VARCHAR},
  310. email = #{record.email,jdbcType=VARCHAR},
  311. qq = #{record.qq,jdbcType=VARCHAR},
  312. wechat = #{record.wechat,jdbcType=VARCHAR},
  313. depatrment = #{record.depatrment,jdbcType=VARCHAR},
  314. customer_position = #{record.customerPosition,jdbcType=VARCHAR},
  315. remarks = #{record.remarks,jdbcType=VARCHAR}
  316. <if test="_parameter != null">
  317. <include refid="Update_By_Example_Where_Clause" />
  318. </if>
  319. </update>
  320. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.CustomerUserInfo">
  321. <!--
  322. WARNING - @mbg.generated
  323. This element is automatically generated by MyBatis Generator, do not modify.
  324. This element was generated on Mon Oct 09 17:40:56 CST 2017.
  325. -->
  326. update customer_user_info
  327. <set>
  328. <if test="cid != null">
  329. cid = #{cid,jdbcType=VARCHAR},
  330. </if>
  331. <if test="name != null">
  332. name = #{name,jdbcType=VARCHAR},
  333. </if>
  334. <if test="sex != null">
  335. sex = #{sex,jdbcType=CHAR},
  336. </if>
  337. <if test="mobile != null">
  338. mobile = #{mobile,jdbcType=VARCHAR},
  339. </if>
  340. <if test="email != null">
  341. email = #{email,jdbcType=VARCHAR},
  342. </if>
  343. <if test="qq != null">
  344. qq = #{qq,jdbcType=VARCHAR},
  345. </if>
  346. <if test="wechat != null">
  347. wechat = #{wechat,jdbcType=VARCHAR},
  348. </if>
  349. <if test="depatrment != null">
  350. depatrment = #{depatrment,jdbcType=VARCHAR},
  351. </if>
  352. <if test="customerPosition != null">
  353. customer_position = #{customerPosition,jdbcType=VARCHAR},
  354. </if>
  355. <if test="remarks != null">
  356. remarks = #{remarks,jdbcType=VARCHAR},
  357. </if>
  358. </set>
  359. where id = #{id,jdbcType=VARCHAR}
  360. </update>
  361. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.CustomerUserInfo">
  362. <!--
  363. WARNING - @mbg.generated
  364. This element is automatically generated by MyBatis Generator, do not modify.
  365. This element was generated on Mon Oct 09 17:40:56 CST 2017.
  366. -->
  367. update customer_user_info
  368. set cid = #{cid,jdbcType=VARCHAR},
  369. name = #{name,jdbcType=VARCHAR},
  370. sex = #{sex,jdbcType=CHAR},
  371. mobile = #{mobile,jdbcType=VARCHAR},
  372. email = #{email,jdbcType=VARCHAR},
  373. qq = #{qq,jdbcType=VARCHAR},
  374. wechat = #{wechat,jdbcType=VARCHAR},
  375. depatrment = #{depatrment,jdbcType=VARCHAR},
  376. customer_position = #{customerPosition,jdbcType=VARCHAR},
  377. remarks = #{remarks,jdbcType=VARCHAR}
  378. where id = #{id,jdbcType=VARCHAR}
  379. </update>
  380. </mapper>