RmsConsigneeMapper.xml 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  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.steerinfo.dil.mapper.RmsConsigneeMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsConsignee">
  5. <id column="CONSIGNEE_ID" jdbcType="DECIMAL" property="consigneeId"/>
  6. <result column="CONSIGNEE_COMPANY_NAME" jdbcType="VARCHAR" property="consigneeCompanyName"/>
  7. <result column="CONSIGNEE_ABBREVIATION" jdbcType="VARCHAR" property="consigneeAbbreviation"/>
  8. <result column="CONSIGNEE_REGISTERED_ADDRESS" jdbcType="VARCHAR" property="consigneeRegisteredAddress"/>
  9. <result column="CONSIGNEE_RECEIVE_ADDRESS" jdbcType="VARCHAR" property="consigneeReceiveAddress"/>
  10. <result column="CONSIGNEE_REGISTRATION_TIME" jdbcType="TIMESTAMP" property="consigneeRegistrationTime"/>
  11. <result column="CONSIGNEE_CONTACT_NAME" jdbcType="VARCHAR" property="consigneeContactName"/>
  12. <result column="CONSIGNEE_WARRANTY_AMOUNT" jdbcType="DECIMAL" property="consigneeWarrantyAmount"/>
  13. <result column="CONSIGNEE_WARRANTY_WEIGHT" jdbcType="VARCHAR" property="consigneeWarrantyWeight"/>
  14. <result column="CONSIGNEE_CONTACT_TEL" jdbcType="CHAR" property="consigneeContactTel"/>
  15. <result column="CONSIGNEE_EXCHANGE_DELIVERY" jdbcType="DECIMAL" property="consigneeExchangeDelivery"/>
  16. <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
  17. <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
  18. <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername"/>
  19. <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
  20. <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark"/>
  21. <result column="DELETED" jdbcType="DECIMAL" property="deleted"/>
  22. <result column="EAS_CONSIGNEE_ID" jdbcType="DECIMAL" property="easConsigneeId"/>
  23. </resultMap>
  24. <sql id="columns">
  25. CONSIGNEE_ID, CONSIGNEE_COMPANY_NAME, CONSIGNEE_ABBREVIATION, CONSIGNEE_REGISTERED_ADDRESS,
  26. CONSIGNEE_RECEIVE_ADDRESS, CONSIGNEE_REGISTRATION_TIME, CONSIGNEE_CONTACT_NAME, CONSIGNEE_WARRANTY_AMOUNT,
  27. CONSIGNEE_WARRANTY_WEIGHT, CONSIGNEE_CONTACT_TEL, CONSIGNEE_EXCHANGE_DELIVERY, INSERT_USERNAME,
  28. INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, EAS_CONSIGNEE_ID
  29. </sql>
  30. <sql id="columns_alias">
  31. t.CONSIGNEE_ID, t.CONSIGNEE_COMPANY_NAME, t.CONSIGNEE_ABBREVIATION, t.CONSIGNEE_REGISTERED_ADDRESS,
  32. t.CONSIGNEE_RECEIVE_ADDRESS, t.CONSIGNEE_REGISTRATION_TIME, t.CONSIGNEE_CONTACT_NAME,
  33. t.CONSIGNEE_WARRANTY_AMOUNT, t.CONSIGNEE_WARRANTY_WEIGHT, t.CONSIGNEE_CONTACT_TEL,
  34. t.CONSIGNEE_EXCHANGE_DELIVERY, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
  35. t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.EAS_CONSIGNEE_ID
  36. </sql>
  37. <sql id="select">
  38. SELECT
  39. <include refid="columns"/>
  40. FROM RMS_CONSIGNEE
  41. </sql>
  42. <sql id="select_alias">
  43. SELECT
  44. <include refid="columns_alias"/>
  45. FROM RMS_CONSIGNEE t
  46. </sql>
  47. <sql id="where">
  48. <where>
  49. <if test="consigneeId != null">
  50. and CONSIGNEE_ID = #{consigneeId}
  51. </if>
  52. <if test="consigneeCompanyName != null and consigneeCompanyName != ''">
  53. and CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName}
  54. </if>
  55. <if test="consigneeAbbreviation != null and consigneeAbbreviation != ''">
  56. and CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation}
  57. </if>
  58. <if test="consigneeRegisteredAddress != null and consigneeRegisteredAddress != ''">
  59. and CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress}
  60. </if>
  61. <if test="consigneeReceiveAddress != null and consigneeReceiveAddress != ''">
  62. and CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress}
  63. </if>
  64. <if test="consigneeRegistrationTime != null">
  65. and TO_CHAR(CONSIGNEE_REGISTRATION_TIME,'yyyy-MM-dd') = #{consigneeRegistrationTime}
  66. </if>
  67. <if test="consigneeContactName != null and consigneeContactName != ''">
  68. and CONSIGNEE_CONTACT_NAME = #{consigneeContactName}
  69. </if>
  70. <if test="consigneeWarrantyAmount != null">
  71. and CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount}
  72. </if>
  73. <if test="consigneeWarrantyWeight != null and consigneeWarrantyWeight != ''">
  74. and CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight}
  75. </if>
  76. <if test="consigneeContactTel != null">
  77. and CONSIGNEE_CONTACT_TEL = #{consigneeContactTel}
  78. </if>
  79. <if test="consigneeExchangeDelivery != null">
  80. and CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery}
  81. </if>
  82. <if test="insertUsername != null and insertUsername != ''">
  83. and INSERT_USERNAME = #{insertUsername}
  84. </if>
  85. <if test="insertTime != null">
  86. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  87. </if>
  88. <if test="updateUsername != null and updateUsername != ''">
  89. and UPDATE_USERNAME = #{updateUsername}
  90. </if>
  91. <if test="updateTime != null">
  92. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  93. </if>
  94. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  95. and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  96. </if>
  97. <if test="deleted != null">
  98. and DELETED = #{deleted}
  99. </if>
  100. <if test="easConsigneeId != null">
  101. and EAS_CONSIGNEE_ID = #{easConsigneeId}
  102. </if>
  103. </where>
  104. </sql>
  105. <sql id="whereLike">
  106. <where>
  107. <if test="consigneeId != null">
  108. and CONSIGNEE_ID = #{consigneeId}
  109. </if>
  110. <if test="consigneeCompanyName != null and consigneeCompanyName != ''">
  111. and CONSIGNEE_COMPANY_NAME LIKE '%${consigneeCompanyName}%'
  112. </if>
  113. <if test="consigneeAbbreviation != null and consigneeAbbreviation != ''">
  114. and CONSIGNEE_ABBREVIATION LIKE '%${consigneeAbbreviation}%'
  115. </if>
  116. <if test="consigneeRegisteredAddress != null and consigneeRegisteredAddress != ''">
  117. and CONSIGNEE_REGISTERED_ADDRESS LIKE '%${consigneeRegisteredAddress}%'
  118. </if>
  119. <if test="consigneeReceiveAddress != null and consigneeReceiveAddress != ''">
  120. and CONSIGNEE_RECEIVE_ADDRESS LIKE '%${consigneeReceiveAddress}%'
  121. </if>
  122. <if test="consigneeRegistrationTime != null">
  123. and TO_CHAR(CONSIGNEE_REGISTRATION_TIME,'yyyy-MM-dd') = #{consigneeRegistrationTime}
  124. </if>
  125. <if test="consigneeContactName != null and consigneeContactName != ''">
  126. and CONSIGNEE_CONTACT_NAME LIKE '%${consigneeContactName}%'
  127. </if>
  128. <if test="consigneeWarrantyAmount != null">
  129. and CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount}
  130. </if>
  131. <if test="consigneeWarrantyWeight != null and consigneeWarrantyWeight != ''">
  132. and CONSIGNEE_WARRANTY_WEIGHT LIKE '%${consigneeWarrantyWeight}%'
  133. </if>
  134. <if test="consigneeContactTel != null">
  135. and CONSIGNEE_CONTACT_TEL = #{consigneeContactTel}
  136. </if>
  137. <if test="consigneeExchangeDelivery != null">
  138. and CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery}
  139. </if>
  140. <if test="insertUsername != null and insertUsername != ''">
  141. and INSERT_USERNAME LIKE '%${insertUsername}%'
  142. </if>
  143. <if test="insertTime != null">
  144. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  145. </if>
  146. <if test="updateUsername != null and updateUsername != ''">
  147. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  148. </if>
  149. <if test="updateTime != null">
  150. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  151. </if>
  152. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  153. and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
  154. </if>
  155. <if test="deleted != null">
  156. and DELETED = #{deleted}
  157. </if>
  158. <if test="easConsigneeId != null">
  159. and EAS_CONSIGNEE_ID = #{easConsigneeId}
  160. </if>
  161. </where>
  162. </sql>
  163. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  164. delete
  165. from RMS_CONSIGNEE
  166. where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
  167. </delete>
  168. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  169. delete from RMS_CONSIGNEE
  170. where 1!=1
  171. <if test="consigneeCompanyName != null and consigneeCompanyName != ''">
  172. or CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName}
  173. </if>
  174. <if test="consigneeAbbreviation != null and consigneeAbbreviation != ''">
  175. or CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation}
  176. </if>
  177. <if test="consigneeRegisteredAddress != null and consigneeRegisteredAddress != ''">
  178. or CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress}
  179. </if>
  180. <if test="consigneeReceiveAddress != null and consigneeReceiveAddress != ''">
  181. or CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress}
  182. </if>
  183. <if test="consigneeRegistrationTime != null">
  184. or TO_CHAR(CONSIGNEE_REGISTRATION_TIME,'yyyy-MM-dd') = '#{consigneeRegistrationTime}'
  185. </if>
  186. <if test="consigneeContactName != null and consigneeContactName != ''">
  187. or CONSIGNEE_CONTACT_NAME = #{consigneeContactName}
  188. </if>
  189. <if test="consigneeWarrantyAmount != null">
  190. or CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount}
  191. </if>
  192. <if test="consigneeWarrantyWeight != null and consigneeWarrantyWeight != ''">
  193. or CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight}
  194. </if>
  195. <if test="consigneeContactTel != null">
  196. or CONSIGNEE_CONTACT_TEL = #{consigneeContactTel}
  197. </if>
  198. <if test="consigneeExchangeDelivery != null">
  199. or CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery}
  200. </if>
  201. <if test="insertUsername != null and insertUsername != ''">
  202. or INSERT_USERNAME = #{insertUsername}
  203. </if>
  204. <if test="insertTime != null">
  205. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  206. </if>
  207. <if test="updateUsername != null and updateUsername != ''">
  208. or UPDATE_USERNAME = #{updateUsername}
  209. </if>
  210. <if test="updateTime != null">
  211. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  212. </if>
  213. <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
  214. or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
  215. </if>
  216. <if test="deleted != null">
  217. or DELETED = #{deleted}
  218. </if>
  219. <if test="easConsigneeId != null">
  220. or EAS_CONSIGNEE_ID = #{easConsigneeId}
  221. </if>
  222. </delete>
  223. <insert id="insert" parameterType="com.steerinfo.dil.model.RmsConsignee">
  224. insert into RMS_CONSIGNEE (CONSIGNEE_ID, CONSIGNEE_COMPANY_NAME,
  225. CONSIGNEE_ABBREVIATION, CONSIGNEE_REGISTERED_ADDRESS,
  226. CONSIGNEE_RECEIVE_ADDRESS, CONSIGNEE_REGISTRATION_TIME,
  227. CONSIGNEE_CONTACT_NAME, CONSIGNEE_WARRANTY_AMOUNT,
  228. CONSIGNEE_WARRANTY_WEIGHT, CONSIGNEE_CONTACT_TEL,
  229. CONSIGNEE_EXCHANGE_DELIVERY, INSERT_USERNAME,
  230. INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
  231. INSERT_UPDATE_REMARK, DELETED, EAS_CONSIGNEE_ID)
  232. values (#{consigneeId,jdbcType=DECIMAL}, #{consigneeCompanyName,jdbcType=VARCHAR},
  233. #{consigneeAbbreviation,jdbcType=VARCHAR}, #{consigneeRegisteredAddress,jdbcType=VARCHAR},
  234. #{consigneeReceiveAddress,jdbcType=VARCHAR}, #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
  235. #{consigneeContactName,jdbcType=VARCHAR}, #{consigneeWarrantyAmount,jdbcType=DECIMAL},
  236. #{consigneeWarrantyWeight,jdbcType=VARCHAR}, #{consigneeContactTel,jdbcType=CHAR},
  237. #{consigneeExchangeDelivery,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR},
  238. #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
  239. #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{easConsigneeId,jdbcType=DECIMAL})
  240. </insert>
  241. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsConsignee">
  242. insert into RMS_CONSIGNEE
  243. <trim prefix="(" suffix=")" suffixOverrides=",">
  244. <if test="consigneeId != null">
  245. CONSIGNEE_ID,
  246. </if>
  247. <if test="consigneeCompanyName != null">
  248. CONSIGNEE_COMPANY_NAME,
  249. </if>
  250. <if test="consigneeAbbreviation != null">
  251. CONSIGNEE_ABBREVIATION,
  252. </if>
  253. <if test="consigneeRegisteredAddress != null">
  254. CONSIGNEE_REGISTERED_ADDRESS,
  255. </if>
  256. <if test="consigneeReceiveAddress != null">
  257. CONSIGNEE_RECEIVE_ADDRESS,
  258. </if>
  259. <if test="consigneeRegistrationTime != null">
  260. CONSIGNEE_REGISTRATION_TIME,
  261. </if>
  262. <if test="consigneeContactName != null">
  263. CONSIGNEE_CONTACT_NAME,
  264. </if>
  265. <if test="consigneeWarrantyAmount != null">
  266. CONSIGNEE_WARRANTY_AMOUNT,
  267. </if>
  268. <if test="consigneeWarrantyWeight != null">
  269. CONSIGNEE_WARRANTY_WEIGHT,
  270. </if>
  271. <if test="consigneeContactTel != null">
  272. CONSIGNEE_CONTACT_TEL,
  273. </if>
  274. <if test="consigneeExchangeDelivery != null">
  275. CONSIGNEE_EXCHANGE_DELIVERY,
  276. </if>
  277. <if test="insertUsername != null">
  278. INSERT_USERNAME,
  279. </if>
  280. <if test="insertTime != null">
  281. INSERT_TIME,
  282. </if>
  283. <if test="updateUsername != null">
  284. UPDATE_USERNAME,
  285. </if>
  286. <if test="updateTime != null">
  287. UPDATE_TIME,
  288. </if>
  289. <if test="insertUpdateRemark != null">
  290. INSERT_UPDATE_REMARK,
  291. </if>
  292. <if test="deleted != null">
  293. DELETED,
  294. </if>
  295. <if test="easConsigneeId != null">
  296. EAS_CONSIGNEE_ID,
  297. </if>
  298. </trim>
  299. <trim prefix="values (" suffix=")" suffixOverrides=",">
  300. <if test="consigneeId != null">
  301. #{consigneeId,jdbcType=DECIMAL},
  302. </if>
  303. <if test="consigneeCompanyName != null">
  304. #{consigneeCompanyName,jdbcType=VARCHAR},
  305. </if>
  306. <if test="consigneeAbbreviation != null">
  307. #{consigneeAbbreviation,jdbcType=VARCHAR},
  308. </if>
  309. <if test="consigneeRegisteredAddress != null">
  310. #{consigneeRegisteredAddress,jdbcType=VARCHAR},
  311. </if>
  312. <if test="consigneeReceiveAddress != null">
  313. #{consigneeReceiveAddress,jdbcType=VARCHAR},
  314. </if>
  315. <if test="consigneeRegistrationTime != null">
  316. #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
  317. </if>
  318. <if test="consigneeContactName != null">
  319. #{consigneeContactName,jdbcType=VARCHAR},
  320. </if>
  321. <if test="consigneeWarrantyAmount != null">
  322. #{consigneeWarrantyAmount,jdbcType=DECIMAL},
  323. </if>
  324. <if test="consigneeWarrantyWeight != null">
  325. #{consigneeWarrantyWeight,jdbcType=VARCHAR},
  326. </if>
  327. <if test="consigneeContactTel != null">
  328. #{consigneeContactTel,jdbcType=CHAR},
  329. </if>
  330. <if test="consigneeExchangeDelivery != null">
  331. #{consigneeExchangeDelivery,jdbcType=DECIMAL},
  332. </if>
  333. <if test="insertUsername != null">
  334. #{insertUsername,jdbcType=VARCHAR},
  335. </if>
  336. <if test="insertTime != null">
  337. #{insertTime,jdbcType=TIMESTAMP},
  338. </if>
  339. <if test="updateUsername != null">
  340. #{updateUsername,jdbcType=VARCHAR},
  341. </if>
  342. <if test="updateTime != null">
  343. #{updateTime,jdbcType=TIMESTAMP},
  344. </if>
  345. <if test="insertUpdateRemark != null">
  346. #{insertUpdateRemark,jdbcType=VARCHAR},
  347. </if>
  348. <if test="deleted != null">
  349. #{deleted,jdbcType=DECIMAL},
  350. </if>
  351. <if test="easConsigneeId != null">
  352. #{easConsigneeId,jdbcType=DECIMAL},
  353. </if>
  354. </trim>
  355. </insert>
  356. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsConsignee">
  357. update RMS_CONSIGNEE
  358. set CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName,jdbcType=VARCHAR},
  359. CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation,jdbcType=VARCHAR},
  360. CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress,jdbcType=VARCHAR},
  361. CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress,jdbcType=VARCHAR},
  362. CONSIGNEE_REGISTRATION_TIME = #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
  363. CONSIGNEE_CONTACT_NAME = #{consigneeContactName,jdbcType=VARCHAR},
  364. CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount,jdbcType=DECIMAL},
  365. CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight,jdbcType=VARCHAR},
  366. CONSIGNEE_CONTACT_TEL = #{consigneeContactTel,jdbcType=CHAR},
  367. CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery,jdbcType=DECIMAL},
  368. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  369. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  370. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  371. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  372. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  373. DELETED = #{deleted,jdbcType=DECIMAL},
  374. EAS_CONSIGNEE_ID = #{easConsigneeId,jdbcType=DECIMAL}
  375. where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
  376. </update>
  377. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsConsignee">
  378. update RMS_CONSIGNEE
  379. <set>
  380. <if test="consigneeCompanyName != null">
  381. CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName,jdbcType=VARCHAR},
  382. </if>
  383. <if test="consigneeAbbreviation != null">
  384. CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation,jdbcType=VARCHAR},
  385. </if>
  386. <if test="consigneeRegisteredAddress != null">
  387. CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress,jdbcType=VARCHAR},
  388. </if>
  389. <if test="consigneeReceiveAddress != null">
  390. CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress,jdbcType=VARCHAR},
  391. </if>
  392. <if test="consigneeRegistrationTime != null">
  393. CONSIGNEE_REGISTRATION_TIME = #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
  394. </if>
  395. <if test="consigneeContactName != null">
  396. CONSIGNEE_CONTACT_NAME = #{consigneeContactName,jdbcType=VARCHAR},
  397. </if>
  398. <if test="consigneeWarrantyAmount != null">
  399. CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount,jdbcType=DECIMAL},
  400. </if>
  401. <if test="consigneeWarrantyWeight != null">
  402. CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight,jdbcType=VARCHAR},
  403. </if>
  404. <if test="consigneeContactTel != null">
  405. CONSIGNEE_CONTACT_TEL = #{consigneeContactTel,jdbcType=CHAR},
  406. </if>
  407. <if test="consigneeExchangeDelivery != null">
  408. CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery,jdbcType=DECIMAL},
  409. </if>
  410. <if test="insertUsername != null">
  411. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  412. </if>
  413. <if test="insertTime != null">
  414. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  415. </if>
  416. <if test="updateUsername != null">
  417. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  418. </if>
  419. <if test="updateTime != null">
  420. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  421. </if>
  422. <if test="insertUpdateRemark != null">
  423. INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
  424. </if>
  425. <if test="deleted != null">
  426. DELETED = #{deleted,jdbcType=DECIMAL},
  427. </if>
  428. <if test="easConsigneeId != null">
  429. EAS_CONSIGNEE_ID = #{easConsigneeId,jdbcType=DECIMAL},
  430. </if>
  431. </set>
  432. where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
  433. </update>
  434. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  435. <include refid="select"/>
  436. where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
  437. </select>
  438. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  439. <include refid="select"/>
  440. <include refid="where"/>
  441. </select>
  442. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  443. <include refid="select"/>
  444. <include refid="whereLike"/>
  445. </select>
  446. <insert id="batchInsert" parameterType="java.util.List">
  447. insert into RMS_CONSIGNEE
  448. (CONSIGNEE_ID,
  449. CONSIGNEE_COMPANY_NAME, CONSIGNEE_ABBREVIATION,
  450. CONSIGNEE_REGISTERED_ADDRESS, CONSIGNEE_RECEIVE_ADDRESS,
  451. CONSIGNEE_REGISTRATION_TIME, CONSIGNEE_CONTACT_NAME,
  452. CONSIGNEE_WARRANTY_AMOUNT, CONSIGNEE_WARRANTY_WEIGHT,
  453. CONSIGNEE_CONTACT_TEL, CONSIGNEE_EXCHANGE_DELIVERY,
  454. INSERT_USERNAME, INSERT_TIME,
  455. UPDATE_USERNAME, UPDATE_TIME,
  456. INSERT_UPDATE_REMARK, DELETED,
  457. EAS_CONSIGNEE_ID)
  458. ( <foreach collection="list" item="item" separator="union all">
  459. select
  460. #{item.consigneeId,jdbcType=DECIMAL},
  461. #{item.consigneeCompanyName,jdbcType=VARCHAR}, #{item.consigneeAbbreviation,jdbcType=VARCHAR},
  462. #{item.consigneeRegisteredAddress,jdbcType=VARCHAR}, #{item.consigneeReceiveAddress,jdbcType=VARCHAR},
  463. #{item.consigneeRegistrationTime,jdbcType=TIMESTAMP}, #{item.consigneeContactName,jdbcType=VARCHAR},
  464. #{item.consigneeWarrantyAmount,jdbcType=DECIMAL}, #{item.consigneeWarrantyWeight,jdbcType=VARCHAR},
  465. #{item.consigneeContactTel,jdbcType=CHAR}, #{item.consigneeExchangeDelivery,jdbcType=DECIMAL},
  466. #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
  467. #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
  468. #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL},
  469. #{item.easConsigneeId,jdbcType=DECIMAL} from dual
  470. </foreach> )
  471. </insert>
  472. <update id="batchUpdate" parameterType="java.util.List">
  473. update RMS_CONSIGNEE
  474. set
  475. CONSIGNEE_ID=
  476. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  477. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeId,jdbcType=DECIMAL}
  478. </foreach>
  479. ,CONSIGNEE_COMPANY_NAME=
  480. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  481. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeCompanyName,jdbcType=VARCHAR}
  482. </foreach>
  483. ,CONSIGNEE_ABBREVIATION=
  484. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  485. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeAbbreviation,jdbcType=VARCHAR}
  486. </foreach>
  487. ,CONSIGNEE_REGISTERED_ADDRESS=
  488. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  489. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeRegisteredAddress,jdbcType=VARCHAR}
  490. </foreach>
  491. ,CONSIGNEE_RECEIVE_ADDRESS=
  492. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  493. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeReceiveAddress,jdbcType=VARCHAR}
  494. </foreach>
  495. ,CONSIGNEE_REGISTRATION_TIME=
  496. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  497. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeRegistrationTime,jdbcType=TIMESTAMP}
  498. </foreach>
  499. ,CONSIGNEE_CONTACT_NAME=
  500. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  501. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeContactName,jdbcType=VARCHAR}
  502. </foreach>
  503. ,CONSIGNEE_WARRANTY_AMOUNT=
  504. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  505. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeWarrantyAmount,jdbcType=DECIMAL}
  506. </foreach>
  507. ,CONSIGNEE_WARRANTY_WEIGHT=
  508. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  509. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeWarrantyWeight,jdbcType=VARCHAR}
  510. </foreach>
  511. ,CONSIGNEE_CONTACT_TEL=
  512. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  513. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeContactTel,jdbcType=CHAR}
  514. </foreach>
  515. ,CONSIGNEE_EXCHANGE_DELIVERY=
  516. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  517. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeExchangeDelivery,jdbcType=DECIMAL}
  518. </foreach>
  519. ,INSERT_USERNAME=
  520. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  521. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  522. </foreach>
  523. ,INSERT_TIME=
  524. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  525. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  526. </foreach>
  527. ,UPDATE_USERNAME=
  528. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  529. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  530. </foreach>
  531. ,UPDATE_TIME=
  532. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  533. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  534. </foreach>
  535. ,INSERT_UPDATE_REMARK=
  536. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  537. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
  538. </foreach>
  539. ,DELETED=
  540. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  541. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
  542. </foreach>
  543. ,EAS_CONSIGNEE_ID=
  544. <foreach collection="list" item="item" index="index" separator=" " open="case CONSIGNEE_ID" close="end">
  545. when #{item.consigneeId,jdbcType=DECIMAL} then #{item.easConsigneeId,jdbcType=DECIMAL}
  546. </foreach>
  547. where CONSIGNEE_ID in
  548. <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
  549. #{item.consigneeId,jdbcType=DECIMAL}
  550. </foreach>
  551. </update>
  552. <delete id="batchDelete" parameterType="java.util.List">
  553. delete from RMS_CONSIGNEE
  554. where CONSIGNEE_ID in
  555. <foreach collection="list" item="id" open="(" close=")" separator=",">
  556. #{id}
  557. </foreach>
  558. </delete>
  559. <!-- 友情提示!!!-->
  560. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  561. </mapper>