UserFollowBusinessMapper.xml 13 KB

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