ZzZxzxxFafyrMapper.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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.ghsc.partybuild.mapper.ZzZxzxxFafyrMapper">
  4. <resultMap id="BaseResultMap" type="com.ghsc.partybuild.model.ZzZxzxxFafyr">
  5. <id column="ID" jdbcType="VARCHAR" property="id" />
  6. <result column="CASE_ID" jdbcType="VARCHAR" property="caseId" />
  7. <result column="SPOKESMAN_ID" jdbcType="VARCHAR" property="spokesmanId" />
  8. <result column="VIP" jdbcType="INTEGER" property="vip" />
  9. <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
  10. <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
  11. <result column="DELETED" jdbcType="INTEGER" property="deleted" />
  12. <result column="CREATE_USER_ID" jdbcType="VARCHAR" property="createUserId" />
  13. <result column="UPDATE_USER_ID" jdbcType="VARCHAR" property="updateUserId" />
  14. </resultMap>
  15. <sql id="Example_Where_Clause">
  16. <where>
  17. <foreach collection="oredCriteria" item="criteria" separator="or">
  18. <if test="criteria.valid">
  19. <trim prefix="(" prefixOverrides="and" suffix=")">
  20. <foreach collection="criteria.criteria" item="criterion">
  21. <choose>
  22. <when test="criterion.noValue">
  23. and ${criterion.condition}
  24. </when>
  25. <when test="criterion.singleValue">
  26. and ${criterion.condition} #{criterion.value}
  27. </when>
  28. <when test="criterion.betweenValue">
  29. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  30. </when>
  31. <when test="criterion.listValue">
  32. and ${criterion.condition}
  33. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  34. #{listItem}
  35. </foreach>
  36. </when>
  37. </choose>
  38. </foreach>
  39. </trim>
  40. </if>
  41. </foreach>
  42. </where>
  43. </sql>
  44. <sql id="Update_By_Example_Where_Clause">
  45. <where>
  46. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  47. <if test="criteria.valid">
  48. <trim prefix="(" prefixOverrides="and" suffix=")">
  49. <foreach collection="criteria.criteria" item="criterion">
  50. <choose>
  51. <when test="criterion.noValue">
  52. and ${criterion.condition}
  53. </when>
  54. <when test="criterion.singleValue">
  55. and ${criterion.condition} #{criterion.value}
  56. </when>
  57. <when test="criterion.betweenValue">
  58. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  59. </when>
  60. <when test="criterion.listValue">
  61. and ${criterion.condition}
  62. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  63. #{listItem}
  64. </foreach>
  65. </when>
  66. </choose>
  67. </foreach>
  68. </trim>
  69. </if>
  70. </foreach>
  71. </where>
  72. </sql>
  73. <sql id="Base_Column_List">
  74. ID, CASE_ID, SPOKESMAN_ID, VIP, CREATE_TIME, UPDATE_TIME, DELETED, CREATE_USER_ID,
  75. UPDATE_USER_ID
  76. </sql>
  77. <select id="selectByExample" parameterType="com.ghsc.partybuild.model.ZzZxzxxFafyrExample" resultMap="BaseResultMap">
  78. select
  79. <if test="distinct">
  80. distinct
  81. </if>
  82. <include refid="Base_Column_List" />
  83. from zz_zxzxx_fafyr
  84. <if test="_parameter != null">
  85. <include refid="Example_Where_Clause" />
  86. </if>
  87. <if test="orderByClause != null">
  88. order by ${orderByClause}
  89. </if>
  90. </select>
  91. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  92. select
  93. <include refid="Base_Column_List" />
  94. from zz_zxzxx_fafyr
  95. where ID = #{id,jdbcType=VARCHAR}
  96. </select>
  97. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  98. delete from zz_zxzxx_fafyr
  99. where ID = #{id,jdbcType=VARCHAR}
  100. </delete>
  101. <delete id="deleteByExample" parameterType="com.ghsc.partybuild.model.ZzZxzxxFafyrExample">
  102. delete from zz_zxzxx_fafyr
  103. <if test="_parameter != null">
  104. <include refid="Example_Where_Clause" />
  105. </if>
  106. </delete>
  107. <insert id="insert" parameterType="com.ghsc.partybuild.model.ZzZxzxxFafyr">
  108. insert into zz_zxzxx_fafyr (ID, CASE_ID, SPOKESMAN_ID,
  109. VIP, CREATE_TIME, UPDATE_TIME,
  110. DELETED, CREATE_USER_ID, UPDATE_USER_ID
  111. )
  112. values (#{id,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, #{spokesmanId,jdbcType=VARCHAR},
  113. #{vip,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
  114. #{deleted,jdbcType=INTEGER}, #{createUserId,jdbcType=VARCHAR}, #{updateUserId,jdbcType=VARCHAR}
  115. )
  116. </insert>
  117. <insert id="insertSelective" parameterType="com.ghsc.partybuild.model.ZzZxzxxFafyr">
  118. insert into zz_zxzxx_fafyr
  119. <trim prefix="(" suffix=")" suffixOverrides=",">
  120. <if test="id != null">
  121. ID,
  122. </if>
  123. <if test="caseId != null">
  124. CASE_ID,
  125. </if>
  126. <if test="spokesmanId != null">
  127. SPOKESMAN_ID,
  128. </if>
  129. <if test="vip != null">
  130. VIP,
  131. </if>
  132. <if test="createTime != null">
  133. CREATE_TIME,
  134. </if>
  135. <if test="updateTime != null">
  136. UPDATE_TIME,
  137. </if>
  138. <if test="deleted != null">
  139. DELETED,
  140. </if>
  141. <if test="createUserId != null">
  142. CREATE_USER_ID,
  143. </if>
  144. <if test="updateUserId != null">
  145. UPDATE_USER_ID,
  146. </if>
  147. </trim>
  148. <trim prefix="values (" suffix=")" suffixOverrides=",">
  149. <if test="id != null">
  150. #{id,jdbcType=VARCHAR},
  151. </if>
  152. <if test="caseId != null">
  153. #{caseId,jdbcType=VARCHAR},
  154. </if>
  155. <if test="spokesmanId != null">
  156. #{spokesmanId,jdbcType=VARCHAR},
  157. </if>
  158. <if test="vip != null">
  159. #{vip,jdbcType=INTEGER},
  160. </if>
  161. <if test="createTime != null">
  162. #{createTime,jdbcType=TIMESTAMP},
  163. </if>
  164. <if test="updateTime != null">
  165. #{updateTime,jdbcType=TIMESTAMP},
  166. </if>
  167. <if test="deleted != null">
  168. #{deleted,jdbcType=INTEGER},
  169. </if>
  170. <if test="createUserId != null">
  171. #{createUserId,jdbcType=VARCHAR},
  172. </if>
  173. <if test="updateUserId != null">
  174. #{updateUserId,jdbcType=VARCHAR},
  175. </if>
  176. </trim>
  177. </insert>
  178. <select id="countByExample" parameterType="com.ghsc.partybuild.model.ZzZxzxxFafyrExample" resultType="java.lang.Long">
  179. select count(*) from zz_zxzxx_fafyr
  180. <if test="_parameter != null">
  181. <include refid="Example_Where_Clause" />
  182. </if>
  183. </select>
  184. <update id="updateByExampleSelective" parameterType="map">
  185. update zz_zxzxx_fafyr
  186. <set>
  187. <if test="record.id != null">
  188. ID = #{record.id,jdbcType=VARCHAR},
  189. </if>
  190. <if test="record.caseId != null">
  191. CASE_ID = #{record.caseId,jdbcType=VARCHAR},
  192. </if>
  193. <if test="record.spokesmanId != null">
  194. SPOKESMAN_ID = #{record.spokesmanId,jdbcType=VARCHAR},
  195. </if>
  196. <if test="record.vip != null">
  197. VIP = #{record.vip,jdbcType=INTEGER},
  198. </if>
  199. <if test="record.createTime != null">
  200. CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
  201. </if>
  202. <if test="record.updateTime != null">
  203. UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
  204. </if>
  205. <if test="record.deleted != null">
  206. DELETED = #{record.deleted,jdbcType=INTEGER},
  207. </if>
  208. <if test="record.createUserId != null">
  209. CREATE_USER_ID = #{record.createUserId,jdbcType=VARCHAR},
  210. </if>
  211. <if test="record.updateUserId != null">
  212. UPDATE_USER_ID = #{record.updateUserId,jdbcType=VARCHAR},
  213. </if>
  214. </set>
  215. <if test="_parameter != null">
  216. <include refid="Update_By_Example_Where_Clause" />
  217. </if>
  218. </update>
  219. <update id="updateByExample" parameterType="map">
  220. update zz_zxzxx_fafyr
  221. set ID = #{record.id,jdbcType=VARCHAR},
  222. CASE_ID = #{record.caseId,jdbcType=VARCHAR},
  223. SPOKESMAN_ID = #{record.spokesmanId,jdbcType=VARCHAR},
  224. VIP = #{record.vip,jdbcType=INTEGER},
  225. CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
  226. UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
  227. DELETED = #{record.deleted,jdbcType=INTEGER},
  228. CREATE_USER_ID = #{record.createUserId,jdbcType=VARCHAR},
  229. UPDATE_USER_ID = #{record.updateUserId,jdbcType=VARCHAR}
  230. <if test="_parameter != null">
  231. <include refid="Update_By_Example_Where_Clause" />
  232. </if>
  233. </update>
  234. <update id="updateByPrimaryKeySelective" parameterType="com.ghsc.partybuild.model.ZzZxzxxFafyr">
  235. update zz_zxzxx_fafyr
  236. <set>
  237. <if test="caseId != null">
  238. CASE_ID = #{caseId,jdbcType=VARCHAR},
  239. </if>
  240. <if test="spokesmanId != null">
  241. SPOKESMAN_ID = #{spokesmanId,jdbcType=VARCHAR},
  242. </if>
  243. <if test="vip != null">
  244. VIP = #{vip,jdbcType=INTEGER},
  245. </if>
  246. <if test="createTime != null">
  247. CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
  248. </if>
  249. <if test="updateTime != null">
  250. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  251. </if>
  252. <if test="deleted != null">
  253. DELETED = #{deleted,jdbcType=INTEGER},
  254. </if>
  255. <if test="createUserId != null">
  256. CREATE_USER_ID = #{createUserId,jdbcType=VARCHAR},
  257. </if>
  258. <if test="updateUserId != null">
  259. UPDATE_USER_ID = #{updateUserId,jdbcType=VARCHAR},
  260. </if>
  261. </set>
  262. where ID = #{id,jdbcType=VARCHAR}
  263. </update>
  264. <update id="updateByPrimaryKey" parameterType="com.ghsc.partybuild.model.ZzZxzxxFafyr">
  265. update zz_zxzxx_fafyr
  266. set CASE_ID = #{caseId,jdbcType=VARCHAR},
  267. SPOKESMAN_ID = #{spokesmanId,jdbcType=VARCHAR},
  268. VIP = #{vip,jdbcType=INTEGER},
  269. CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
  270. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  271. DELETED = #{deleted,jdbcType=INTEGER},
  272. CREATE_USER_ID = #{createUserId,jdbcType=VARCHAR},
  273. UPDATE_USER_ID = #{updateUserId,jdbcType=VARCHAR}
  274. where ID = #{id,jdbcType=VARCHAR}
  275. </update>
  276. </mapper>