ContentPlatformAccountMapper.xml 14 KB

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