CustomerLogMapper.xml 18 KB

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