ContentPlatformAccountMapper.xml 13 KB

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