TLendMapper.xml 15 KB

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