TRepayDetailMapper.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  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.TRepayDetailMapper">
  4. <resultMap id="BaseResultMap" type="com.mvc.entity.TRepayDetail">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="DEATIL_ID" jdbcType="VARCHAR" property="deatilId" />
  7. <result column="BILL_CODE" jdbcType="VARCHAR" property="billCode" />
  8. <result column="DEVICE_SN" jdbcType="VARCHAR" property="deviceSn" />
  9. <result column="DETAIL_MEMO" jdbcType="VARCHAR" property="detailMemo" />
  10. <result column="ACTUAL_LEND_DAYS" jdbcType="INTEGER" property="actualLendDays" />
  11. <result column="LATE_FLAG" jdbcType="CHAR" property="lateFlag" />
  12. <result column="LATE_DAYS" jdbcType="INTEGER" property="lateDays" />
  13. <result column="LEND_ID" jdbcType="VARCHAR" property="lendId" />
  14. <result column="LEND_DETAIL_ID" jdbcType="VARCHAR" property="lendDetailId" />
  15. <result column="REPAY_TIME" jdbcType="TIMESTAMP" property="repayTime" />
  16. </resultMap>
  17. <sql id="Example_Where_Clause">
  18. <where>
  19. <foreach collection="oredCriteria" item="criteria" separator="or">
  20. <if test="criteria.valid">
  21. <trim prefix="(" prefixOverrides="and" suffix=")">
  22. <foreach collection="criteria.criteria" item="criterion">
  23. <choose>
  24. <when test="criterion.noValue">
  25. and ${criterion.condition}
  26. </when>
  27. <when test="criterion.singleValue">
  28. and ${criterion.condition} #{criterion.value}
  29. </when>
  30. <when test="criterion.betweenValue">
  31. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  32. </when>
  33. <when test="criterion.listValue">
  34. and ${criterion.condition}
  35. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  36. #{listItem}
  37. </foreach>
  38. </when>
  39. </choose>
  40. </foreach>
  41. </trim>
  42. </if>
  43. </foreach>
  44. </where>
  45. </sql>
  46. <sql id="Update_By_Example_Where_Clause">
  47. <where>
  48. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  49. <if test="criteria.valid">
  50. <trim prefix="(" prefixOverrides="and" suffix=")">
  51. <foreach collection="criteria.criteria" item="criterion">
  52. <choose>
  53. <when test="criterion.noValue">
  54. and ${criterion.condition}
  55. </when>
  56. <when test="criterion.singleValue">
  57. and ${criterion.condition} #{criterion.value}
  58. </when>
  59. <when test="criterion.betweenValue">
  60. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  61. </when>
  62. <when test="criterion.listValue">
  63. and ${criterion.condition}
  64. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  65. #{listItem}
  66. </foreach>
  67. </when>
  68. </choose>
  69. </foreach>
  70. </trim>
  71. </if>
  72. </foreach>
  73. </where>
  74. </sql>
  75. <sql id="Base_Column_List">
  76. id, DEATIL_ID, BILL_CODE, DEVICE_SN, DETAIL_MEMO, ACTUAL_LEND_DAYS, LATE_FLAG, LATE_DAYS,
  77. LEND_ID, LEND_DETAIL_ID, REPAY_TIME
  78. </sql>
  79. <select id="selectByExample" parameterType="com.mvc.entity.TRepayDetailExample" resultMap="BaseResultMap">
  80. select
  81. <if test="distinct">
  82. distinct
  83. </if>
  84. <include refid="Base_Column_List" />
  85. from t_repay_detail
  86. <if test="_parameter != null">
  87. <include refid="Example_Where_Clause" />
  88. </if>
  89. <if test="orderByClause != null">
  90. order by ${orderByClause}
  91. </if>
  92. </select>
  93. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  94. select
  95. <include refid="Base_Column_List" />
  96. from t_repay_detail
  97. where id = #{id,jdbcType=INTEGER}
  98. </select>
  99. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  100. delete from t_repay_detail
  101. where id = #{id,jdbcType=INTEGER}
  102. </delete>
  103. <delete id="deleteByExample" parameterType="com.mvc.entity.TRepayDetailExample">
  104. delete from t_repay_detail
  105. <if test="_parameter != null">
  106. <include refid="Example_Where_Clause" />
  107. </if>
  108. </delete>
  109. <insert id="insert" parameterType="com.mvc.entity.TRepayDetail">
  110. insert into t_repay_detail (id, DEATIL_ID, BILL_CODE,
  111. DEVICE_SN, DETAIL_MEMO, ACTUAL_LEND_DAYS,
  112. LATE_FLAG, LATE_DAYS, LEND_ID,
  113. LEND_DETAIL_ID, REPAY_TIME)
  114. values (#{id,jdbcType=INTEGER}, #{deatilId,jdbcType=VARCHAR}, #{billCode,jdbcType=VARCHAR},
  115. #{deviceSn,jdbcType=VARCHAR}, #{detailMemo,jdbcType=VARCHAR}, #{actualLendDays,jdbcType=INTEGER},
  116. #{lateFlag,jdbcType=CHAR}, #{lateDays,jdbcType=INTEGER}, #{lendId,jdbcType=VARCHAR},
  117. #{lendDetailId,jdbcType=VARCHAR}, #{repayTime,jdbcType=TIMESTAMP})
  118. </insert>
  119. <insert id="insertSelective" parameterType="com.mvc.entity.TRepayDetail">
  120. insert into t_repay_detail
  121. <trim prefix="(" suffix=")" suffixOverrides=",">
  122. <if test="id != null">
  123. id,
  124. </if>
  125. <if test="deatilId != null">
  126. DEATIL_ID,
  127. </if>
  128. <if test="billCode != null">
  129. BILL_CODE,
  130. </if>
  131. <if test="deviceSn != null">
  132. DEVICE_SN,
  133. </if>
  134. <if test="detailMemo != null">
  135. DETAIL_MEMO,
  136. </if>
  137. <if test="actualLendDays != null">
  138. ACTUAL_LEND_DAYS,
  139. </if>
  140. <if test="lateFlag != null">
  141. LATE_FLAG,
  142. </if>
  143. <if test="lateDays != null">
  144. LATE_DAYS,
  145. </if>
  146. <if test="lendId != null">
  147. LEND_ID,
  148. </if>
  149. <if test="lendDetailId != null">
  150. LEND_DETAIL_ID,
  151. </if>
  152. <if test="repayTime != null">
  153. REPAY_TIME,
  154. </if>
  155. </trim>
  156. <trim prefix="values (" suffix=")" suffixOverrides=",">
  157. <if test="id != null">
  158. #{id,jdbcType=INTEGER},
  159. </if>
  160. <if test="deatilId != null">
  161. #{deatilId,jdbcType=VARCHAR},
  162. </if>
  163. <if test="billCode != null">
  164. #{billCode,jdbcType=VARCHAR},
  165. </if>
  166. <if test="deviceSn != null">
  167. #{deviceSn,jdbcType=VARCHAR},
  168. </if>
  169. <if test="detailMemo != null">
  170. #{detailMemo,jdbcType=VARCHAR},
  171. </if>
  172. <if test="actualLendDays != null">
  173. #{actualLendDays,jdbcType=INTEGER},
  174. </if>
  175. <if test="lateFlag != null">
  176. #{lateFlag,jdbcType=CHAR},
  177. </if>
  178. <if test="lateDays != null">
  179. #{lateDays,jdbcType=INTEGER},
  180. </if>
  181. <if test="lendId != null">
  182. #{lendId,jdbcType=VARCHAR},
  183. </if>
  184. <if test="lendDetailId != null">
  185. #{lendDetailId,jdbcType=VARCHAR},
  186. </if>
  187. <if test="repayTime != null">
  188. #{repayTime,jdbcType=TIMESTAMP},
  189. </if>
  190. </trim>
  191. </insert>
  192. <select id="countByExample" parameterType="com.mvc.entity.TRepayDetailExample" resultType="java.lang.Long">
  193. select count(*) from t_repay_detail
  194. <if test="_parameter != null">
  195. <include refid="Example_Where_Clause" />
  196. </if>
  197. </select>
  198. <update id="updateByExampleSelective" parameterType="map">
  199. update t_repay_detail
  200. <set>
  201. <if test="record.id != null">
  202. id = #{record.id,jdbcType=INTEGER},
  203. </if>
  204. <if test="record.deatilId != null">
  205. DEATIL_ID = #{record.deatilId,jdbcType=VARCHAR},
  206. </if>
  207. <if test="record.billCode != null">
  208. BILL_CODE = #{record.billCode,jdbcType=VARCHAR},
  209. </if>
  210. <if test="record.deviceSn != null">
  211. DEVICE_SN = #{record.deviceSn,jdbcType=VARCHAR},
  212. </if>
  213. <if test="record.detailMemo != null">
  214. DETAIL_MEMO = #{record.detailMemo,jdbcType=VARCHAR},
  215. </if>
  216. <if test="record.actualLendDays != null">
  217. ACTUAL_LEND_DAYS = #{record.actualLendDays,jdbcType=INTEGER},
  218. </if>
  219. <if test="record.lateFlag != null">
  220. LATE_FLAG = #{record.lateFlag,jdbcType=CHAR},
  221. </if>
  222. <if test="record.lateDays != null">
  223. LATE_DAYS = #{record.lateDays,jdbcType=INTEGER},
  224. </if>
  225. <if test="record.lendId != null">
  226. LEND_ID = #{record.lendId,jdbcType=VARCHAR},
  227. </if>
  228. <if test="record.lendDetailId != null">
  229. LEND_DETAIL_ID = #{record.lendDetailId,jdbcType=VARCHAR},
  230. </if>
  231. <if test="record.repayTime != null">
  232. REPAY_TIME = #{record.repayTime,jdbcType=TIMESTAMP},
  233. </if>
  234. </set>
  235. <if test="_parameter != null">
  236. <include refid="Update_By_Example_Where_Clause" />
  237. </if>
  238. </update>
  239. <update id="updateByExample" parameterType="map">
  240. update t_repay_detail
  241. set id = #{record.id,jdbcType=INTEGER},
  242. DEATIL_ID = #{record.deatilId,jdbcType=VARCHAR},
  243. BILL_CODE = #{record.billCode,jdbcType=VARCHAR},
  244. DEVICE_SN = #{record.deviceSn,jdbcType=VARCHAR},
  245. DETAIL_MEMO = #{record.detailMemo,jdbcType=VARCHAR},
  246. ACTUAL_LEND_DAYS = #{record.actualLendDays,jdbcType=INTEGER},
  247. LATE_FLAG = #{record.lateFlag,jdbcType=CHAR},
  248. LATE_DAYS = #{record.lateDays,jdbcType=INTEGER},
  249. LEND_ID = #{record.lendId,jdbcType=VARCHAR},
  250. LEND_DETAIL_ID = #{record.lendDetailId,jdbcType=VARCHAR},
  251. REPAY_TIME = #{record.repayTime,jdbcType=TIMESTAMP}
  252. <if test="_parameter != null">
  253. <include refid="Update_By_Example_Where_Clause" />
  254. </if>
  255. </update>
  256. <update id="updateByPrimaryKeySelective" parameterType="com.mvc.entity.TRepayDetail">
  257. update t_repay_detail
  258. <set>
  259. <if test="deatilId != null">
  260. DEATIL_ID = #{deatilId,jdbcType=VARCHAR},
  261. </if>
  262. <if test="billCode != null">
  263. BILL_CODE = #{billCode,jdbcType=VARCHAR},
  264. </if>
  265. <if test="deviceSn != null">
  266. DEVICE_SN = #{deviceSn,jdbcType=VARCHAR},
  267. </if>
  268. <if test="detailMemo != null">
  269. DETAIL_MEMO = #{detailMemo,jdbcType=VARCHAR},
  270. </if>
  271. <if test="actualLendDays != null">
  272. ACTUAL_LEND_DAYS = #{actualLendDays,jdbcType=INTEGER},
  273. </if>
  274. <if test="lateFlag != null">
  275. LATE_FLAG = #{lateFlag,jdbcType=CHAR},
  276. </if>
  277. <if test="lateDays != null">
  278. LATE_DAYS = #{lateDays,jdbcType=INTEGER},
  279. </if>
  280. <if test="lendId != null">
  281. LEND_ID = #{lendId,jdbcType=VARCHAR},
  282. </if>
  283. <if test="lendDetailId != null">
  284. LEND_DETAIL_ID = #{lendDetailId,jdbcType=VARCHAR},
  285. </if>
  286. <if test="repayTime != null">
  287. REPAY_TIME = #{repayTime,jdbcType=TIMESTAMP},
  288. </if>
  289. </set>
  290. where id = #{id,jdbcType=INTEGER}
  291. </update>
  292. <update id="updateByPrimaryKey" parameterType="com.mvc.entity.TRepayDetail">
  293. update t_repay_detail
  294. set DEATIL_ID = #{deatilId,jdbcType=VARCHAR},
  295. BILL_CODE = #{billCode,jdbcType=VARCHAR},
  296. DEVICE_SN = #{deviceSn,jdbcType=VARCHAR},
  297. DETAIL_MEMO = #{detailMemo,jdbcType=VARCHAR},
  298. ACTUAL_LEND_DAYS = #{actualLendDays,jdbcType=INTEGER},
  299. LATE_FLAG = #{lateFlag,jdbcType=CHAR},
  300. LATE_DAYS = #{lateDays,jdbcType=INTEGER},
  301. LEND_ID = #{lendId,jdbcType=VARCHAR},
  302. LEND_DETAIL_ID = #{lendDetailId,jdbcType=VARCHAR},
  303. REPAY_TIME = #{repayTime,jdbcType=TIMESTAMP}
  304. where id = #{id,jdbcType=INTEGER}
  305. </update>
  306. </mapper>