CopyrightInfoMapper.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  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.goafanti.common.dao.CopyrightInfoMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.CopyrightInfo">
  5. <id column="id" jdbcType="VARCHAR" property="id" />
  6. <result column="uid" jdbcType="VARCHAR" property="uid" />
  7. <result column="serial_number" jdbcType="INTEGER" property="serialNumber" />
  8. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  9. <result column="accept_time" jdbcType="TIMESTAMP" property="acceptTime" />
  10. <result column="principal" jdbcType="VARCHAR" property="principal" />
  11. <result column="contact" jdbcType="INTEGER" property="contact" />
  12. <result column="copyright_info" jdbcType="VARCHAR" property="copyrightInfo" />
  13. <result column="copyright_name" jdbcType="VARCHAR" property="copyrightName" />
  14. <result column="status" jdbcType="INTEGER" property="status" />
  15. <result column="work_issue" jdbcType="VARCHAR" property="workIssue" />
  16. <result column="comment" jdbcType="VARCHAR" property="comment" />
  17. <result column="outsource" jdbcType="VARCHAR" property="outsource" />
  18. <result column="in_urgent" jdbcType="INTEGER" property="inUrgent" />
  19. <result column="authorized_date" jdbcType="TIMESTAMP" property="authorizedDate" />
  20. <result column="certificate_url" jdbcType="VARCHAR" property="certificateUrl" />
  21. <result column="copyright_number" jdbcType="VARCHAR" property="copyrightNumber" />
  22. <result column="application_url" jdbcType="VARCHAR" property="applicationUrl" />
  23. <result column="delete_sign" jdbcType="INTEGER" property="deleteSign" />
  24. <result column="founder" jdbcType="VARCHAR" property="founder" />
  25. <result column="contract_id" jdbcType="VARCHAR" property="contractId" />
  26. </resultMap>
  27. <sql id="Base_Column_List">
  28. id, uid, serial_number, create_time, accept_time, principal, contact, copyright_info,
  29. copyright_name, status, work_issue, comment, outsource, in_urgent, authorized_date,
  30. certificate_url, application_url, delete_sign, copyright_number, founder, contract_id
  31. </sql>
  32. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  33. select
  34. <include refid="Base_Column_List" />
  35. from copyright_info
  36. where id = #{id,jdbcType=VARCHAR}
  37. </select>
  38. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  39. delete from copyright_info
  40. where id = #{id,jdbcType=VARCHAR}
  41. </delete>
  42. <insert id="insert" parameterType="com.goafanti.common.model.CopyrightInfo">
  43. insert into copyright_info (id, uid, serial_number,
  44. create_time, accept_time, principal,
  45. contact, copyright_info, copyright_name,
  46. status, work_issue, comment,
  47. outsource, in_urgent, authorized_date,
  48. certificate_url, copyright_number, application_url, delete_sign, founder, contract_id
  49. )
  50. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER},
  51. #{createTime,jdbcType=TIMESTAMP}, #{acceptTime,jdbcType=TIMESTAMP}, #{principal,jdbcType=VARCHAR},
  52. #{contact,jdbcType=INTEGER}, #{copyrightInfo,jdbcType=VARCHAR}, #{copyrightName,jdbcType=VARCHAR},
  53. #{status,jdbcType=INTEGER}, #{workIssue,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR},
  54. #{outsource,jdbcType=VARCHAR}, #{inUrgent,jdbcType=INTEGER}, #{authorizedDate,jdbcType=TIMESTAMP},
  55. #{certificateUrl,jdbcType=VARCHAR},
  56. #{copyrightNumber,jdbcType=VARCHAR},
  57. #{applicationUrl,jdbcType=VARCHAR}, #{deleteSign,jdbcType=INTEGER}, #{founder,jdbcType=VARCHAR},
  58. #{contractId,jdbcType=VARCHAR}
  59. )
  60. </insert>
  61. <insert id="insertSelective" parameterType="com.goafanti.common.model.CopyrightInfo">
  62. insert into copyright_info
  63. <trim prefix="(" suffix=")" suffixOverrides=",">
  64. <if test="id != null">
  65. id,
  66. </if>
  67. <if test="uid != null">
  68. uid,
  69. </if>
  70. <if test="serialNumber != null">
  71. serial_number,
  72. </if>
  73. <if test="createTime != null">
  74. create_time,
  75. </if>
  76. <if test="acceptTime != null">
  77. accept_time,
  78. </if>
  79. <if test="principal != null">
  80. principal,
  81. </if>
  82. <if test="contact != null">
  83. contact,
  84. </if>
  85. <if test="copyrightInfo != null">
  86. copyright_info,
  87. </if>
  88. <if test="copyrightName != null">
  89. copyright_name,
  90. </if>
  91. <if test="status != null">
  92. status,
  93. </if>
  94. <if test="workIssue != null">
  95. work_issue,
  96. </if>
  97. <if test="comment != null">
  98. comment,
  99. </if>
  100. <if test="outsource != null">
  101. outsource,
  102. </if>
  103. <if test="inUrgent != null">
  104. in_urgent,
  105. </if>
  106. <if test="authorizedDate != null">
  107. authorized_date,
  108. </if>
  109. <if test="certificateUrl != null">
  110. certificate_url,
  111. </if>
  112. <if test="copyrightNumber != null">
  113. copyright_number,
  114. </if>
  115. <if test="applicationUrl != null">
  116. application_url,
  117. </if>
  118. <if test="deleteSign != null">
  119. delete_sign,
  120. </if>
  121. <if test="founder != null">
  122. founder,
  123. </if>
  124. <if test="contractId != null">
  125. contract_id,
  126. </if>
  127. </trim>
  128. <trim prefix="values (" suffix=")" suffixOverrides=",">
  129. <if test="id != null">
  130. #{id,jdbcType=VARCHAR},
  131. </if>
  132. <if test="uid != null">
  133. #{uid,jdbcType=VARCHAR},
  134. </if>
  135. <if test="serialNumber != null">
  136. #{serialNumber,jdbcType=INTEGER},
  137. </if>
  138. <if test="createTime != null">
  139. #{createTime,jdbcType=TIMESTAMP},
  140. </if>
  141. <if test="acceptTime != null">
  142. #{acceptTime,jdbcType=TIMESTAMP},
  143. </if>
  144. <if test="principal != null">
  145. #{principal,jdbcType=VARCHAR},
  146. </if>
  147. <if test="contact != null">
  148. #{contact,jdbcType=INTEGER},
  149. </if>
  150. <if test="copyrightInfo != null">
  151. #{copyrightInfo,jdbcType=VARCHAR},
  152. </if>
  153. <if test="copyrightName != null">
  154. #{copyrightName,jdbcType=VARCHAR},
  155. </if>
  156. <if test="status != null">
  157. #{status,jdbcType=INTEGER},
  158. </if>
  159. <if test="workIssue != null">
  160. #{workIssue,jdbcType=VARCHAR},
  161. </if>
  162. <if test="comment != null">
  163. #{comment,jdbcType=VARCHAR},
  164. </if>
  165. <if test="outsource != null">
  166. #{outsource,jdbcType=VARCHAR},
  167. </if>
  168. <if test="inUrgent != null">
  169. #{inUrgent,jdbcType=INTEGER},
  170. </if>
  171. <if test="authorizedDate != null">
  172. #{authorizedDate,jdbcType=TIMESTAMP},
  173. </if>
  174. <if test="certificateUrl != null">
  175. #{certificateUrl,jdbcType=VARCHAR},
  176. </if>
  177. <if test="copyrightNumber != null">
  178. #{copyrightNumber,jdbcType=VARCHAR},
  179. </if>
  180. <if test="applicationUrl != null">
  181. #{applicationUrl,jdbcType=VARCHAR},
  182. </if>
  183. <if test="deleteSign != null">
  184. #{deleteSign,jdbcType=INTEGER},
  185. </if>
  186. <if test="founder != null">
  187. #{founder,jdbcType=VARCHAR},
  188. </if>
  189. <if test="contractId != null">
  190. #{contractId,jdbcType=VARCHAR},
  191. </if>
  192. </trim>
  193. </insert>
  194. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.CopyrightInfo">
  195. update copyright_info
  196. <set>
  197. <if test="uid != null">
  198. uid = #{uid,jdbcType=VARCHAR},
  199. </if>
  200. <if test="serialNumber != null">
  201. serial_number = #{serialNumber,jdbcType=INTEGER},
  202. </if>
  203. <if test="createTime != null">
  204. create_time = #{createTime,jdbcType=TIMESTAMP},
  205. </if>
  206. <if test="acceptTime != null">
  207. accept_time = #{acceptTime,jdbcType=TIMESTAMP},
  208. </if>
  209. <if test="principal != null">
  210. principal = #{principal,jdbcType=VARCHAR},
  211. </if>
  212. <if test="contact != null">
  213. contact = #{contact,jdbcType=INTEGER},
  214. </if>
  215. <if test="copyrightInfo != null">
  216. copyright_info = #{copyrightInfo,jdbcType=VARCHAR},
  217. </if>
  218. <if test="copyrightName != null">
  219. copyright_name = #{copyrightName,jdbcType=VARCHAR},
  220. </if>
  221. <if test="status != null">
  222. status = #{status,jdbcType=INTEGER},
  223. </if>
  224. <if test="workIssue != null">
  225. work_issue = #{workIssue,jdbcType=VARCHAR},
  226. </if>
  227. <if test="comment != null">
  228. comment = #{comment,jdbcType=VARCHAR},
  229. </if>
  230. <if test="outsource != null">
  231. outsource = #{outsource,jdbcType=VARCHAR},
  232. </if>
  233. <if test="inUrgent != null">
  234. in_urgent = #{inUrgent,jdbcType=INTEGER},
  235. </if>
  236. <if test="authorizedDate != null">
  237. authorized_date = #{authorizedDate,jdbcType=TIMESTAMP},
  238. </if>
  239. <if test="certificateUrl != null">
  240. certificate_url = #{certificateUrl,jdbcType=VARCHAR},
  241. </if>
  242. <if test="copyrightNumber != null">
  243. copyright_number = #{copyrightNumber,jdbcType=VARCHAR},
  244. </if>
  245. <if test="applicationUrl != null">
  246. application_url = #{applicationUrl,jdbcType=VARCHAR},
  247. </if>
  248. <if test="deleteSign != null">
  249. delete_sign = #{deleteSign,jdbcType=INTEGER},
  250. </if>
  251. <if test="founder != null">
  252. founder = #{founder,jdbcType=VARCHAR},
  253. </if>
  254. <if test="contractId != null">
  255. contract_id = #{contractId,jdbcType=VARCHAR},
  256. </if>
  257. </set>
  258. where id = #{id,jdbcType=VARCHAR}
  259. </update>
  260. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.CopyrightInfo">
  261. update copyright_info
  262. set uid = #{uid,jdbcType=VARCHAR},
  263. serial_number = #{serialNumber,jdbcType=INTEGER},
  264. create_time = #{createTime,jdbcType=TIMESTAMP},
  265. accept_time = #{acceptTime,jdbcType=TIMESTAMP},
  266. principal = #{principal,jdbcType=VARCHAR},
  267. contact = #{contact,jdbcType=INTEGER},
  268. copyright_info = #{copyrightInfo,jdbcType=VARCHAR},
  269. copyright_name = #{copyrightName,jdbcType=VARCHAR},
  270. status = #{status,jdbcType=INTEGER},
  271. work_issue = #{workIssue,jdbcType=VARCHAR},
  272. comment = #{comment,jdbcType=VARCHAR},
  273. outsource = #{outsource,jdbcType=VARCHAR},
  274. in_urgent = #{inUrgent,jdbcType=INTEGER},
  275. authorized_date = #{authorizedDate,jdbcType=TIMESTAMP},
  276. certificate_url = #{certificateUrl,jdbcType=VARCHAR},
  277. copyright_number = #{copyrightNumber,jdbcType=VARCHAR},
  278. application_url = #{applicationUrl,jdbcType=VARCHAR},
  279. delete_sign = #{deleteSign,jdbcType=INTEGER},
  280. founder = #{founder,jdbcType=VARCHAR},
  281. contract_id = #{contractId,jdbcType=VARCHAR}
  282. where id = #{id,jdbcType=VARCHAR}
  283. </update>
  284. <select id="findListByPage" resultType="com.goafanti.copyright.bo.CopyrightInfoSummary" parameterType="String">
  285. select ci.id,ci.uid,ci.serial_number as serialNumber, ci.create_time as createTime,
  286. ci.accept_time as acceptTime, ci.contact,
  287. ci.copyright_name as copyrightName, ci.status, ci.comment, ci.outsource, ci.in_urgent as inUrgent,
  288. ci.authorized_date as authorizedDate, ci.work_issue as workIssue, ci.copyright_number as copyrightNumber,
  289. oi.licence_province as province,oi.unit_name as unitName,
  290. concat(oi.first_contacts,' ', oi.first_mobile) as firstContact,
  291. concat(oi.second_contacts,' ', oi.second_mobile) as secondContact,
  292. concat(oi.third_contacts,' ', oi.third_mobile) as thirdContact,
  293. a.name as principal, ad.name as founder, c.serial_number as contractNumber
  294. from copyright_info ci
  295. left join organization_identity oi on ci.uid = oi.uid
  296. left join admin a on ci.principal = a.id
  297. left join admin ad on ci.founder = ad.id
  298. left join contract c on c.id = ci.contract_id
  299. <if test="principal != null">
  300. left join contract_log cl on ci.contract_id=cl.cid
  301. </if>
  302. where ci.delete_sign = 0
  303. <if test="principal != null">
  304. and cl.principal = #{principal,jdbcType=VARCHAR}
  305. </if>
  306. <if test="province != null">
  307. and oi.licence_province = #{province,jdbcType=INTEGER}
  308. </if>
  309. <if test="status != null">
  310. and ci.status = #{status,jdbcType=INTEGER}
  311. </if>
  312. <if test="contractId != null">
  313. and ci.contract_id = #{contractId,jdbcType=INTEGER}
  314. </if>
  315. <if test="unitName != null">
  316. and oi.unit_name like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')
  317. </if>
  318. <if test="unitId != null">
  319. and ci.uid = #{unitId,jdbcType=VARCHAR}
  320. </if>
  321. <if test="copyrightName != null">
  322. and ci.copyright_name like CONCAT('%', #{copyrightName,jdbcType=VARCHAR}, '%')
  323. </if>
  324. <if test="createStartTime != null">
  325. and ci.create_time <![CDATA[ >= ]]> #{createStartTime,jdbcType=TIMESTAMP}
  326. </if>
  327. <if test="createEndTime != null">
  328. and ci.create_time <![CDATA[ < ]]> #{createEndTime,jdbcType=TIMESTAMP}
  329. </if>
  330. <if test="acceptStartTime != null">
  331. and ci.accept_time <![CDATA[ >= ]]> #{acceptStartTime,jdbcType=TIMESTAMP}
  332. </if>
  333. <if test="acceptEndTime != null">
  334. and ci.accept_time <![CDATA[ < ]]> #{acceptEndTime,jdbcType=TIMESTAMP}
  335. </if>
  336. <if test="authStartTime != null">
  337. and ci.authorized_date <![CDATA[ >= ]]> #{authStartTime,jdbcType=TIMESTAMP}
  338. </if>
  339. <if test="authEndTime != null">
  340. and ci.authorized_date <![CDATA[ < ]]> #{authEndTime,jdbcType=TIMESTAMP}
  341. </if>
  342. <if test="principal != null">
  343. group by ci.id
  344. </if>
  345. order by ci.serial_number desc
  346. <if test="page_sql!=null">
  347. ${page_sql}
  348. </if>
  349. </select>
  350. <select id="findListCount" resultType="java.lang.Integer" parameterType="String">
  351. select count(*)
  352. from copyright_info ci
  353. left join organization_identity oi on ci.uid = oi.uid
  354. <if test="principal != null">
  355. left join contract_log cl on ci.contract_id=cl.cid
  356. </if>
  357. where ci.delete_sign = 0
  358. <if test="principal != null">
  359. and cl.principal = #{principal,jdbcType=VARCHAR}
  360. </if>
  361. <if test="province != null">
  362. and oi.licence_province = #{province,jdbcType=INTEGER}
  363. </if>
  364. <if test="contractId != null">
  365. and ci.contract_id = #{contractId,jdbcType=INTEGER}
  366. </if>
  367. <if test="status != null">
  368. and ci.status = #{status,jdbcType=INTEGER}
  369. </if>
  370. <if test="unitName != null">
  371. and oi.unit_name like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')
  372. </if>
  373. <if test="unitId != null">
  374. and ci.uid = #{unitId,jdbcType=VARCHAR}
  375. </if>
  376. <if test="copyrightName != null">
  377. and ci.copyright_name like CONCAT('%', #{copyrightName,jdbcType=VARCHAR}, '%')
  378. </if>
  379. <if test="createStartTime != null">
  380. and ci.create_time <![CDATA[ >= ]]> #{createStartTime,jdbcType=TIMESTAMP}
  381. </if>
  382. <if test="createEndTime != null">
  383. and ci.create_time <![CDATA[ < ]]> #{createEndTime,jdbcType=TIMESTAMP}
  384. </if>
  385. <if test="acceptStartTime != null">
  386. and ci.accept_time <![CDATA[ >= ]]> #{acceptStartTime,jdbcType=TIMESTAMP}
  387. </if>
  388. <if test="acceptEndTime != null">
  389. and ci.accept_time <![CDATA[ < ]]> #{acceptEndTime,jdbcType=TIMESTAMP}
  390. </if>
  391. <if test="authStartTime != null">
  392. and ci.authorized_date <![CDATA[ >= ]]> #{authStartTime,jdbcType=TIMESTAMP}
  393. </if>
  394. <if test="authEndTime != null">
  395. and ci.authorized_date <![CDATA[ < ]]> #{authEndTime,jdbcType=TIMESTAMP}
  396. </if>
  397. <if test="principal != null">
  398. group by ci.id
  399. </if>
  400. </select>
  401. <update id="deleteByPrimaryKeys" parameterType="java.util.List">
  402. update copyright_info set delete_sign = 1
  403. where id in
  404. <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
  405. #{item}
  406. </foreach>
  407. </update>
  408. <select id="findByPrimaryKey" parameterType="java.lang.String" resultType="com.goafanti.copyright.bo.CopyrightInfoDetail">
  409. select ci.id,ci.uid,ci.serial_number as serialNumber, ci.create_time as createTime,
  410. ci.accept_time as acceptTime, ci.contact, ci.copyright_name as copyrightName, ci.copyright_info as copyrightInfo,
  411. ci.status, ci.comment, ci.outsource, ci.in_urgent as inUrgent, ci.authorized_date as authorizedDate, ci.copyright_number as copyrightNumber,
  412. ci.work_issue as workIssue,ci.application_url as applicationUrl,ci.certificate_url as certificateUrl,
  413. oi.licence_province as province, oi.licence_city as city,oi.licence_area as area, oi.postal_address as postalAddress, oi.postcode,
  414. oi.unit_name as unitName, oi.org_code as orgCode,
  415. concat(oi.first_contacts,' ', oi.first_mobile) as firstContact,
  416. concat(oi.second_contacts,' ', oi.second_mobile) as secondContact,
  417. concat(oi.third_contacts,' ', oi.third_mobile) as thirdContact,
  418. a.name as principal
  419. from copyright_info ci
  420. left join organization_identity oi on ci.uid = oi.uid
  421. left join admin a on ci.principal = a.id
  422. where ci.id = #{id,jdbcType=VARCHAR}
  423. </select>
  424. <select id="selectByPrimaryKeys" parameterType="java.lang.String" resultMap="BaseResultMap">
  425. select
  426. <include refid="Base_Column_List" />
  427. from copyright_info where id in
  428. <foreach item="item" index="index" collection="list" open="("
  429. separator="," close=")">
  430. #{item}
  431. </foreach>
  432. </select>
  433. <select id="countCopyrightDone" parameterType="java.lang.String" resultType="java.lang.Integer">
  434. select count(1) from copyright_info
  435. where uid = #{uid,jdbcType=VARCHAR}
  436. and delete_sign = 0 and status in (8,9)
  437. </select>
  438. <select id="countCopyrightUndone" parameterType="java.lang.String" resultType="java.lang.Integer">
  439. select count(1) from copyright_info
  440. where uid = #{uid,jdbcType=VARCHAR}
  441. and delete_sign = 0 and status <![CDATA[ < ]]> 8
  442. </select>
  443. <select id="listContractCopyrightByContractId" parameterType="java.lang.String" resultType="com.goafanti.copyright.bo.CopyrightContractListBo">
  444. select
  445. ci.id, ci.uid, ci.contract_id as contractId,
  446. ci.serial_number as serialNumber, ci.copyright_name as copyrightName, ci.status,
  447. ci.in_urgent as inUrgent, a.name as principal
  448. from copyright_info ci
  449. left join admin a on a.id = ci.principal
  450. where ci.contract_id = #{contractId,jdbcType=VARCHAR}
  451. </select>
  452. <insert id="batchInsert" parameterType="com.goafanti.common.model.CopyrightInfo">
  453. insert into copyright_info (id, uid, serial_number,
  454. create_time, accept_time, principal,
  455. contact, copyright_info, copyright_name,
  456. status, work_issue, comment,
  457. outsource, in_urgent, authorized_date,
  458. certificate_url, copyright_number, application_url, delete_sign, founder, contract_id
  459. )
  460. values
  461. <foreach item="item" index="index" collection="list" separator=",">
  462. (
  463. #{item.id,jdbcType=VARCHAR}, #{item.uid,jdbcType=VARCHAR}, #{item.serialNumber,jdbcType=INTEGER},
  464. #{item.createTime,jdbcType=TIMESTAMP}, #{item.acceptTime,jdbcType=TIMESTAMP}, #{item.principal,jdbcType=VARCHAR},
  465. #{item.contact,jdbcType=INTEGER}, #{item.copyrightInfo,jdbcType=VARCHAR}, #{item.copyrightName,jdbcType=VARCHAR},
  466. #{item.status,jdbcType=INTEGER}, #{item.workIssue,jdbcType=VARCHAR}, #{item.comment,jdbcType=VARCHAR},
  467. #{item.outsource,jdbcType=VARCHAR}, #{item.inUrgent,jdbcType=INTEGER}, #{item.authorizedDate,jdbcType=TIMESTAMP},
  468. #{item.certificateUrl,jdbcType=VARCHAR},
  469. #{item.copyrightNumber,jdbcType=VARCHAR},
  470. #{item.applicationUrl,jdbcType=VARCHAR}, #{item.deleteSign,jdbcType=INTEGER}, #{item.founder,jdbcType=VARCHAR},
  471. #{item.contractId,jdbcType=VARCHAR}
  472. )
  473. </foreach>
  474. </insert>
  475. <update id="batchDeleteByContractId" parameterType="java.util.List">
  476. update copyright_info set delete_sign = 1
  477. where contract_id in
  478. <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
  479. #{item}
  480. </foreach>
  481. </update>
  482. <select id="findCopyrightInfoNumByUid" parameterType="java.lang.String" resultType="java.lang.Integer">
  483. select
  484. count(1)
  485. from copyright_info
  486. where
  487. delete_sign = 0
  488. and uid = #{uid,jdbcType=VARCHAR}
  489. </select>
  490. </mapper>