PatentInfoMapper.xml 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126
  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.PatentInfoMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.PatentInfo">
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="uid" property="uid" jdbcType="VARCHAR" />
  7. <result column="serial_number" property="serialNumber"
  8. jdbcType="INTEGER" />
  9. <result column="patent_number" property="patentNumber"
  10. jdbcType="VARCHAR" />
  11. <result column="patent_name" property="patentName" jdbcType="VARCHAR" />
  12. <result column="patent_catagory" property="patentCatagory"
  13. jdbcType="INTEGER" />
  14. <result column="patent_state" property="patentState" jdbcType="INTEGER" />
  15. <result column="patent_field" property="patentField" jdbcType="INTEGER" />
  16. <result column="patent_des" property="patentDes" jdbcType="VARCHAR" />
  17. <result column="patent_prory_statement_url" property="patentProryStatementUrl"
  18. jdbcType="VARCHAR" />
  19. <result column="patent_writing_url" property="patentWritingUrl"
  20. jdbcType="VARCHAR" />
  21. <result column="authorization_notice_url" property="authorizationNoticeUrl"
  22. jdbcType="VARCHAR" />
  23. <result column="patent_certificate_url" property="patentCertificateUrl"
  24. jdbcType="VARCHAR" />
  25. <result column="patent_application_date" property="patentApplicationDate"
  26. jdbcType="TIMESTAMP" />
  27. <result column="first_inventor_name" property="firstInventorName"
  28. jdbcType="VARCHAR" />
  29. <result column="first_inventor_nationality" property="firstInventorNationality"
  30. jdbcType="VARCHAR" />
  31. <result column="first_inventor_id_number" property="firstInventorIdNumber"
  32. jdbcType="VARCHAR" />
  33. <result column="first_inventor_is_publish" property="firstInventorIsPublish"
  34. jdbcType="INTEGER" />
  35. <result column="second_inventor_name" property="secondInventorName"
  36. jdbcType="VARCHAR" />
  37. <result column="second_inventor_nationality" property="secondInventorNationality"
  38. jdbcType="VARCHAR" />
  39. <result column="second_inventor_is_publish" property="secondInventorIsPublish"
  40. jdbcType="INTEGER" />
  41. <result column="third_inventor_name" property="thirdInventorName"
  42. jdbcType="VARCHAR" />
  43. <result column="third_inventor_nationality" property="thirdInventorNationality"
  44. jdbcType="VARCHAR" />
  45. <result column="third_inventor_is_publish" property="thirdInventorIsPublish"
  46. jdbcType="INTEGER" />
  47. <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  48. <result column="author" property="author" jdbcType="VARCHAR" />
  49. <result column="authorized_date" property="authorizedDate"
  50. jdbcType="TIMESTAMP" />
  51. <result column="office" property="office" jdbcType="VARCHAR" />
  52. <result column="principal" property="principal" jdbcType="VARCHAR" />
  53. <result column="confirm_state" property="confirmState"
  54. jdbcType="INTEGER" />
  55. <result column="record_time" property="recordTime" jdbcType="TIMESTAMP" />
  56. <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
  57. <result column="contacts" property="contacts" jdbcType="INTEGER" />
  58. <result column="founder" property="founder" jdbcType="VARCHAR" />
  59. <result column="contract_id" property="contractId" jdbcType="VARCHAR" />
  60. </resultMap>
  61. <sql id="Base_Column_List">
  62. id, uid, serial_number, patent_number, patent_name,
  63. patent_catagory,
  64. patent_state,
  65. patent_field, patent_des,
  66. patent_prory_statement_url, patent_writing_url,
  67. authorization_notice_url,
  68. patent_certificate_url,
  69. patent_application_date, first_inventor_name,
  70. first_inventor_nationality,
  71. first_inventor_id_number,
  72. first_inventor_is_publish, second_inventor_name,
  73. second_inventor_nationality,
  74. second_inventor_is_publish,
  75. third_inventor_name, third_inventor_nationality,
  76. third_inventor_is_publish,
  77. create_time, author, authorized_date,office,
  78. principal ,confirm_state,
  79. record_time, deleted_sign, contacts, founder,
  80. contract_id
  81. </sql>
  82. <select id="selectByPrimaryKey" resultMap="BaseResultMap"
  83. parameterType="java.lang.String">
  84. select
  85. <include refid="Base_Column_List" />
  86. from patent_info
  87. where id = #{id,jdbcType=VARCHAR}
  88. </select>
  89. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  90. delete from
  91. patent_info
  92. where id = #{id,jdbcType=VARCHAR}
  93. </delete>
  94. <insert id="insert" parameterType="com.goafanti.common.model.PatentInfo">
  95. insert into patent_info (id,
  96. uid, serial_number,
  97. patent_number, patent_name, patent_catagory,
  98. patent_state, patent_field, patent_des,
  99. patent_prory_statement_url,
  100. patent_writing_url,
  101. authorization_notice_url, patent_certificate_url,
  102. patent_application_date, first_inventor_name,
  103. first_inventor_nationality, first_inventor_id_number,
  104. first_inventor_is_publish, second_inventor_name,
  105. second_inventor_nationality, second_inventor_is_publish,
  106. third_inventor_name, third_inventor_nationality,
  107. third_inventor_is_publish, create_time, author, authorized_date,
  108. office, principal, confirm_state, record_time, deleted_sign, contacts, founder,
  109. contract_id)
  110. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR},
  111. #{serialNumber,jdbcType=INTEGER},
  112. #{patentNumber,jdbcType=VARCHAR},
  113. #{patentName,jdbcType=VARCHAR}, #{patentCatagory,jdbcType=INTEGER},
  114. #{patentState,jdbcType=INTEGER}, #{patentField,jdbcType=INTEGER},
  115. #{patentDes,jdbcType=VARCHAR},
  116. #{patentProryStatementUrl,jdbcType=VARCHAR},
  117. #{patentWritingUrl,jdbcType=VARCHAR},
  118. #{authorizationNoticeUrl,jdbcType=VARCHAR},
  119. #{patentCertificateUrl,jdbcType=VARCHAR},
  120. #{patentApplicationDate,jdbcType=TIMESTAMP},
  121. #{firstInventorName,jdbcType=VARCHAR},
  122. #{firstInventorNationality,jdbcType=VARCHAR},
  123. #{firstInventorIdNumber,jdbcType=VARCHAR},
  124. #{firstInventorIsPublish,jdbcType=INTEGER},
  125. #{secondInventorName,jdbcType=VARCHAR},
  126. #{secondInventorNationality,jdbcType=VARCHAR},
  127. #{secondInventorIsPublish,jdbcType=INTEGER},
  128. #{thirdInventorName,jdbcType=VARCHAR},
  129. #{thirdInventorNationality,jdbcType=VARCHAR},
  130. #{thirdInventorIsPublish,jdbcType=INTEGER},
  131. #{createTime,jdbcType=TIMESTAMP}, #{author,jdbcType=VARCHAR},
  132. #{authorizedDate,jdbcType=TIMESTAMP},
  133. #{office,jdbcType=VARCHAR},
  134. #{principal,jdbcType=VARCHAR}, #{confirmState,jdbcType=INTEGER},
  135. #{recordTime,jdbcType=TIMESTAMP},
  136. #{deletedSign,jdbcType=INTEGER},
  137. #{contacts,jdbcType=INTEGER}, #{founder,jdbcType=VARCHAR},
  138. #{contractId,jdbcType=VARCHAR})
  139. </insert>
  140. <insert id="insertSelective" parameterType="com.goafanti.common.model.PatentInfo">
  141. insert into patent_info
  142. <trim prefix="(" suffix=")" suffixOverrides=",">
  143. <if test="id != null">
  144. id,
  145. </if>
  146. <if test="uid != null">
  147. uid,
  148. </if>
  149. <if test="serialNumber != null">
  150. serial_number,
  151. </if>
  152. <if test="patentNumber != null">
  153. patent_number,
  154. </if>
  155. <if test="patentName != null">
  156. patent_name,
  157. </if>
  158. <if test="patentCatagory != null">
  159. patent_catagory,
  160. </if>
  161. <if test="patentState != null">
  162. patent_state,
  163. </if>
  164. <if test="patentField != null">
  165. patent_field,
  166. </if>
  167. <if test="patentDes != null">
  168. patent_des,
  169. </if>
  170. <if test="patentProryStatementUrl != null">
  171. patent_prory_statement_url,
  172. </if>
  173. <if test="patentWritingUrl != null">
  174. patent_writing_url,
  175. </if>
  176. <if test="authorizationNoticeUrl != null">
  177. authorization_notice_url,
  178. </if>
  179. <if test="patentCertificateUrl != null">
  180. patent_certificate_url,
  181. </if>
  182. <if test="patentApplicationDate != null">
  183. patent_application_date,
  184. </if>
  185. <if test="firstInventorName != null">
  186. first_inventor_name,
  187. </if>
  188. <if test="firstInventorNationality != null">
  189. first_inventor_nationality,
  190. </if>
  191. <if test="firstInventorIdNumber != null">
  192. first_inventor_id_number,
  193. </if>
  194. <if test="firstInventorIsPublish != null">
  195. first_inventor_is_publish,
  196. </if>
  197. <if test="secondInventorName != null">
  198. second_inventor_name,
  199. </if>
  200. <if test="secondInventorNationality != null">
  201. second_inventor_nationality,
  202. </if>
  203. <if test="secondInventorIsPublish != null">
  204. second_inventor_is_publish,
  205. </if>
  206. <if test="thirdInventorName != null">
  207. third_inventor_name,
  208. </if>
  209. <if test="thirdInventorNationality != null">
  210. third_inventor_nationality,
  211. </if>
  212. <if test="thirdInventorIsPublish != null">
  213. third_inventor_is_publish,
  214. </if>
  215. <if test="createTime != null">
  216. create_time,
  217. </if>
  218. <if test="author != null">
  219. author,
  220. </if>
  221. <if test="authorizedDate != null">
  222. authorized_date,
  223. </if>
  224. <if test="office != null">
  225. office,
  226. </if>
  227. <if test="principal != null">
  228. principal,
  229. </if>
  230. <if test="confirmState != null">
  231. confirm_state,
  232. </if>
  233. <if test="recordTime != null">
  234. record_time,
  235. </if>
  236. <if test="deletedSign != null">
  237. deleted_sign,
  238. </if>
  239. <if test="contacts != null">
  240. contacts,
  241. </if>
  242. <if test="founder != null">
  243. founder,
  244. </if>
  245. <if test="contractId != null">
  246. contract_id,
  247. </if>
  248. </trim>
  249. <trim prefix="values (" suffix=")" suffixOverrides=",">
  250. <if test="id != null">
  251. #{id,jdbcType=VARCHAR},
  252. </if>
  253. <if test="uid != null">
  254. #{uid,jdbcType=VARCHAR},
  255. </if>
  256. <if test="serialNumber != null">
  257. #{serialNumber,jdbcType=INTEGER},
  258. </if>
  259. <if test="patentNumber != null">
  260. #{patentNumber,jdbcType=VARCHAR},
  261. </if>
  262. <if test="patentName != null">
  263. #{patentName,jdbcType=VARCHAR},
  264. </if>
  265. <if test="patentCatagory != null">
  266. #{patentCatagory,jdbcType=INTEGER},
  267. </if>
  268. <if test="patentState != null">
  269. #{patentState,jdbcType=INTEGER},
  270. </if>
  271. <if test="patentField != null">
  272. #{patentField,jdbcType=INTEGER},
  273. </if>
  274. <if test="patentDes != null">
  275. #{patentDes,jdbcType=VARCHAR},
  276. </if>
  277. <if test="patentProryStatementUrl != null">
  278. #{patentProryStatementUrl,jdbcType=VARCHAR},
  279. </if>
  280. <if test="patentWritingUrl != null">
  281. #{patentWritingUrl,jdbcType=VARCHAR},
  282. </if>
  283. <if test="authorizationNoticeUrl != null">
  284. #{authorizationNoticeUrl,jdbcType=VARCHAR},
  285. </if>
  286. <if test="patentCertificateUrl != null">
  287. #{patentCertificateUrl,jdbcType=VARCHAR},
  288. </if>
  289. <if test="patentApplicationDate != null">
  290. #{patentApplicationDate,jdbcType=TIMESTAMP},
  291. </if>
  292. <if test="firstInventorName != null">
  293. #{firstInventorName,jdbcType=VARCHAR},
  294. </if>
  295. <if test="firstInventorNationality != null">
  296. #{firstInventorNationality,jdbcType=VARCHAR},
  297. </if>
  298. <if test="firstInventorIdNumber != null">
  299. #{firstInventorIdNumber,jdbcType=VARCHAR},
  300. </if>
  301. <if test="firstInventorIsPublish != null">
  302. #{firstInventorIsPublish,jdbcType=INTEGER},
  303. </if>
  304. <if test="secondInventorName != null">
  305. #{secondInventorName,jdbcType=VARCHAR},
  306. </if>
  307. <if test="secondInventorNationality != null">
  308. #{secondInventorNationality,jdbcType=VARCHAR},
  309. </if>
  310. <if test="secondInventorIsPublish != null">
  311. #{secondInventorIsPublish,jdbcType=INTEGER},
  312. </if>
  313. <if test="thirdInventorName != null">
  314. #{thirdInventorName,jdbcType=VARCHAR},
  315. </if>
  316. <if test="thirdInventorNationality != null">
  317. #{thirdInventorNationality,jdbcType=VARCHAR},
  318. </if>
  319. <if test="thirdInventorIsPublish != null">
  320. #{thirdInventorIsPublish,jdbcType=INTEGER},
  321. </if>
  322. <if test="createTime != null">
  323. #{createTime,jdbcType=TIMESTAMP},
  324. </if>
  325. <if test="author != null">
  326. #{author,jdbcType=VARCHAR},
  327. </if>
  328. <if test="authorizedDate != null">
  329. #{authorizedDate,jdbcType=TIMESTAMP},
  330. </if>
  331. <if test="office != null">
  332. #{office,jdbcType=VARCHAR},
  333. </if>
  334. <if test="principal != null">
  335. #{principal,jdbcType=VARCHAR},
  336. </if>
  337. <if test="confirmState != null">
  338. #{confirmState,jdbcType=INTEGER},
  339. </if>
  340. <if test="recordTime != null">
  341. #{recordTime,jdbcType=TIMESTAMP},
  342. </if>
  343. <if test="deletedSign != null">
  344. #{deletedSign,jdbcType=INTEGER},
  345. </if>
  346. <if test="contacts != null">
  347. #{contacts,jdbcType=INTEGER},
  348. </if>
  349. <if test="founder != null">
  350. #{founder,jdbcType=VARCHAR},
  351. </if>
  352. <if test="contractId != null">
  353. #{contractId,jdbcType=VARCHAR},
  354. </if>
  355. </trim>
  356. </insert>
  357. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PatentInfo">
  358. update patent_info
  359. <set>
  360. <if test="uid != null">
  361. uid = #{uid,jdbcType=VARCHAR},
  362. </if>
  363. <if test="serialNumber != null">
  364. serial_number = #{serialNumber,jdbcType=INTEGER},
  365. </if>
  366. <if test="patentNumber != null">
  367. patent_number = #{patentNumber,jdbcType=VARCHAR},
  368. </if>
  369. <if test="patentName != null">
  370. patent_name = #{patentName,jdbcType=VARCHAR},
  371. </if>
  372. <if test="patentCatagory != null">
  373. patent_catagory = #{patentCatagory,jdbcType=INTEGER},
  374. </if>
  375. <if test="patentState != null">
  376. patent_state = #{patentState,jdbcType=INTEGER},
  377. </if>
  378. <if test="patentField != null">
  379. patent_field = #{patentField,jdbcType=INTEGER},
  380. </if>
  381. <if test="patentDes != null">
  382. patent_des = #{patentDes,jdbcType=VARCHAR},
  383. </if>
  384. <if test="patentProryStatementUrl != null">
  385. patent_prory_statement_url =
  386. #{patentProryStatementUrl,jdbcType=VARCHAR},
  387. </if>
  388. <if test="patentWritingUrl != null">
  389. patent_writing_url =
  390. #{patentWritingUrl,jdbcType=VARCHAR},
  391. </if>
  392. <if test="authorizationNoticeUrl != null">
  393. authorization_notice_url =
  394. #{authorizationNoticeUrl,jdbcType=VARCHAR},
  395. </if>
  396. <if test="patentCertificateUrl != null">
  397. patent_certificate_url =
  398. #{patentCertificateUrl,jdbcType=VARCHAR},
  399. </if>
  400. <if test="patentApplicationDate != null">
  401. patent_application_date =
  402. #{patentApplicationDate,jdbcType=TIMESTAMP},
  403. </if>
  404. <if test="firstInventorName != null">
  405. first_inventor_name =
  406. #{firstInventorName,jdbcType=VARCHAR},
  407. </if>
  408. <if test="firstInventorNationality != null">
  409. first_inventor_nationality =
  410. #{firstInventorNationality,jdbcType=VARCHAR},
  411. </if>
  412. <if test="firstInventorIdNumber != null">
  413. first_inventor_id_number =
  414. #{firstInventorIdNumber,jdbcType=VARCHAR},
  415. </if>
  416. <if test="firstInventorIsPublish != null">
  417. first_inventor_is_publish =
  418. #{firstInventorIsPublish,jdbcType=INTEGER},
  419. </if>
  420. <if test="secondInventorName != null">
  421. second_inventor_name =
  422. #{secondInventorName,jdbcType=VARCHAR},
  423. </if>
  424. <if test="secondInventorNationality != null">
  425. second_inventor_nationality =
  426. #{secondInventorNationality,jdbcType=VARCHAR},
  427. </if>
  428. <if test="secondInventorIsPublish != null">
  429. second_inventor_is_publish =
  430. #{secondInventorIsPublish,jdbcType=INTEGER},
  431. </if>
  432. <if test="thirdInventorName != null">
  433. third_inventor_name =
  434. #{thirdInventorName,jdbcType=VARCHAR},
  435. </if>
  436. <if test="thirdInventorNationality != null">
  437. third_inventor_nationality =
  438. #{thirdInventorNationality,jdbcType=VARCHAR},
  439. </if>
  440. <if test="thirdInventorIsPublish != null">
  441. third_inventor_is_publish =
  442. #{thirdInventorIsPublish,jdbcType=INTEGER},
  443. </if>
  444. <if test="createTime != null">
  445. create_time = #{createTime,jdbcType=TIMESTAMP},
  446. </if>
  447. <if test="author != null">
  448. author = #{author,jdbcType=VARCHAR},
  449. </if>
  450. <if test="authorizedDate != null">
  451. authorized_date = #{authorizedDate,jdbcType=TIMESTAMP},
  452. </if>
  453. <if test="office != null">
  454. office = #{office,jdbcType=VARCHAR},
  455. </if>
  456. <if test="principal != null">
  457. principal = #{principal,jdbcType=VARCHAR},
  458. </if>
  459. <if test="confirmState != null">
  460. confirm_state = #{confirmState,jdbcType=INTEGER},
  461. </if>
  462. <if test="recordTime != null">
  463. record_time = #{recordTime,jdbcType=TIMESTAMP},
  464. </if>
  465. <if test="deletedSign != null">
  466. deleted_sign = #{deletedSign,jdbcType=INTEGER},
  467. </if>
  468. <if test="contacts != null">
  469. contacts = #{contacts,jdbcType=INTEGER},
  470. </if>
  471. <if test="founder != null">
  472. founder = #{founder,jdbcType=VARCHAR},
  473. </if>
  474. <if test="contractId != null">
  475. contract_id = #{contractId,jdbcType=VARCHAR},
  476. </if>
  477. </set>
  478. where id = #{id,jdbcType=VARCHAR}
  479. </update>
  480. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PatentInfo">
  481. update patent_info
  482. set uid = #{uid,jdbcType=VARCHAR},
  483. serial_number =
  484. #{serialNumber,jdbcType=INTEGER},
  485. patent_number =
  486. #{patentNumber,jdbcType=VARCHAR},
  487. patent_name =
  488. #{patentName,jdbcType=VARCHAR},
  489. patent_catagory =
  490. #{patentCatagory,jdbcType=INTEGER},
  491. patent_state =
  492. #{patentState,jdbcType=INTEGER},
  493. patent_field =
  494. #{patentField,jdbcType=INTEGER},
  495. patent_des =
  496. #{patentDes,jdbcType=VARCHAR},
  497. patent_prory_statement_url =
  498. #{patentProryStatementUrl,jdbcType=VARCHAR},
  499. patent_writing_url =
  500. #{patentWritingUrl,jdbcType=VARCHAR},
  501. authorization_notice_url =
  502. #{authorizationNoticeUrl,jdbcType=VARCHAR},
  503. patent_certificate_url =
  504. #{patentCertificateUrl,jdbcType=VARCHAR},
  505. patent_application_date =
  506. #{patentApplicationDate,jdbcType=TIMESTAMP},
  507. first_inventor_name =
  508. #{firstInventorName,jdbcType=VARCHAR},
  509. first_inventor_nationality =
  510. #{firstInventorNationality,jdbcType=VARCHAR},
  511. first_inventor_id_number
  512. = #{firstInventorIdNumber,jdbcType=VARCHAR},
  513. first_inventor_is_publish
  514. =
  515. #{firstInventorIsPublish,jdbcType=INTEGER},
  516. second_inventor_name =
  517. #{secondInventorName,jdbcType=VARCHAR},
  518. second_inventor_nationality =
  519. #{secondInventorNationality,jdbcType=VARCHAR},
  520. second_inventor_is_publish =
  521. #{secondInventorIsPublish,jdbcType=INTEGER},
  522. third_inventor_name =
  523. #{thirdInventorName,jdbcType=VARCHAR},
  524. third_inventor_nationality =
  525. #{thirdInventorNationality,jdbcType=VARCHAR},
  526. third_inventor_is_publish =
  527. #{thirdInventorIsPublish,jdbcType=INTEGER},
  528. create_time =
  529. #{createTime,jdbcType=TIMESTAMP},
  530. author = #{author,jdbcType=VARCHAR},
  531. authorized_date = #{authorizedDate,jdbcType=TIMESTAMP},
  532. office =
  533. #{office,jdbcType=VARCHAR},
  534. principal = #{principal,jdbcType=VARCHAR},
  535. confirm_state = #{confirmState,jdbcType=INTEGER},
  536. record_time =
  537. #{recordTime,jdbcType=TIMESTAMP},
  538. deleted_sign =
  539. #{deletedSign,jdbcType=INTEGER},
  540. contacts =
  541. #{contacts,jdbcType=INTEGER},
  542. founder = #{founder,jdbcType=VARCHAR},
  543. contract_id = #{contractId,jdbcType=VARCHAR}
  544. where id = #{id,jdbcType=VARCHAR}
  545. </update>
  546. <select id="findClientApplyListByPage" resultMap="BaseResultMap"
  547. parameterType="String">
  548. select
  549. <include refid="Base_Column_List" />
  550. from patent_info
  551. where deleted_sign = 0
  552. <if test="uid != null">
  553. and uid = #{uid,jdbcType=VARCHAR}
  554. </if>
  555. <if test="patentNumber != null">
  556. and patent_number = #{patentNumber,jdbcType=VARCHAR}
  557. </if>
  558. <if test="patentName != null">
  559. and patent_name like "%"#{patentName,jdbcType=VARCHAR}"%"
  560. </if>
  561. <if test="patentCatagory != null">
  562. and patent_catagory = #{patentCatagory,jdbcType=INTEGER}
  563. </if>
  564. <if test="patentState != nulll">
  565. and patent_state = #{patentState,jdbcType=INTEGER}
  566. </if>
  567. order by serial_number desc
  568. <if test="page_sql!=null">
  569. ${page_sql}
  570. </if>
  571. </select>
  572. <select id="findClentApplyCount" resultType="java.lang.Integer"
  573. parameterType="String">
  574. select count(1)
  575. from patent_info
  576. where deleted_sign = 0
  577. <if test="uid != null">
  578. and uid = #{uid,jdbcType=VARCHAR}
  579. </if>
  580. <if test="patentNumber != null">
  581. and patent_number = #{patentNumber,jdbcType=VARCHAR}
  582. </if>
  583. <if test="patentName != null">
  584. and patent_name like "%"#{patentName,jdbcType=VARCHAR}"%"
  585. </if>
  586. <if test="patentCatagory != null">
  587. and patent_catagory = #{patentCatagory,jdbcType=INTEGER}
  588. </if>
  589. <if test="patentState != nulll">
  590. and patent_state = #{patentState,jdbcType=INTEGER}
  591. </if>
  592. </select>
  593. <select id="findManagePatentListByPage" resultType="com.goafanti.patent.bo.PatentManageListBo"
  594. parameterType="String">
  595. select p.id, p.uid, p.serial_number as serialNumber, p.patent_number
  596. as patentNumber, p.office, p.patent_catagory as patentCatagory,
  597. o.licence_province as locationProvince,
  598. o.unit_name as unitName,
  599. p.patent_name as patentName, p.patent_state as
  600. patentState, p.create_time as
  601. createTime,
  602. p.patent_application_date as
  603. patentApplicationDate, p.authorized_date as authorizedDate,
  604. a.name as
  605. author, ad.name as founder, c.serial_number as contractNumber
  606. from patent_info p
  607. LEFT JOIN organization_identity o on p.uid =
  608. o.uid
  609. LEFT JOIN admin a on a.id = p.author
  610. LEFT JOIN admin ad on ad.id = p.founder
  611. LEFT JOIN contract c on c.id = p.contract_id
  612. <if test="principal != null">
  613. left join contract_log l on p.contract_id=l.cid
  614. </if>
  615. where p.deleted_sign = 0
  616. <if test="principal != null">
  617. and l.principal = #{principal,jdbcType=VARCHAR}
  618. </if>
  619. <if test="contractId != null">
  620. and p.contract_id = #{contractId,jdbcType=VARCHAR}
  621. </if>
  622. <if test="serialNumber != null">
  623. and p.serial_number = #{serialNumber,jdbcType=INTEGER}
  624. </if>
  625. <if test="patentNumber != null">
  626. and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
  627. </if>
  628. <if test="office != null">
  629. and p.office = #{office,jdbcType=VARCHAR}
  630. </if>
  631. <if test="unitName != null">
  632. and o.unit_name= #{unitName,jdbcType=VARCHAR}
  633. </if>
  634. <if test="patentCatagory != null">
  635. and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
  636. </if>
  637. <if test="patentName != null">
  638. and p.patent_name= #{patentName,jdbcType=VARCHAR}
  639. </if>
  640. <if test="patentState != null">
  641. and p.patent_state= #{patentState,jdbcType=INTEGER}
  642. </if>
  643. <if test="cStart != null">
  644. and
  645. p.create_time <![CDATA[ >= ]]>
  646. #{cStart,jdbcType=TIMESTAMP}
  647. </if>
  648. <if test="cEnd != null">
  649. and
  650. p.create_time <![CDATA[ < ]]>
  651. #{cEnd,jdbcType=TIMESTAMP}
  652. </if>
  653. <if test="pStart != null">
  654. and
  655. p.patent_application_date <![CDATA[ >= ]]>
  656. #{pStart,jdbcType=TIMESTAMP}
  657. </if>
  658. <if test="pEnd != null">
  659. and
  660. p.patent_application_date <![CDATA[ < ]]>
  661. #{pEnd,jdbcType=TIMESTAMP}
  662. </if>
  663. <if test="author != null">
  664. and p.author = #{author,jdbcType=VARCHAR}
  665. </if>
  666. <if test="uid != null">
  667. and p.uid = #{uid,jdbcType=VARCHAR}
  668. </if>
  669. <if test="locationProvince != null">
  670. and o.licence_province =
  671. #{locationProvince,jdbcType=INTEGER}
  672. </if>
  673. <if test="principal != null">
  674. group by p.id, o.id
  675. </if>
  676. ORDER BY p.serial_number DESC
  677. <if test="page_sql!=null">
  678. ${page_sql}
  679. </if>
  680. </select>
  681. <select id="findManagePatentCount" resultType="java.lang.Integer"
  682. parameterType="String">
  683. select count(distinct(p.id))
  684. from patent_info p
  685. LEFT JOIN organization_identity o on
  686. p.uid = o.uid
  687. LEFT JOIN admin a on a.id = p.author
  688. <if test="principal != null">
  689. left join contract_log l on p.contract_id=l.cid
  690. </if>
  691. where p.deleted_sign = 0
  692. <if test="principal != null">
  693. and l.principal = #{principal,jdbcType=VARCHAR}
  694. </if>
  695. <if test="contractId != null">
  696. and p.contract_id = #{contractId,jdbcType=VARCHAR}
  697. </if>
  698. <if test="serialNumber != null">
  699. and p.serial_number = #{serialNumber,jdbcType=INTEGER}
  700. </if>
  701. <if test="patentNumber != null">
  702. and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
  703. </if>
  704. <if test="office != null">
  705. and p.office = #{office,jdbcType=VARCHAR}
  706. </if>
  707. <if test="unitName != null">
  708. and o.unit_name= #{unitName,jdbcType=VARCHAR}
  709. </if>
  710. <if test="patentCatagory != null">
  711. and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
  712. </if>
  713. <if test="patentName != null">
  714. and p.patent_name= #{patentName,jdbcType=VARCHAR}
  715. </if>
  716. <if test="patentState != null">
  717. and p.patent_state= #{patentState,jdbcType=INTEGER}
  718. </if>
  719. <if test="cStart != null">
  720. and
  721. p.create_time <![CDATA[ > ]]>
  722. #{cStart,jdbcType=TIMESTAMP}
  723. </if>
  724. <if test="cEnd != null">
  725. and
  726. p.create_time <![CDATA[ < ]]>
  727. #{cEnd,jdbcType=TIMESTAMP}
  728. </if>
  729. <if test="pStart != null">
  730. and
  731. p.patent_application_date <![CDATA[ > ]]>
  732. #{pStart,jdbcType=TIMESTAMP}
  733. </if>
  734. <if test="pEnd != null">
  735. and
  736. p.patent_application_date <![CDATA[ < ]]>
  737. #{pEnd,jdbcType=TIMESTAMP}
  738. </if>
  739. <if test="author != null">
  740. and p.author = #{author,jdbcType=VARCHAR}
  741. </if>
  742. <if test="uid != null">
  743. and p.uid = #{uid,jdbcType=VARCHAR}
  744. </if>
  745. <if test="locationProvince != null">
  746. and
  747. o.licence_province=#{locationProvince,jdbcType=INTEGER}
  748. </if>
  749. </select>
  750. <select id="findManagePendingPaymentListByPage" resultType="com.goafanti.patent.bo.PatentPendingBo"
  751. parameterType="String">
  752. select p.id as pid, p.uid as uid, o.id as oid, c.id as cid,
  753. p.serial_number as serialNumber,
  754. p.patent_number as patentNumber, o.licence_province as locationProvince, o.unit_name
  755. as unitName,
  756. p.patent_catagory as patentCatagory, p.patent_name as patentName, p.patent_state as
  757. patentState,
  758. c.annual_fee_state as annualFeeState, p.authorized_date as authorizedDate
  759. from patent_info p
  760. LEFT JOIN patent_cost c on p.id = c.pid and c.annual_fee_state = 0
  761. LEFT JOIN organization_identity o on p.uid = o.uid
  762. <if test="principal != null">
  763. left join contract_log l on p.contract_id=l.cid
  764. </if>
  765. where p.deleted_sign = 0 and c.annual_fee_state = 0
  766. <if test="principal != null">
  767. and l.principal = #{principal,jdbcType=VARCHAR}
  768. </if>
  769. <if test="locationProvince != null">
  770. and o.licence_province =
  771. #{locationProvince,jdbcType=INTEGER}
  772. </if>
  773. <if test="principal != null">
  774. group by p.id,o.id,c.id
  775. </if>
  776. ORDER BY p.serial_number DESC
  777. <if test="page_sql!=null">
  778. ${page_sql}
  779. </if>
  780. </select>
  781. <select id="findManagePendingPaymentCount" resultType="java.lang.Integer"
  782. parameterType="String">
  783. select count(distinct(p.id))
  784. from patent_info p
  785. INNER JOIN patent_cost c on p.id = c.pid
  786. LEFT JOIN organization_identity o on p.uid = o.id
  787. <if test="principal != null">
  788. left join contract_log l on p.contract_id=l.cid
  789. </if>
  790. where p.deleted_sign = 0 and c.annual_fee_state = 0
  791. <if test="principal != null">
  792. and l.principal = #{principal,jdbcType=VARCHAR}
  793. </if>
  794. <if test="locationProvince != null">
  795. and o.licence_province =
  796. #{locationProvince,jdbcType=INTEGER}
  797. </if>
  798. </select>
  799. <select id="findNoticeOfCorrectionListByPage" parameterType="String"
  800. resultType="com.goafanti.patent.bo.PatentNoticeOfCorrectionBo">
  801. select
  802. p.uid as uid ,
  803. p.id as pid ,
  804. o.id as oid ,
  805. p.serial_number as serialNumber ,
  806. p.patent_number as patentNumber ,
  807. p.patent_name as patentName ,
  808. p.office ,
  809. o.licence_province as locationProvince,
  810. o.unit_name as unitName ,
  811. p.patent_catagory as
  812. patentCatagory ,
  813. p.patent_state as patentState ,
  814. a.name as author ,
  815. p.record_time as
  816. recordTime
  817. FROM patent_info p
  818. LEFT JOIN organization_identity o ON o.uid = p.uid
  819. LEFT JOIN admin a on a.id = p.author
  820. <if test="principal != null">
  821. left join contract_log l on p.contract_id=l.cid
  822. </if>
  823. where p.patent_state in
  824. (6,8) and p.deleted_sign = 0
  825. <if test="principal != null">
  826. and l.principal = #{principal,jdbcType=VARCHAR}
  827. </if>
  828. <if test="serialNumber != null">
  829. and p.serial_number = #{serialNumber,jdbcType=INTEGER}
  830. </if>
  831. <if test="patentNumber != null">
  832. and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
  833. </if>
  834. <if test="office != null">
  835. and p.office = #{office,jdbcType=VARCHAR}
  836. </if>
  837. <if test="unitName != null">
  838. and o.unit_name= #{unitName,jdbcType=VARCHAR}
  839. </if>
  840. <if test="patentCatagory != null">
  841. and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
  842. </if>
  843. <if test="patentName != null">
  844. and p.patent_name= #{patentName,jdbcType=VARCHAR}
  845. </if>
  846. <if test="patentState != null">
  847. and p.patent_state= #{patentState,jdbcType=INTEGER}
  848. </if>
  849. <if test="authorizedDate != null">
  850. and p.authorized_date =
  851. #{authorizedDate,jdbcType=TIMESTAMP}
  852. </if>
  853. <if test="author != null">
  854. and p.author = #{author,jdbcType=VARCHAR}
  855. </if>
  856. <if test="locationProvince != null">
  857. and
  858. o.licence_province=#{locationProvince,jdbcType=INTEGER}
  859. </if>
  860. <if test="principal != null">
  861. group by p.id,o.id
  862. </if>
  863. order by p.serial_number DESC
  864. <if test="page_sql!=null">
  865. ${page_sql}
  866. </if>
  867. </select>
  868. <select id="findNoticeOfCorrectionCount" resultType="java.lang.Integer"
  869. parameterType="String">
  870. select count(distinct(p.id))
  871. FROM patent_info p
  872. LEFT JOIN organization_identity o ON o.uid = p.uid
  873. LEFT JOIN admin a on a.id = p.author
  874. <if test="principal != null">
  875. left join contract_log l on p.contract_id=l.cid
  876. </if>
  877. where p.patent_state in
  878. (6,8) and p.deleted_sign = 0
  879. <if test="principal != null">
  880. and l.principal = #{principal,jdbcType=VARCHAR}
  881. </if>
  882. <if test="serialNumber != null">
  883. and p.serial_number = #{serialNumber,jdbcType=INTEGER}
  884. </if>
  885. <if test="patentNumber != null">
  886. and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
  887. </if>
  888. <if test="office != null">
  889. and p.office = #{office,jdbcType=VARCHAR}
  890. </if>
  891. <if test="unitName != null">
  892. and o.unit_name= #{unitName,jdbcType=VARCHAR}
  893. </if>
  894. <if test="patentCatagory != null">
  895. and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
  896. </if>
  897. <if test="patentName != null">
  898. and p.patent_name= #{patentName,jdbcType=VARCHAR}
  899. </if>
  900. <if test="patentState != null">
  901. and p.patent_state= #{patentState,jdbcType=INTEGER}
  902. </if>
  903. <if test="authorizedDate != null">
  904. and p.authorized_date =
  905. #{authorizedDate,jdbcType=TIMESTAMP}
  906. </if>
  907. <if test="author != null">
  908. and p.author = #{author,jdbcType=VARCHAR}
  909. </if>
  910. <if test="locationProvince != null">
  911. and
  912. o.licence_province=#{locationProvince,jdbcType=INTEGER}
  913. </if>
  914. <if test="principal != null">
  915. group by p.id
  916. </if>
  917. </select>
  918. <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
  919. update patent_info set deleted_sign = 1
  920. where id in
  921. <foreach item="item" index="index" collection="list" open="("
  922. separator="," close=")">
  923. #{item}
  924. </foreach>
  925. </update>
  926. <select id="selectPatentInfoDetail" resultType="com.goafanti.patent.bo.PatentInfoDetailBo"
  927. parameterType="java.lang.String">
  928. select p.id, p.uid, o.unit_name as unitName,o.org_code as orgCode,
  929. o.licence_province as locationProvince,
  930. o.licence_city as locationCity, o.licence_area as locationArea, o.postal_address as postalAddress,
  931. p.contacts, p.author,
  932. p.serial_number as serialNumber , p.patent_number as patentNumber ,
  933. p.patent_name as patentName, p.office,
  934. p.patent_catagory as patentCatagory,p.patent_state as patentState,
  935. p.patent_field as patentField, p.patent_des as patentDes , p.first_inventor_name as
  936. firstInventorName,
  937. p.first_inventor_nationality as firstInventorNationality,
  938. p.first_inventor_id_number as firstInventorIdNumber, p.first_inventor_is_publish as
  939. firstInventorIsPublish,
  940. p.second_inventor_name as secondInventorName , p.second_inventor_nationality as
  941. secondInventorNationality ,
  942. p.second_inventor_is_publish as secondInventorIsPublish, p.third_inventor_name as
  943. thirdInventorName,
  944. p.third_inventor_nationality as thirdInventorNationality, p.third_inventor_is_publish as
  945. thirdInventorIsPublish,
  946. p.patent_prory_statement_url as patentProryStatementUrl ,
  947. p.patent_writing_url as patentWritingUrl ,
  948. p.authorization_notice_url as authorizationNoticeUrl ,
  949. p.patent_certificate_url as patentCertificateUrl
  950. from patent_info p LEFT JOIN organization_identity o on p.uid = o.uid
  951. where p.deleted_sign =0 and p.id = #{id,jdbcType=VARCHAR}
  952. </select>
  953. <select id="selectByPrimaryKeys" parameterType="java.util.List" resultMap="BaseResultMap">
  954. select
  955. <include refid="Base_Column_List" />
  956. from patent_info where id in
  957. <foreach item="item" index="index" collection="list" open="("
  958. separator="," close=")">
  959. #{item}
  960. </foreach>
  961. </select>
  962. <select id="countPatentDone" resultType="java.lang.Integer">
  963. select
  964. count(1) from patent_info
  965. where uid = #{uid,jdbcType=VARCHAR}
  966. and deleted_sign = 0
  967. and patent_state in (12,13)
  968. and authorized_date >=
  969. (
  970. select
  971. str_to_date(CONCAT(#{year,jdbcType=INTEGER}-3,'-01-01'), '%Y-%m-%d %H')
  972. )
  973. and authorized_date <![CDATA[ < ]]>
  974. (
  975. select
  976. str_to_date(CONCAT(#{year,jdbcType=INTEGER},'-01-01'), '%Y-%m-%d %H')
  977. )
  978. </select>
  979. <select id="countPatentUndone" resultType="java.lang.Integer">
  980. select
  981. count(1)
  982. from patent_info
  983. where uid = #{uid,jdbcType=VARCHAR}
  984. and deleted_sign = 0
  985. and patent_state <![CDATA[ < ]]> 12
  986. and authorized_date >=
  987. (
  988. select
  989. str_to_date(CONCAT(#{year,jdbcType=INTEGER}-3,'-01-01'), '%Y-%m-%d %H')
  990. )
  991. and authorized_date <![CDATA[ < ]]>
  992. (
  993. select
  994. str_to_date(CONCAT(#{year,jdbcType=INTEGER},'-01-01'), '%Y-%m-%d %H')
  995. )
  996. </select>
  997. <select id="selectExpireRecord" resultType="com.goafanti.patent.bo.PatentExpireBo">
  998. select
  999. p.id, p.uid, p.patent_name as patentName,
  1000. p.patent_application_date as patentApplicationDate, u.mobile,
  1001. p.serial_number as serialNumber, p.patent_number as patentNumber
  1002. from patent_info p
  1003. LEFT JOIN patent_cost pc on p.id = pc.pid
  1004. LEFT JOIN user u on u.id = p.uid
  1005. where
  1006. p.deleted_sign = 0 and p.patent_state in (12, 13)
  1007. and pc.annual_fee_state = 0
  1008. </select>
  1009. <select id="listContractPatentByContractId" parameterType="java.lang.String" resultType="com.goafanti.patent.bo.PatentContractListBo">
  1010. select
  1011. pi.id, pi.uid, pi.contract_id as contractId, pi.serial_number as serialNumber,
  1012. pi.patent_name as patentName, patent_number as patentNumber, a.name as principal,
  1013. pi.patent_state as patentState, pi.patent_catagory as patentCatagory
  1014. from patent_info pi
  1015. left join admin a on a.id = pi.principal
  1016. where contract_id = #{contractId,jdbcType=VARCHAR}
  1017. </select>
  1018. <insert id="batchInsert" parameterType="com.goafanti.common.model.PatentInfo">
  1019. insert into patent_info (id,
  1020. uid, serial_number,
  1021. patent_number, patent_name, patent_catagory,
  1022. patent_state, patent_field, patent_des,
  1023. patent_prory_statement_url,
  1024. patent_writing_url,
  1025. authorization_notice_url, patent_certificate_url,
  1026. patent_application_date, first_inventor_name,
  1027. first_inventor_nationality, first_inventor_id_number,
  1028. first_inventor_is_publish, second_inventor_name,
  1029. second_inventor_nationality, second_inventor_is_publish,
  1030. third_inventor_name, third_inventor_nationality,
  1031. third_inventor_is_publish, create_time, author, authorized_date,
  1032. office, principal, confirm_state, record_time, deleted_sign, contacts, founder,
  1033. contract_id)
  1034. values
  1035. <foreach item="item" index="index" collection="list" separator=",">
  1036. (
  1037. #{item.id,jdbcType=VARCHAR}, #{item.uid,jdbcType=VARCHAR},
  1038. #{item.serialNumber,jdbcType=INTEGER},
  1039. #{item.patentNumber,jdbcType=VARCHAR},
  1040. #{item.patentName,jdbcType=VARCHAR},
  1041. #{item.patentCatagory,jdbcType=INTEGER},
  1042. #{item.patentState,jdbcType=INTEGER},
  1043. #{item.patentField,jdbcType=INTEGER},
  1044. #{item.patentDes,jdbcType=VARCHAR},
  1045. #{item.patentProryStatementUrl,jdbcType=VARCHAR},
  1046. #{item.patentWritingUrl,jdbcType=VARCHAR},
  1047. #{item.authorizationNoticeUrl,jdbcType=VARCHAR},
  1048. #{item.patentCertificateUrl,jdbcType=VARCHAR},
  1049. #{item.patentApplicationDate,jdbcType=TIMESTAMP},
  1050. #{item.firstInventorName,jdbcType=VARCHAR},
  1051. #{item.firstInventorNationality,jdbcType=VARCHAR},
  1052. #{item.firstInventorIdNumber,jdbcType=VARCHAR},
  1053. #{item.firstInventorIsPublish,jdbcType=INTEGER},
  1054. #{item.secondInventorName,jdbcType=VARCHAR},
  1055. #{item.secondInventorNationality,jdbcType=VARCHAR},
  1056. #{item.secondInventorIsPublish,jdbcType=INTEGER},
  1057. #{item.thirdInventorName,jdbcType=VARCHAR},
  1058. #{item.thirdInventorNationality,jdbcType=VARCHAR},
  1059. #{item.thirdInventorIsPublish,jdbcType=INTEGER},
  1060. #{item.createTime,jdbcType=TIMESTAMP},
  1061. #{item.author,jdbcType=VARCHAR},
  1062. #{item.authorizedDate,jdbcType=TIMESTAMP},
  1063. #{item.office,jdbcType=VARCHAR},
  1064. #{item.principal,jdbcType=VARCHAR},
  1065. #{item.confirmState,jdbcType=INTEGER},
  1066. #{item.recordTime,jdbcType=TIMESTAMP},
  1067. #{item.deletedSign,jdbcType=INTEGER},
  1068. #{item.contacts,jdbcType=INTEGER},
  1069. #{item.founder,jdbcType=VARCHAR},
  1070. #{item.contractId,jdbcType=VARCHAR}
  1071. )
  1072. </foreach>
  1073. </insert>
  1074. <update id="batchDeleteByContractId" parameterType="java.util.List">
  1075. update patent_info set deleted_sign = 1
  1076. where contract_id in
  1077. <foreach item="item" index="index" collection="list" open="("
  1078. separator="," close=")">
  1079. #{item}
  1080. </foreach>
  1081. </update>
  1082. <select id="findPatentInfoNumByUid" parameterType="java.lang.String" resultType="java.lang.Integer">
  1083. select
  1084. count(1)
  1085. from patent_info
  1086. where
  1087. deleted_sign = 0
  1088. and uid = #{uid,jdbcType=VARCHAR}
  1089. </select>
  1090. <select id="findAnnualFeeTaskBo" resultType="com.goafanti.patent.bo.PatentAnnualFeeTaskBo">
  1091. select
  1092. p.patent_application_date as patentApplicationDate,
  1093. pc.id as id
  1094. from
  1095. patent_info p
  1096. left join
  1097. patent_cost pc on p.id = pc.pid
  1098. where pc.annual_fee_state = 1
  1099. </select>
  1100. </mapper>