ApCompanyContactMapper.xml 13 KB

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