SysUserCfPracticeBaseMapper.xml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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.bowintek.smartsearch.mapper.SysUserCfPracticeBaseMapper">
  4. <resultMap id="BaseResultMap" type="com.bowintek.smartsearch.model.SysUserCfPracticeBase">
  5. <id column="UserPracticeBaseID" jdbcType="VARCHAR" property="userPracticeBaseID" />
  6. <result column="PracticeBaseID" jdbcType="VARCHAR" property="practiceBaseID" />
  7. <result column="UserID" jdbcType="VARCHAR" property="userID" />
  8. <result column="CreateBy" jdbcType="VARCHAR" property="createBy" />
  9. <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime" />
  10. </resultMap>
  11. <sql id="Example_Where_Clause">
  12. <where>
  13. <foreach collection="oredCriteria" item="criteria" separator="or">
  14. <if test="criteria.valid">
  15. <trim prefix="(" prefixOverrides="and" suffix=")">
  16. <foreach collection="criteria.criteria" item="criterion">
  17. <choose>
  18. <when test="criterion.noValue">
  19. and ${criterion.condition}
  20. </when>
  21. <when test="criterion.singleValue">
  22. and ${criterion.condition} #{criterion.value}
  23. </when>
  24. <when test="criterion.betweenValue">
  25. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  26. </when>
  27. <when test="criterion.listValue">
  28. and ${criterion.condition}
  29. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  30. #{listItem}
  31. </foreach>
  32. </when>
  33. </choose>
  34. </foreach>
  35. </trim>
  36. </if>
  37. </foreach>
  38. </where>
  39. </sql>
  40. <sql id="Update_By_Example_Where_Clause">
  41. <where>
  42. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  43. <if test="criteria.valid">
  44. <trim prefix="(" prefixOverrides="and" suffix=")">
  45. <foreach collection="criteria.criteria" item="criterion">
  46. <choose>
  47. <when test="criterion.noValue">
  48. and ${criterion.condition}
  49. </when>
  50. <when test="criterion.singleValue">
  51. and ${criterion.condition} #{criterion.value}
  52. </when>
  53. <when test="criterion.betweenValue">
  54. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  55. </when>
  56. <when test="criterion.listValue">
  57. and ${criterion.condition}
  58. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  59. #{listItem}
  60. </foreach>
  61. </when>
  62. </choose>
  63. </foreach>
  64. </trim>
  65. </if>
  66. </foreach>
  67. </where>
  68. </sql>
  69. <sql id="Base_Column_List">
  70. UserPracticeBaseID, PracticeBaseID, UserID, CreateBy, CreateTime
  71. </sql>
  72. <select id="selectByExample" parameterType="com.bowintek.smartsearch.model.SysUserCfPracticeBaseExample" resultMap="BaseResultMap">
  73. select
  74. <if test="distinct">
  75. distinct
  76. </if>
  77. <include refid="Base_Column_List" />
  78. from sys_user_cf_practice_base
  79. <if test="_parameter != null">
  80. <include refid="Example_Where_Clause" />
  81. </if>
  82. <if test="orderByClause != null">
  83. order by ${orderByClause}
  84. </if>
  85. </select>
  86. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  87. select
  88. <include refid="Base_Column_List" />
  89. from sys_user_cf_practice_base
  90. where UserPracticeBaseID = #{userPracticeBaseID,jdbcType=VARCHAR}
  91. </select>
  92. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  93. delete from sys_user_cf_practice_base
  94. where UserPracticeBaseID = #{userPracticeBaseID,jdbcType=VARCHAR}
  95. </delete>
  96. <delete id="deleteByExample" parameterType="com.bowintek.smartsearch.model.SysUserCfPracticeBaseExample">
  97. delete from sys_user_cf_practice_base
  98. <if test="_parameter != null">
  99. <include refid="Example_Where_Clause" />
  100. </if>
  101. </delete>
  102. <insert id="insert" parameterType="com.bowintek.smartsearch.model.SysUserCfPracticeBase">
  103. insert into sys_user_cf_practice_base (UserPracticeBaseID, PracticeBaseID,
  104. UserID, CreateBy, CreateTime
  105. )
  106. values (#{userPracticeBaseID,jdbcType=VARCHAR}, #{practiceBaseID,jdbcType=VARCHAR},
  107. #{userID,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
  108. )
  109. </insert>
  110. <insert id="insertSelective" parameterType="com.bowintek.smartsearch.model.SysUserCfPracticeBase">
  111. insert into sys_user_cf_practice_base
  112. <trim prefix="(" suffix=")" suffixOverrides=",">
  113. <if test="userPracticeBaseID != null">
  114. UserPracticeBaseID,
  115. </if>
  116. <if test="practiceBaseID != null">
  117. PracticeBaseID,
  118. </if>
  119. <if test="userID != null">
  120. UserID,
  121. </if>
  122. <if test="createBy != null">
  123. CreateBy,
  124. </if>
  125. <if test="createTime != null">
  126. CreateTime,
  127. </if>
  128. </trim>
  129. <trim prefix="values (" suffix=")" suffixOverrides=",">
  130. <if test="userPracticeBaseID != null">
  131. #{userPracticeBaseID,jdbcType=VARCHAR},
  132. </if>
  133. <if test="practiceBaseID != null">
  134. #{practiceBaseID,jdbcType=VARCHAR},
  135. </if>
  136. <if test="userID != null">
  137. #{userID,jdbcType=VARCHAR},
  138. </if>
  139. <if test="createBy != null">
  140. #{createBy,jdbcType=VARCHAR},
  141. </if>
  142. <if test="createTime != null">
  143. #{createTime,jdbcType=TIMESTAMP},
  144. </if>
  145. </trim>
  146. </insert>
  147. <select id="countByExample" parameterType="com.bowintek.smartsearch.model.SysUserCfPracticeBaseExample" resultType="java.lang.Long">
  148. select count(*) from sys_user_cf_practice_base
  149. <if test="_parameter != null">
  150. <include refid="Example_Where_Clause" />
  151. </if>
  152. </select>
  153. <update id="updateByExampleSelective" parameterType="map">
  154. update sys_user_cf_practice_base
  155. <set>
  156. <if test="row.userPracticeBaseID != null">
  157. UserPracticeBaseID = #{row.userPracticeBaseID,jdbcType=VARCHAR},
  158. </if>
  159. <if test="row.practiceBaseID != null">
  160. PracticeBaseID = #{row.practiceBaseID,jdbcType=VARCHAR},
  161. </if>
  162. <if test="row.userID != null">
  163. UserID = #{row.userID,jdbcType=VARCHAR},
  164. </if>
  165. <if test="row.createBy != null">
  166. CreateBy = #{row.createBy,jdbcType=VARCHAR},
  167. </if>
  168. <if test="row.createTime != null">
  169. CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
  170. </if>
  171. </set>
  172. <if test="example != null">
  173. <include refid="Update_By_Example_Where_Clause" />
  174. </if>
  175. </update>
  176. <update id="updateByExample" parameterType="map">
  177. update sys_user_cf_practice_base
  178. set UserPracticeBaseID = #{row.userPracticeBaseID,jdbcType=VARCHAR},
  179. PracticeBaseID = #{row.practiceBaseID,jdbcType=VARCHAR},
  180. UserID = #{row.userID,jdbcType=VARCHAR},
  181. CreateBy = #{row.createBy,jdbcType=VARCHAR},
  182. CreateTime = #{row.createTime,jdbcType=TIMESTAMP}
  183. <if test="example != null">
  184. <include refid="Update_By_Example_Where_Clause" />
  185. </if>
  186. </update>
  187. <update id="updateByPrimaryKeySelective" parameterType="com.bowintek.smartsearch.model.SysUserCfPracticeBase">
  188. update sys_user_cf_practice_base
  189. <set>
  190. <if test="practiceBaseID != null">
  191. PracticeBaseID = #{practiceBaseID,jdbcType=VARCHAR},
  192. </if>
  193. <if test="userID != null">
  194. UserID = #{userID,jdbcType=VARCHAR},
  195. </if>
  196. <if test="createBy != null">
  197. CreateBy = #{createBy,jdbcType=VARCHAR},
  198. </if>
  199. <if test="createTime != null">
  200. CreateTime = #{createTime,jdbcType=TIMESTAMP},
  201. </if>
  202. </set>
  203. where UserPracticeBaseID = #{userPracticeBaseID,jdbcType=VARCHAR}
  204. </update>
  205. <update id="updateByPrimaryKey" parameterType="com.bowintek.smartsearch.model.SysUserCfPracticeBase">
  206. update sys_user_cf_practice_base
  207. set PracticeBaseID = #{practiceBaseID,jdbcType=VARCHAR},
  208. UserID = #{userID,jdbcType=VARCHAR},
  209. CreateBy = #{createBy,jdbcType=VARCHAR},
  210. CreateTime = #{createTime,jdbcType=TIMESTAMP}
  211. where UserPracticeBaseID = #{userPracticeBaseID,jdbcType=VARCHAR}
  212. </update>
  213. </mapper>