ImBranchMapper.xml 15 KB

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