DepotHeadMapper.xml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  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.jsh.erp.datasource.mappers.DepotHeadMapper">
  4. <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.DepotHead">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="type" jdbcType="VARCHAR" property="type" />
  7. <result column="sub_type" jdbcType="VARCHAR" property="subType" />
  8. <result column="default_number" jdbcType="VARCHAR" property="defaultNumber" />
  9. <result column="number" jdbcType="VARCHAR" property="number" />
  10. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  11. <result column="oper_time" jdbcType="TIMESTAMP" property="operTime" />
  12. <result column="organ_id" jdbcType="BIGINT" property="organId" />
  13. <result column="creator" jdbcType="BIGINT" property="creator" />
  14. <result column="account_id" jdbcType="BIGINT" property="accountId" />
  15. <result column="change_amount" jdbcType="DECIMAL" property="changeAmount" />
  16. <result column="back_amount" jdbcType="DECIMAL" property="backAmount" />
  17. <result column="total_price" jdbcType="DECIMAL" property="totalPrice" />
  18. <result column="pay_type" jdbcType="VARCHAR" property="payType" />
  19. <result column="bill_type" jdbcType="VARCHAR" property="billType" />
  20. <result column="remark" jdbcType="VARCHAR" property="remark" />
  21. <result column="file_name" jdbcType="VARCHAR" property="fileName" />
  22. <result column="sales_man" jdbcType="VARCHAR" property="salesMan" />
  23. <result column="account_id_list" jdbcType="VARCHAR" property="accountIdList" />
  24. <result column="account_money_list" jdbcType="VARCHAR" property="accountMoneyList" />
  25. <result column="discount" jdbcType="DECIMAL" property="discount" />
  26. <result column="discount_money" jdbcType="DECIMAL" property="discountMoney" />
  27. <result column="discount_last_money" jdbcType="DECIMAL" property="discountLastMoney" />
  28. <result column="other_money" jdbcType="DECIMAL" property="otherMoney" />
  29. <result column="deposit" jdbcType="DECIMAL" property="deposit" />
  30. <result column="status" jdbcType="VARCHAR" property="status" />
  31. <result column="purchase_status" jdbcType="VARCHAR" property="purchaseStatus" />
  32. <result column="source" jdbcType="VARCHAR" property="source" />
  33. <result column="link_number" jdbcType="VARCHAR" property="linkNumber" />
  34. <result column="link_apply" jdbcType="VARCHAR" property="linkApply" />
  35. <result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
  36. <result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
  37. <result column="voucher_picture" jdbcType="VARCHAR" property="voucherPicture" />
  38. </resultMap>
  39. <sql id="Example_Where_Clause">
  40. <where>
  41. <foreach collection="oredCriteria" item="criteria" separator="or">
  42. <if test="criteria.valid">
  43. <trim prefix="(" prefixOverrides="and" suffix=")">
  44. <foreach collection="criteria.criteria" item="criterion">
  45. <choose>
  46. <when test="criterion.noValue">
  47. and ${criterion.condition}
  48. </when>
  49. <when test="criterion.singleValue">
  50. and ${criterion.condition} #{criterion.value}
  51. </when>
  52. <when test="criterion.betweenValue">
  53. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  54. </when>
  55. <when test="criterion.listValue">
  56. and ${criterion.condition}
  57. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  58. #{listItem}
  59. </foreach>
  60. </when>
  61. </choose>
  62. </foreach>
  63. </trim>
  64. </if>
  65. </foreach>
  66. </where>
  67. </sql>
  68. <sql id="Update_By_Example_Where_Clause">
  69. <where>
  70. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  71. <if test="criteria.valid">
  72. <trim prefix="(" prefixOverrides="and" suffix=")">
  73. <foreach collection="criteria.criteria" item="criterion">
  74. <choose>
  75. <when test="criterion.noValue">
  76. and ${criterion.condition}
  77. </when>
  78. <when test="criterion.singleValue">
  79. and ${criterion.condition} #{criterion.value}
  80. </when>
  81. <when test="criterion.betweenValue">
  82. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  83. </when>
  84. <when test="criterion.listValue">
  85. and ${criterion.condition}
  86. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  87. #{listItem}
  88. </foreach>
  89. </when>
  90. </choose>
  91. </foreach>
  92. </trim>
  93. </if>
  94. </foreach>
  95. </where>
  96. </sql>
  97. <sql id="Base_Column_List">
  98. id, type, sub_type, default_number, number, create_time, oper_time, organ_id, creator,
  99. account_id, change_amount, back_amount, total_price, pay_type, bill_type, remark,
  100. file_name, sales_man, account_id_list, account_money_list, discount, discount_money,
  101. discount_last_money, other_money, deposit, status, purchase_status, source, link_number,
  102. link_apply, tenant_id, delete_flag
  103. </sql>
  104. <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="BaseResultMap">
  105. select
  106. <if test="distinct">
  107. distinct
  108. </if>
  109. <include refid="Base_Column_List" />
  110. from jsh_depot_head
  111. <if test="_parameter != null">
  112. <include refid="Example_Where_Clause" />
  113. </if>
  114. <if test="orderByClause != null">
  115. order by ${orderByClause}
  116. </if>
  117. </select>
  118. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  119. select
  120. <include refid="Base_Column_List" />
  121. from jsh_depot_head
  122. where id = #{id,jdbcType=BIGINT}
  123. </select>
  124. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  125. delete from jsh_depot_head
  126. where id = #{id,jdbcType=BIGINT}
  127. </delete>
  128. <delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample">
  129. delete from jsh_depot_head
  130. <if test="_parameter != null">
  131. <include refid="Example_Where_Clause" />
  132. </if>
  133. </delete>
  134. <insert id="insert" parameterType="com.jsh.erp.datasource.entities.DepotHead">
  135. insert into jsh_depot_head (id, type, sub_type,
  136. default_number, number, create_time,
  137. oper_time, organ_id, creator,
  138. account_id, change_amount, back_amount,
  139. total_price, pay_type, bill_type,
  140. remark, file_name, sales_man,
  141. account_id_list, account_money_list, discount,
  142. discount_money, discount_last_money, other_money,
  143. deposit, status, purchase_status,
  144. source, link_number, link_apply,
  145. tenant_id, delete_flag)
  146. values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subType,jdbcType=VARCHAR},
  147. #{defaultNumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
  148. #{operTime,jdbcType=TIMESTAMP}, #{organId,jdbcType=BIGINT}, #{creator,jdbcType=BIGINT},
  149. #{accountId,jdbcType=BIGINT}, #{changeAmount,jdbcType=DECIMAL}, #{backAmount,jdbcType=DECIMAL},
  150. #{totalPrice,jdbcType=DECIMAL}, #{payType,jdbcType=VARCHAR}, #{billType,jdbcType=VARCHAR},
  151. #{remark,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR}, #{salesMan,jdbcType=VARCHAR},
  152. #{accountIdList,jdbcType=VARCHAR}, #{accountMoneyList,jdbcType=VARCHAR}, #{discount,jdbcType=DECIMAL},
  153. #{discountMoney,jdbcType=DECIMAL}, #{discountLastMoney,jdbcType=DECIMAL}, #{otherMoney,jdbcType=DECIMAL},
  154. #{deposit,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR}, #{purchaseStatus,jdbcType=VARCHAR},
  155. #{source,jdbcType=VARCHAR}, #{linkNumber,jdbcType=VARCHAR}, #{linkApply,jdbcType=VARCHAR},
  156. #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
  157. </insert>
  158. <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotHead">
  159. insert into jsh_depot_head
  160. <trim prefix="(" suffix=")" suffixOverrides=",">
  161. <if test="id != null">
  162. id,
  163. </if>
  164. <if test="type != null">
  165. type,
  166. </if>
  167. <if test="subType != null">
  168. sub_type,
  169. </if>
  170. <if test="defaultNumber != null">
  171. default_number,
  172. </if>
  173. <if test="number != null">
  174. number,
  175. </if>
  176. <if test="createTime != null">
  177. create_time,
  178. </if>
  179. <if test="operTime != null">
  180. oper_time,
  181. </if>
  182. <if test="organId != null">
  183. organ_id,
  184. </if>
  185. <if test="creator != null">
  186. creator,
  187. </if>
  188. <if test="accountId != null">
  189. account_id,
  190. </if>
  191. <if test="changeAmount != null">
  192. change_amount,
  193. </if>
  194. <if test="backAmount != null">
  195. back_amount,
  196. </if>
  197. <if test="totalPrice != null">
  198. total_price,
  199. </if>
  200. <if test="payType != null">
  201. pay_type,
  202. </if>
  203. <if test="billType != null">
  204. bill_type,
  205. </if>
  206. <if test="remark != null">
  207. remark,
  208. </if>
  209. <if test="fileName != null">
  210. file_name,
  211. </if>
  212. <if test="salesMan != null">
  213. sales_man,
  214. </if>
  215. <if test="accountIdList != null">
  216. account_id_list,
  217. </if>
  218. <if test="accountMoneyList != null">
  219. account_money_list,
  220. </if>
  221. <if test="discount != null">
  222. discount,
  223. </if>
  224. <if test="discountMoney != null">
  225. discount_money,
  226. </if>
  227. <if test="discountLastMoney != null">
  228. discount_last_money,
  229. </if>
  230. <if test="otherMoney != null">
  231. other_money,
  232. </if>
  233. <if test="deposit != null">
  234. deposit,
  235. </if>
  236. <if test="status != null">
  237. status,
  238. </if>
  239. <if test="purchaseStatus != null">
  240. purchase_status,
  241. </if>
  242. <if test="source != null">
  243. source,
  244. </if>
  245. <if test="linkNumber != null">
  246. link_number,
  247. </if>
  248. <if test="linkApply != null">
  249. link_apply,
  250. </if>
  251. <if test="tenantId != null">
  252. tenant_id,
  253. </if>
  254. <if test="deleteFlag != null">
  255. delete_flag,
  256. </if>
  257. <if test="voucherPicture != null">
  258. voucher_picture,
  259. </if>
  260. <if test="qrcodeUrl != null">
  261. qrcode_url,
  262. </if>
  263. <if test="goodsQuantity != null">
  264. goods_quantity,
  265. </if>
  266. <if test="goodsTypeCount != null">
  267. goods_type_count,
  268. </if>
  269. </trim>
  270. <trim prefix="values (" suffix=")" suffixOverrides=",">
  271. <if test="id != null">
  272. #{id,jdbcType=BIGINT},
  273. </if>
  274. <if test="type != null">
  275. #{type,jdbcType=VARCHAR},
  276. </if>
  277. <if test="subType != null">
  278. #{subType,jdbcType=VARCHAR},
  279. </if>
  280. <if test="defaultNumber != null">
  281. #{defaultNumber,jdbcType=VARCHAR},
  282. </if>
  283. <if test="number != null">
  284. #{number,jdbcType=VARCHAR},
  285. </if>
  286. <if test="createTime != null">
  287. #{createTime,jdbcType=TIMESTAMP},
  288. </if>
  289. <if test="operTime != null">
  290. #{operTime,jdbcType=TIMESTAMP},
  291. </if>
  292. <if test="organId != null">
  293. #{organId,jdbcType=BIGINT},
  294. </if>
  295. <if test="creator != null">
  296. #{creator,jdbcType=BIGINT},
  297. </if>
  298. <if test="accountId != null">
  299. #{accountId,jdbcType=BIGINT},
  300. </if>
  301. <if test="changeAmount != null">
  302. #{changeAmount,jdbcType=DECIMAL},
  303. </if>
  304. <if test="backAmount != null">
  305. #{backAmount,jdbcType=DECIMAL},
  306. </if>
  307. <if test="totalPrice != null">
  308. #{totalPrice,jdbcType=DECIMAL},
  309. </if>
  310. <if test="payType != null">
  311. #{payType,jdbcType=VARCHAR},
  312. </if>
  313. <if test="billType != null">
  314. #{billType,jdbcType=VARCHAR},
  315. </if>
  316. <if test="remark != null">
  317. #{remark,jdbcType=VARCHAR},
  318. </if>
  319. <if test="fileName != null">
  320. #{fileName,jdbcType=VARCHAR},
  321. </if>
  322. <if test="salesMan != null">
  323. #{salesMan,jdbcType=VARCHAR},
  324. </if>
  325. <if test="accountIdList != null">
  326. #{accountIdList,jdbcType=VARCHAR},
  327. </if>
  328. <if test="accountMoneyList != null">
  329. #{accountMoneyList,jdbcType=VARCHAR},
  330. </if>
  331. <if test="discount != null">
  332. #{discount,jdbcType=DECIMAL},
  333. </if>
  334. <if test="discountMoney != null">
  335. #{discountMoney,jdbcType=DECIMAL},
  336. </if>
  337. <if test="discountLastMoney != null">
  338. #{discountLastMoney,jdbcType=DECIMAL},
  339. </if>
  340. <if test="otherMoney != null">
  341. #{otherMoney,jdbcType=DECIMAL},
  342. </if>
  343. <if test="deposit != null">
  344. #{deposit,jdbcType=DECIMAL},
  345. </if>
  346. <if test="status != null">
  347. #{status,jdbcType=VARCHAR},
  348. </if>
  349. <if test="purchaseStatus != null">
  350. #{purchaseStatus,jdbcType=VARCHAR},
  351. </if>
  352. <if test="source != null">
  353. #{source,jdbcType=VARCHAR},
  354. </if>
  355. <if test="linkNumber != null">
  356. #{linkNumber,jdbcType=VARCHAR},
  357. </if>
  358. <if test="linkApply != null">
  359. #{linkApply,jdbcType=VARCHAR},
  360. </if>
  361. <if test="tenantId != null">
  362. #{tenantId,jdbcType=BIGINT},
  363. </if>
  364. <if test="deleteFlag != null">
  365. #{deleteFlag,jdbcType=VARCHAR},
  366. </if>
  367. <if test="voucherPicture != null">
  368. #{voucherPicture,jdbcType=VARCHAR},
  369. </if>
  370. <if test="qrcodeUrl != null">
  371. #{qrcodeUrl,jdbcType=VARCHAR},
  372. </if>
  373. <if test="goodsQuantity != null">
  374. #{goodsQuantity,jdbcType=INT},
  375. </if>
  376. <if test="goodsTypeCount != null">
  377. #{goodsTypeCount,jdbcType=INT},
  378. </if>
  379. </trim>
  380. </insert>
  381. <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultType="java.lang.Long">
  382. select count(*) from jsh_depot_head
  383. <if test="_parameter != null">
  384. <include refid="Example_Where_Clause" />
  385. </if>
  386. </select>
  387. <update id="updateByExampleSelective" parameterType="map">
  388. update jsh_depot_head
  389. <set>
  390. <if test="record.id != null">
  391. id = #{record.id,jdbcType=BIGINT},
  392. </if>
  393. <if test="record.type != null">
  394. type = #{record.type,jdbcType=VARCHAR},
  395. </if>
  396. <if test="record.subType != null">
  397. sub_type = #{record.subType,jdbcType=VARCHAR},
  398. </if>
  399. <if test="record.defaultNumber != null">
  400. default_number = #{record.defaultNumber,jdbcType=VARCHAR},
  401. </if>
  402. <if test="record.number != null">
  403. number = #{record.number,jdbcType=VARCHAR},
  404. </if>
  405. <if test="record.createTime != null">
  406. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  407. </if>
  408. <if test="record.operTime != null">
  409. oper_time = #{record.operTime,jdbcType=TIMESTAMP},
  410. </if>
  411. <if test="record.organId != null">
  412. organ_id = #{record.organId,jdbcType=BIGINT},
  413. </if>
  414. <if test="record.creator != null">
  415. creator = #{record.creator,jdbcType=BIGINT},
  416. </if>
  417. <if test="record.accountId != null">
  418. account_id = #{record.accountId,jdbcType=BIGINT},
  419. </if>
  420. <if test="record.changeAmount != null">
  421. change_amount = #{record.changeAmount,jdbcType=DECIMAL},
  422. </if>
  423. <if test="record.backAmount != null">
  424. back_amount = #{record.backAmount,jdbcType=DECIMAL},
  425. </if>
  426. <if test="record.totalPrice != null">
  427. total_price = #{record.totalPrice,jdbcType=DECIMAL},
  428. </if>
  429. <if test="record.payType != null">
  430. pay_type = #{record.payType,jdbcType=VARCHAR},
  431. </if>
  432. <if test="record.billType != null">
  433. bill_type = #{record.billType,jdbcType=VARCHAR},
  434. </if>
  435. <if test="record.remark != null">
  436. remark = #{record.remark,jdbcType=VARCHAR},
  437. </if>
  438. <if test="record.fileName != null">
  439. file_name = #{record.fileName,jdbcType=VARCHAR},
  440. </if>
  441. <if test="record.salesMan != null">
  442. sales_man = #{record.salesMan,jdbcType=VARCHAR},
  443. </if>
  444. <if test="record.accountIdList != null">
  445. account_id_list = #{record.accountIdList,jdbcType=VARCHAR},
  446. </if>
  447. <if test="record.accountMoneyList != null">
  448. account_money_list = #{record.accountMoneyList,jdbcType=VARCHAR},
  449. </if>
  450. <if test="record.discount != null">
  451. discount = #{record.discount,jdbcType=DECIMAL},
  452. </if>
  453. <if test="record.discountMoney != null">
  454. discount_money = #{record.discountMoney,jdbcType=DECIMAL},
  455. </if>
  456. <if test="record.discountLastMoney != null">
  457. discount_last_money = #{record.discountLastMoney,jdbcType=DECIMAL},
  458. </if>
  459. <if test="record.otherMoney != null">
  460. other_money = #{record.otherMoney,jdbcType=DECIMAL},
  461. </if>
  462. <if test="record.deposit != null">
  463. deposit = #{record.deposit,jdbcType=DECIMAL},
  464. </if>
  465. <if test="record.status != null">
  466. status = #{record.status,jdbcType=VARCHAR},
  467. </if>
  468. <if test="record.purchaseStatus != null">
  469. purchase_status = #{record.purchaseStatus,jdbcType=VARCHAR},
  470. </if>
  471. <if test="record.source != null">
  472. source = #{record.source,jdbcType=VARCHAR},
  473. </if>
  474. <if test="record.linkNumber != null">
  475. link_number = #{record.linkNumber,jdbcType=VARCHAR},
  476. </if>
  477. <if test="record.linkApply != null">
  478. link_apply = #{record.linkApply,jdbcType=VARCHAR},
  479. </if>
  480. <if test="record.tenantId != null">
  481. tenant_id = #{record.tenantId,jdbcType=BIGINT},
  482. </if>
  483. <if test="record.deleteFlag != null">
  484. delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
  485. </if>
  486. </set>
  487. <if test="_parameter != null">
  488. <include refid="Update_By_Example_Where_Clause" />
  489. </if>
  490. </update>
  491. <update id="updateByExample" parameterType="map">
  492. update jsh_depot_head
  493. set id = #{record.id,jdbcType=BIGINT},
  494. type = #{record.type,jdbcType=VARCHAR},
  495. sub_type = #{record.subType,jdbcType=VARCHAR},
  496. default_number = #{record.defaultNumber,jdbcType=VARCHAR},
  497. number = #{record.number,jdbcType=VARCHAR},
  498. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  499. oper_time = #{record.operTime,jdbcType=TIMESTAMP},
  500. organ_id = #{record.organId,jdbcType=BIGINT},
  501. creator = #{record.creator,jdbcType=BIGINT},
  502. account_id = #{record.accountId,jdbcType=BIGINT},
  503. change_amount = #{record.changeAmount,jdbcType=DECIMAL},
  504. back_amount = #{record.backAmount,jdbcType=DECIMAL},
  505. total_price = #{record.totalPrice,jdbcType=DECIMAL},
  506. pay_type = #{record.payType,jdbcType=VARCHAR},
  507. bill_type = #{record.billType,jdbcType=VARCHAR},
  508. remark = #{record.remark,jdbcType=VARCHAR},
  509. file_name = #{record.fileName,jdbcType=VARCHAR},
  510. sales_man = #{record.salesMan,jdbcType=VARCHAR},
  511. account_id_list = #{record.accountIdList,jdbcType=VARCHAR},
  512. account_money_list = #{record.accountMoneyList,jdbcType=VARCHAR},
  513. discount = #{record.discount,jdbcType=DECIMAL},
  514. discount_money = #{record.discountMoney,jdbcType=DECIMAL},
  515. discount_last_money = #{record.discountLastMoney,jdbcType=DECIMAL},
  516. other_money = #{record.otherMoney,jdbcType=DECIMAL},
  517. deposit = #{record.deposit,jdbcType=DECIMAL},
  518. status = #{record.status,jdbcType=VARCHAR},
  519. purchase_status = #{record.purchaseStatus,jdbcType=VARCHAR},
  520. source = #{record.source,jdbcType=VARCHAR},
  521. link_number = #{record.linkNumber,jdbcType=VARCHAR},
  522. link_apply = #{record.linkApply,jdbcType=VARCHAR},
  523. tenant_id = #{record.tenantId,jdbcType=BIGINT},
  524. delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
  525. <if test="_parameter != null">
  526. <include refid="Update_By_Example_Where_Clause" />
  527. </if>
  528. </update>
  529. <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.DepotHead">
  530. update jsh_depot_head
  531. <set>
  532. <if test="type != null">
  533. type = #{type,jdbcType=VARCHAR},
  534. </if>
  535. <if test="subType != null">
  536. sub_type = #{subType,jdbcType=VARCHAR},
  537. </if>
  538. <if test="defaultNumber != null">
  539. default_number = #{defaultNumber,jdbcType=VARCHAR},
  540. </if>
  541. <if test="number != null">
  542. number = #{number,jdbcType=VARCHAR},
  543. </if>
  544. <if test="createTime != null">
  545. create_time = #{createTime,jdbcType=TIMESTAMP},
  546. </if>
  547. <if test="operTime != null">
  548. oper_time = #{operTime,jdbcType=TIMESTAMP},
  549. </if>
  550. <if test="organId != null">
  551. organ_id = #{organId,jdbcType=BIGINT},
  552. </if>
  553. <if test="creator != null">
  554. creator = #{creator,jdbcType=BIGINT},
  555. </if>
  556. <if test="accountId != null">
  557. account_id = #{accountId,jdbcType=BIGINT},
  558. </if>
  559. <if test="changeAmount != null">
  560. change_amount = #{changeAmount,jdbcType=DECIMAL},
  561. </if>
  562. <if test="backAmount != null">
  563. back_amount = #{backAmount,jdbcType=DECIMAL},
  564. </if>
  565. <if test="totalPrice != null">
  566. total_price = #{totalPrice,jdbcType=DECIMAL},
  567. </if>
  568. <if test="payType != null">
  569. pay_type = #{payType,jdbcType=VARCHAR},
  570. </if>
  571. <if test="billType != null">
  572. bill_type = #{billType,jdbcType=VARCHAR},
  573. </if>
  574. <if test="remark != null">
  575. remark = #{remark,jdbcType=VARCHAR},
  576. </if>
  577. <if test="fileName != null">
  578. file_name = #{fileName,jdbcType=VARCHAR},
  579. </if>
  580. <if test="salesMan != null">
  581. sales_man = #{salesMan,jdbcType=VARCHAR},
  582. </if>
  583. <if test="accountIdList != null">
  584. account_id_list = #{accountIdList,jdbcType=VARCHAR},
  585. </if>
  586. <if test="accountMoneyList != null">
  587. account_money_list = #{accountMoneyList,jdbcType=VARCHAR},
  588. </if>
  589. <if test="discount != null">
  590. discount = #{discount,jdbcType=DECIMAL},
  591. </if>
  592. <if test="discountMoney != null">
  593. discount_money = #{discountMoney,jdbcType=DECIMAL},
  594. </if>
  595. <if test="discountLastMoney != null">
  596. discount_last_money = #{discountLastMoney,jdbcType=DECIMAL},
  597. </if>
  598. <if test="otherMoney != null">
  599. other_money = #{otherMoney,jdbcType=DECIMAL},
  600. </if>
  601. <if test="deposit != null">
  602. deposit = #{deposit,jdbcType=DECIMAL},
  603. </if>
  604. <if test="status != null">
  605. status = #{status,jdbcType=VARCHAR},
  606. </if>
  607. <if test="purchaseStatus != null">
  608. purchase_status = #{purchaseStatus,jdbcType=VARCHAR},
  609. </if>
  610. <if test="source != null">
  611. source = #{source,jdbcType=VARCHAR},
  612. </if>
  613. <if test="linkNumber != null">
  614. link_number = #{linkNumber,jdbcType=VARCHAR},
  615. </if>
  616. <if test="linkApply != null">
  617. link_apply = #{linkApply,jdbcType=VARCHAR},
  618. </if>
  619. <if test="tenantId != null">
  620. tenant_id = #{tenantId,jdbcType=BIGINT},
  621. </if>
  622. <if test="deleteFlag != null">
  623. delete_flag = #{deleteFlag,jdbcType=VARCHAR},
  624. </if>
  625. <if test="voucherPicture != null">
  626. voucher_picture = #{voucherPicture,jdbcType=VARCHAR},
  627. </if>
  628. <if test="qrcodeUrl != null">
  629. qrcode_url = #{qrcodeUrl,jdbcType=VARCHAR},
  630. </if>
  631. <if test="goodsQuantity != null">
  632. goods_quantity = #{goodsQuantity,jdbcType=INT},
  633. </if>
  634. <if test="goodsTypeCount != null">
  635. goods_type_count = #{goodsTypeCount,jdbcType=INT},
  636. </if>
  637. </set>
  638. where id = #{id,jdbcType=BIGINT}
  639. </update>
  640. <update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.DepotHead">
  641. update jsh_depot_head
  642. set type = #{type,jdbcType=VARCHAR},
  643. sub_type = #{subType,jdbcType=VARCHAR},
  644. default_number = #{defaultNumber,jdbcType=VARCHAR},
  645. number = #{number,jdbcType=VARCHAR},
  646. create_time = #{createTime,jdbcType=TIMESTAMP},
  647. oper_time = #{operTime,jdbcType=TIMESTAMP},
  648. organ_id = #{organId,jdbcType=BIGINT},
  649. creator = #{creator,jdbcType=BIGINT},
  650. account_id = #{accountId,jdbcType=BIGINT},
  651. change_amount = #{changeAmount,jdbcType=DECIMAL},
  652. back_amount = #{backAmount,jdbcType=DECIMAL},
  653. total_price = #{totalPrice,jdbcType=DECIMAL},
  654. pay_type = #{payType,jdbcType=VARCHAR},
  655. bill_type = #{billType,jdbcType=VARCHAR},
  656. remark = #{remark,jdbcType=VARCHAR},
  657. file_name = #{fileName,jdbcType=VARCHAR},
  658. sales_man = #{salesMan,jdbcType=VARCHAR},
  659. account_id_list = #{accountIdList,jdbcType=VARCHAR},
  660. account_money_list = #{accountMoneyList,jdbcType=VARCHAR},
  661. discount = #{discount,jdbcType=DECIMAL},
  662. discount_money = #{discountMoney,jdbcType=DECIMAL},
  663. discount_last_money = #{discountLastMoney,jdbcType=DECIMAL},
  664. other_money = #{otherMoney,jdbcType=DECIMAL},
  665. deposit = #{deposit,jdbcType=DECIMAL},
  666. status = #{status,jdbcType=VARCHAR},
  667. purchase_status = #{purchaseStatus,jdbcType=VARCHAR},
  668. source = #{source,jdbcType=VARCHAR},
  669. link_number = #{linkNumber,jdbcType=VARCHAR},
  670. link_apply = #{linkApply,jdbcType=VARCHAR},
  671. tenant_id = #{tenantId,jdbcType=BIGINT},
  672. delete_flag = #{deleteFlag,jdbcType=VARCHAR}
  673. where id = #{id,jdbcType=BIGINT}
  674. </update>
  675. </mapper>