ScPublisherMapper.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  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.ScPublisherMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.ScPublisher">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Tue Jun 26 18:28:59 CST 2018.
  9. -->
  10. <id column="id" jdbcType="VARCHAR" property="id" />
  11. <result column="type" jdbcType="INTEGER" property="type" />
  12. <result column="name" jdbcType="VARCHAR" property="name" />
  13. <result column="province" jdbcType="INTEGER" property="province" />
  14. <result column="city" jdbcType="INTEGER" property="city" />
  15. <result column="area" jdbcType="INTEGER" property="area" />
  16. <result column="email" jdbcType="VARCHAR" property="email" />
  17. <result column="zip_code" jdbcType="VARCHAR" property="zipCode" />
  18. <result column="contacts" jdbcType="VARCHAR" property="contacts" />
  19. <result column="telephone" jdbcType="VARCHAR" property="telephone" />
  20. <result column="address" jdbcType="VARCHAR" property="address" />
  21. <result column="introduce" jdbcType="VARCHAR" property="introduce" />
  22. <result column="remarks" jdbcType="VARCHAR" property="remarks" />
  23. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  24. <result column="delete_sign" jdbcType="INTEGER" property="deleteSign" />
  25. </resultMap>
  26. <sql id="Example_Where_Clause">
  27. <!--
  28. WARNING - @mbg.generated
  29. This element is automatically generated by MyBatis Generator, do not modify.
  30. This element was generated on Tue Jun 26 18:28:59 CST 2018.
  31. -->
  32. <where>
  33. <foreach collection="oredCriteria" item="criteria" separator="or">
  34. <if test="criteria.valid">
  35. <trim prefix="(" prefixOverrides="and" suffix=")">
  36. <foreach collection="criteria.criteria" item="criterion">
  37. <choose>
  38. <when test="criterion.noValue">
  39. and ${criterion.condition}
  40. </when>
  41. <when test="criterion.singleValue">
  42. and ${criterion.condition} #{criterion.value}
  43. </when>
  44. <when test="criterion.betweenValue">
  45. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  46. </when>
  47. <when test="criterion.listValue">
  48. and ${criterion.condition}
  49. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  50. #{listItem}
  51. </foreach>
  52. </when>
  53. </choose>
  54. </foreach>
  55. </trim>
  56. </if>
  57. </foreach>
  58. </where>
  59. </sql>
  60. <sql id="Update_By_Example_Where_Clause">
  61. <!--
  62. WARNING - @mbg.generated
  63. This element is automatically generated by MyBatis Generator, do not modify.
  64. This element was generated on Tue Jun 26 18:28:59 CST 2018.
  65. -->
  66. <where>
  67. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  68. <if test="criteria.valid">
  69. <trim prefix="(" prefixOverrides="and" suffix=")">
  70. <foreach collection="criteria.criteria" item="criterion">
  71. <choose>
  72. <when test="criterion.noValue">
  73. and ${criterion.condition}
  74. </when>
  75. <when test="criterion.singleValue">
  76. and ${criterion.condition} #{criterion.value}
  77. </when>
  78. <when test="criterion.betweenValue">
  79. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  80. </when>
  81. <when test="criterion.listValue">
  82. and ${criterion.condition}
  83. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  84. #{listItem}
  85. </foreach>
  86. </when>
  87. </choose>
  88. </foreach>
  89. </trim>
  90. </if>
  91. </foreach>
  92. </where>
  93. </sql>
  94. <sql id="Base_Column_List">
  95. <!--
  96. WARNING - @mbg.generated
  97. This element is automatically generated by MyBatis Generator, do not modify.
  98. This element was generated on Tue Jun 26 18:28:59 CST 2018.
  99. -->
  100. id, type, name, province, city, area, email, zip_code, contacts, telephone, address,
  101. introduce, remarks, create_time, delete_sign
  102. </sql>
  103. <select id="selectByExample" parameterType="com.goafanti.common.model.ScPublisherExample" resultMap="BaseResultMap">
  104. <!--
  105. WARNING - @mbg.generated
  106. This element is automatically generated by MyBatis Generator, do not modify.
  107. This element was generated on Tue Jun 26 18:28:59 CST 2018.
  108. -->
  109. select
  110. <if test="distinct">
  111. distinct
  112. </if>
  113. <include refid="Base_Column_List" />
  114. from sc_publisher
  115. <if test="_parameter != null">
  116. <include refid="Example_Where_Clause" />
  117. </if>
  118. <if test="orderByClause != null">
  119. order by ${orderByClause}
  120. </if>
  121. </select>
  122. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  123. <!--
  124. WARNING - @mbg.generated
  125. This element is automatically generated by MyBatis Generator, do not modify.
  126. This element was generated on Tue Jun 26 18:28:59 CST 2018.
  127. -->
  128. select
  129. <include refid="Base_Column_List" />
  130. from sc_publisher
  131. where id = #{id,jdbcType=VARCHAR}
  132. </select>
  133. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  134. <!--
  135. WARNING - @mbg.generated
  136. This element is automatically generated by MyBatis Generator, do not modify.
  137. This element was generated on Tue Jun 26 18:28:59 CST 2018.
  138. -->
  139. delete from sc_publisher
  140. where id = #{id,jdbcType=VARCHAR}
  141. </delete>
  142. <delete id="deleteByExample" parameterType="com.goafanti.common.model.ScPublisherExample">
  143. <!--
  144. WARNING - @mbg.generated
  145. This element is automatically generated by MyBatis Generator, do not modify.
  146. This element was generated on Tue Jun 26 18:28:59 CST 2018.
  147. -->
  148. delete from sc_publisher
  149. <if test="_parameter != null">
  150. <include refid="Example_Where_Clause" />
  151. </if>
  152. </delete>
  153. <insert id="insert" parameterType="com.goafanti.common.model.ScPublisher">
  154. <!--
  155. WARNING - @mbg.generated
  156. This element is automatically generated by MyBatis Generator, do not modify.
  157. This element was generated on Tue Jun 26 18:28:59 CST 2018.
  158. -->
  159. insert into sc_publisher (id, type, name,
  160. province, city, area,
  161. email, zip_code, contacts,
  162. telephone, address, introduce,
  163. remarks, create_time, delete_sign
  164. )
  165. values (#{id,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
  166. #{province,jdbcType=INTEGER}, #{city,jdbcType=INTEGER}, #{area,jdbcType=INTEGER},
  167. #{email,jdbcType=VARCHAR}, #{zipCode,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR},
  168. #{telephone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{introduce,jdbcType=VARCHAR},
  169. #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{deleteSign,jdbcType=INTEGER}
  170. )
  171. </insert>
  172. <insert id="insertSelective" parameterType="com.goafanti.common.model.ScPublisher">
  173. <!--
  174. WARNING - @mbg.generated
  175. This element is automatically generated by MyBatis Generator, do not modify.
  176. This element was generated on Tue Jun 26 18:28:59 CST 2018.
  177. -->
  178. insert into sc_publisher
  179. <trim prefix="(" suffix=")" suffixOverrides=",">
  180. <if test="id != null">
  181. id,
  182. </if>
  183. <if test="type != null">
  184. type,
  185. </if>
  186. <if test="name != null">
  187. name,
  188. </if>
  189. <if test="province != null">
  190. province,
  191. </if>
  192. <if test="city != null">
  193. city,
  194. </if>
  195. <if test="area != null">
  196. area,
  197. </if>
  198. <if test="email != null">
  199. email,
  200. </if>
  201. <if test="zipCode != null">
  202. zip_code,
  203. </if>
  204. <if test="contacts != null">
  205. contacts,
  206. </if>
  207. <if test="telephone != null">
  208. telephone,
  209. </if>
  210. <if test="address != null">
  211. address,
  212. </if>
  213. <if test="introduce != null">
  214. introduce,
  215. </if>
  216. <if test="remarks != null">
  217. remarks,
  218. </if>
  219. <if test="createTime != null">
  220. create_time,
  221. </if>
  222. <if test="deleteSign != null">
  223. delete_sign,
  224. </if>
  225. </trim>
  226. <trim prefix="values (" suffix=")" suffixOverrides=",">
  227. <if test="id != null">
  228. #{id,jdbcType=VARCHAR},
  229. </if>
  230. <if test="type != null">
  231. #{type,jdbcType=INTEGER},
  232. </if>
  233. <if test="name != null">
  234. #{name,jdbcType=VARCHAR},
  235. </if>
  236. <if test="province != null">
  237. #{province,jdbcType=INTEGER},
  238. </if>
  239. <if test="city != null">
  240. #{city,jdbcType=INTEGER},
  241. </if>
  242. <if test="area != null">
  243. #{area,jdbcType=INTEGER},
  244. </if>
  245. <if test="email != null">
  246. #{email,jdbcType=VARCHAR},
  247. </if>
  248. <if test="zipCode != null">
  249. #{zipCode,jdbcType=VARCHAR},
  250. </if>
  251. <if test="contacts != null">
  252. #{contacts,jdbcType=VARCHAR},
  253. </if>
  254. <if test="telephone != null">
  255. #{telephone,jdbcType=VARCHAR},
  256. </if>
  257. <if test="address != null">
  258. #{address,jdbcType=VARCHAR},
  259. </if>
  260. <if test="introduce != null">
  261. #{introduce,jdbcType=VARCHAR},
  262. </if>
  263. <if test="remarks != null">
  264. #{remarks,jdbcType=VARCHAR},
  265. </if>
  266. <if test="createTime != null">
  267. #{createTime,jdbcType=TIMESTAMP},
  268. </if>
  269. <if test="deleteSign != null">
  270. #{deleteSign,jdbcType=INTEGER},
  271. </if>
  272. </trim>
  273. </insert>
  274. <select id="countByExample" parameterType="com.goafanti.common.model.ScPublisherExample" resultType="java.lang.Long">
  275. <!--
  276. WARNING - @mbg.generated
  277. This element is automatically generated by MyBatis Generator, do not modify.
  278. This element was generated on Tue Jun 26 18:28:59 CST 2018.
  279. -->
  280. select count(*) from sc_publisher
  281. <if test="_parameter != null">
  282. <include refid="Example_Where_Clause" />
  283. </if>
  284. </select>
  285. <update id="updateByExampleSelective" parameterType="map">
  286. <!--
  287. WARNING - @mbg.generated
  288. This element is automatically generated by MyBatis Generator, do not modify.
  289. This element was generated on Tue Jun 26 18:28:59 CST 2018.
  290. -->
  291. update sc_publisher
  292. <set>
  293. <if test="record.id != null">
  294. id = #{record.id,jdbcType=VARCHAR},
  295. </if>
  296. <if test="record.type != null">
  297. type = #{record.type,jdbcType=INTEGER},
  298. </if>
  299. <if test="record.name != null">
  300. name = #{record.name,jdbcType=VARCHAR},
  301. </if>
  302. <if test="record.province != null">
  303. province = #{record.province,jdbcType=INTEGER},
  304. </if>
  305. <if test="record.city != null">
  306. city = #{record.city,jdbcType=INTEGER},
  307. </if>
  308. <if test="record.area != null">
  309. area = #{record.area,jdbcType=INTEGER},
  310. </if>
  311. <if test="record.email != null">
  312. email = #{record.email,jdbcType=VARCHAR},
  313. </if>
  314. <if test="record.zipCode != null">
  315. zip_code = #{record.zipCode,jdbcType=VARCHAR},
  316. </if>
  317. <if test="record.contacts != null">
  318. contacts = #{record.contacts,jdbcType=VARCHAR},
  319. </if>
  320. <if test="record.telephone != null">
  321. telephone = #{record.telephone,jdbcType=VARCHAR},
  322. </if>
  323. <if test="record.address != null">
  324. address = #{record.address,jdbcType=VARCHAR},
  325. </if>
  326. <if test="record.introduce != null">
  327. introduce = #{record.introduce,jdbcType=VARCHAR},
  328. </if>
  329. <if test="record.remarks != null">
  330. remarks = #{record.remarks,jdbcType=VARCHAR},
  331. </if>
  332. <if test="record.createTime != null">
  333. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  334. </if>
  335. <if test="record.deleteSign != null">
  336. delete_sign = #{record.deleteSign,jdbcType=INTEGER},
  337. </if>
  338. </set>
  339. <if test="_parameter != null">
  340. <include refid="Update_By_Example_Where_Clause" />
  341. </if>
  342. </update>
  343. <update id="updateByExample" parameterType="map">
  344. <!--
  345. WARNING - @mbg.generated
  346. This element is automatically generated by MyBatis Generator, do not modify.
  347. This element was generated on Tue Jun 26 18:28:59 CST 2018.
  348. -->
  349. update sc_publisher
  350. set id = #{record.id,jdbcType=VARCHAR},
  351. type = #{record.type,jdbcType=INTEGER},
  352. name = #{record.name,jdbcType=VARCHAR},
  353. province = #{record.province,jdbcType=INTEGER},
  354. city = #{record.city,jdbcType=INTEGER},
  355. area = #{record.area,jdbcType=INTEGER},
  356. email = #{record.email,jdbcType=VARCHAR},
  357. zip_code = #{record.zipCode,jdbcType=VARCHAR},
  358. contacts = #{record.contacts,jdbcType=VARCHAR},
  359. telephone = #{record.telephone,jdbcType=VARCHAR},
  360. address = #{record.address,jdbcType=VARCHAR},
  361. introduce = #{record.introduce,jdbcType=VARCHAR},
  362. remarks = #{record.remarks,jdbcType=VARCHAR},
  363. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  364. delete_sign = #{record.deleteSign,jdbcType=INTEGER}
  365. <if test="_parameter != null">
  366. <include refid="Update_By_Example_Where_Clause" />
  367. </if>
  368. </update>
  369. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ScPublisher">
  370. <!--
  371. WARNING - @mbg.generated
  372. This element is automatically generated by MyBatis Generator, do not modify.
  373. This element was generated on Tue Jun 26 18:28:59 CST 2018.
  374. -->
  375. update sc_publisher
  376. <set>
  377. <if test="type != null">
  378. type = #{type,jdbcType=INTEGER},
  379. </if>
  380. <if test="name != null">
  381. name = #{name,jdbcType=VARCHAR},
  382. </if>
  383. <if test="province != null">
  384. province = #{province,jdbcType=INTEGER},
  385. </if>
  386. <if test="city != null">
  387. city = #{city,jdbcType=INTEGER},
  388. </if>
  389. <if test="area != null">
  390. area = #{area,jdbcType=INTEGER},
  391. </if>
  392. <if test="email != null">
  393. email = #{email,jdbcType=VARCHAR},
  394. </if>
  395. <if test="zipCode != null">
  396. zip_code = #{zipCode,jdbcType=VARCHAR},
  397. </if>
  398. <if test="contacts != null">
  399. contacts = #{contacts,jdbcType=VARCHAR},
  400. </if>
  401. <if test="telephone != null">
  402. telephone = #{telephone,jdbcType=VARCHAR},
  403. </if>
  404. <if test="address != null">
  405. address = #{address,jdbcType=VARCHAR},
  406. </if>
  407. <if test="introduce != null">
  408. introduce = #{introduce,jdbcType=VARCHAR},
  409. </if>
  410. <if test="remarks != null">
  411. remarks = #{remarks,jdbcType=VARCHAR},
  412. </if>
  413. <if test="createTime != null">
  414. create_time = #{createTime,jdbcType=TIMESTAMP},
  415. </if>
  416. <if test="deleteSign != null">
  417. delete_sign = #{deleteSign,jdbcType=INTEGER},
  418. </if>
  419. </set>
  420. where id = #{id,jdbcType=VARCHAR}
  421. </update>
  422. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.ScPublisher">
  423. <!--
  424. WARNING - @mbg.generated
  425. This element is automatically generated by MyBatis Generator, do not modify.
  426. This element was generated on Tue Jun 26 18:28:59 CST 2018.
  427. -->
  428. update sc_publisher
  429. set type = #{type,jdbcType=INTEGER},
  430. name = #{name,jdbcType=VARCHAR},
  431. province = #{province,jdbcType=INTEGER},
  432. city = #{city,jdbcType=INTEGER},
  433. area = #{area,jdbcType=INTEGER},
  434. email = #{email,jdbcType=VARCHAR},
  435. zip_code = #{zipCode,jdbcType=VARCHAR},
  436. contacts = #{contacts,jdbcType=VARCHAR},
  437. telephone = #{telephone,jdbcType=VARCHAR},
  438. address = #{address,jdbcType=VARCHAR},
  439. introduce = #{introduce,jdbcType=VARCHAR},
  440. remarks = #{remarks,jdbcType=VARCHAR},
  441. create_time = #{createTime,jdbcType=TIMESTAMP},
  442. delete_sign = #{deleteSign,jdbcType=INTEGER}
  443. where id = #{id,jdbcType=VARCHAR}
  444. </update>
  445. </mapper>