PatentInfoMapper.xml 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076
  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=VARCHAR}
  672. </if>
  673. <if test="principal != null">
  674. group by p.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(1)
  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=VARCHAR}
  748. </if>
  749. <if test="principal != null">
  750. group by p.id
  751. </if>
  752. </select>
  753. <select id="findManagePendingPaymentListByPage" resultType="com.goafanti.patent.bo.PatentPendingBo"
  754. parameterType="String">
  755. select p.id as pid, p.uid as uid, o.id as oid, c.id as cid,
  756. p.serial_number as serialNumber,
  757. p.patent_number as patentNumber, o.licence_province as locationProvince, o.unit_name
  758. as unitName,
  759. p.patent_catagory as patentCatagory, p.patent_name as patentName, p.patent_state as
  760. patentState,
  761. c.annual_fee_state as annualFeeState, p.authorized_date as authorizedDate
  762. from patent_info p
  763. LEFT JOIN patent_cost c on p.id = c.pid and c.annual_fee_state = 0
  764. LEFT JOIN organization_identity o on p.uid = o.uid
  765. <if test="principal != null">
  766. left join contract_log l on p.contract_id=l.cid
  767. </if>
  768. where p.deleted_sign = 0 and c.annual_fee_state = 0
  769. <if test="principal != null">
  770. and l.principal = #{principal,jdbcType=VARCHAR}
  771. </if>
  772. <if test="locationProvince != null">
  773. and o.licence_province =
  774. #{locationProvince,jdbcType=VARCHAR}
  775. </if>
  776. <if test="principal != null">
  777. group by p.id
  778. </if>
  779. ORDER BY p.serial_number DESC
  780. <if test="page_sql!=null">
  781. ${page_sql}
  782. </if>
  783. </select>
  784. <select id="findManagePendingPaymentCount" resultType="java.lang.Integer"
  785. parameterType="String">
  786. select count(1)
  787. from patent_info p
  788. INNER JOIN patent_cost c on p.id = c.pid
  789. LEFT JOIN organization_identity o on p.uid = o.id
  790. <if test="principal != null">
  791. left join contract_log l on p.contract_id=l.cid
  792. </if>
  793. where p.deleted_sign = 0 and c.annual_fee_state = 0
  794. <if test="principal != null">
  795. and l.principal = #{principal,jdbcType=VARCHAR}
  796. </if>
  797. <if test="locationProvince != null">
  798. and o.licence_province =
  799. #{locationProvince,jdbcType=VARCHAR}
  800. </if>
  801. <if test="principal != null">
  802. group by p.id
  803. </if>
  804. </select>
  805. <select id="findNoticeOfCorrectionListByPage" parameterType="String"
  806. resultType="com.goafanti.patent.bo.PatentNoticeOfCorrectionBo">
  807. select p.uid as uid ,p.id as pid , o.id as oid , p.serial_number as
  808. serialNumber , p.patent_number as patentNumber ,
  809. p.patent_name as patentName , p.office ,
  810. o.location_province as locationProvince,
  811. o.unit_name as unitName , p.patent_catagory as
  812. patentCatagory ,
  813. p.patent_state as patentState , a.name as author , p.record_time as
  814. recordTime
  815. FROM patent_info p
  816. LEFT JOIN organization_identity o ON o.uid = p.uid
  817. LEFT JOIN admin a on a.id = p.author
  818. <if test="principal != null">
  819. left join contract_log l on p.contract_id=l.cid
  820. </if>
  821. where p.patent_state in
  822. (6,8) and p.deleted_sign = 0
  823. <if test="principal != null">
  824. and l.principal = #{principal,jdbcType=VARCHAR}
  825. </if>
  826. <if test="serialNumber != null">
  827. and p.serial_number = #{serialNumber,jdbcType=INTEGER}
  828. </if>
  829. <if test="patentNumber != null">
  830. and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
  831. </if>
  832. <if test="office != null">
  833. and p.office = #{office,jdbcType=VARCHAR}
  834. </if>
  835. <if test="unitName != null">
  836. and o.unit_name= #{unitName,jdbcType=VARCHAR}
  837. </if>
  838. <if test="patentCatagory != null">
  839. and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
  840. </if>
  841. <if test="patentName != null">
  842. and p.patent_name= #{patentName,jdbcType=VARCHAR}
  843. </if>
  844. <if test="patentState != null">
  845. and p.patent_state= #{patentState,jdbcType=INTEGER}
  846. </if>
  847. <if test="authorizedDate != null">
  848. and p.authorized_date =
  849. #{authorizedDate,jdbcType=TIMESTAMP}
  850. </if>
  851. <if test="author != null">
  852. and p.author = #{author,jdbcType=VARCHAR}
  853. </if>
  854. <if test="locationProvince != null">
  855. and
  856. o.licence_province=#{locationProvince,jdbcType=VARCHAR}
  857. </if>
  858. <if test="principal != null">
  859. group by p.id
  860. </if>
  861. order by p.serial_number DESC
  862. <if test="page_sql!=null">
  863. ${page_sql}
  864. </if>
  865. </select>
  866. <select id="findNoticeOfCorrectionCount" resultType="java.lang.Integer"
  867. parameterType="String">
  868. select count(1)
  869. FROM patent_info p
  870. LEFT JOIN organization_identity o ON o.uid = p.uid
  871. LEFT JOIN admin a on a.id = p.author
  872. <if test="principal != null">
  873. left join contract_log l on p.contract_id=l.cid
  874. </if>
  875. where p.patent_state in
  876. (6,8) and p.deleted_sign = 0
  877. <if test="principal != null">
  878. and l.principal = #{principal,jdbcType=VARCHAR}
  879. </if>
  880. <if test="serialNumber != null">
  881. and p.serial_number = #{serialNumber,jdbcType=INTEGER}
  882. </if>
  883. <if test="patentNumber != null">
  884. and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
  885. </if>
  886. <if test="office != null">
  887. and p.office = #{office,jdbcType=VARCHAR}
  888. </if>
  889. <if test="unitName != null">
  890. and o.unit_name= #{unitName,jdbcType=VARCHAR}
  891. </if>
  892. <if test="patentCatagory != null">
  893. and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
  894. </if>
  895. <if test="patentName != null">
  896. and p.patent_name= #{patentName,jdbcType=VARCHAR}
  897. </if>
  898. <if test="patentState != null">
  899. and p.patent_state= #{patentState,jdbcType=INTEGER}
  900. </if>
  901. <if test="authorizedDate != null">
  902. and p.authorized_date =
  903. #{authorizedDate,jdbcType=TIMESTAMP}
  904. </if>
  905. <if test="author != null">
  906. and p.author = #{author,jdbcType=VARCHAR}
  907. </if>
  908. <if test="locationProvince != null">
  909. and
  910. o.licence_province=#{locationProvince,jdbcType=VARCHAR}
  911. </if>
  912. <if test="principal != null">
  913. group by p.id
  914. </if>
  915. </select>
  916. <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
  917. update patent_info set deleted_sign = 1
  918. where id in
  919. <foreach item="item" index="index" collection="list" open="("
  920. separator="," close=")">
  921. #{item}
  922. </foreach>
  923. </update>
  924. <select id="selectPatentInfoDetail" resultType="com.goafanti.patent.bo.PatentInfoDetailBo"
  925. parameterType="java.lang.String">
  926. select p.id, p.uid, o.unit_name as unitName,o.org_code as orgCode,
  927. o.licence_province as locationProvince,
  928. o.licence_city as locationCity, o.licence_area as locationArea, o.postal_address as postalAddress,
  929. p.contacts, p.author,
  930. p.serial_number as serialNumber , p.patent_number as patentNumber ,
  931. p.patent_name as patentName, p.office,
  932. p.patent_catagory as patentCatagory,p.patent_state as patentState,
  933. p.patent_field as patentField, p.patent_des as patentDes , p.first_inventor_name as
  934. firstInventorName,
  935. p.first_inventor_nationality as firstInventorNationality,
  936. p.first_inventor_id_number as firstInventorIdNumber, p.first_inventor_is_publish as
  937. firstInventorIsPublish,
  938. p.second_inventor_name as secondInventorName , p.second_inventor_nationality as
  939. secondInventorNationality ,
  940. p.second_inventor_is_publish as secondInventorIsPublish, p.third_inventor_name as
  941. thirdInventorName,
  942. p.third_inventor_nationality as thirdInventorNationality, p.third_inventor_is_publish as
  943. thirdInventorIsPublish,
  944. p.patent_prory_statement_url as patentProryStatementUrl ,
  945. p.patent_writing_url as patentWritingUrl ,
  946. p.authorization_notice_url as authorizationNoticeUrl ,
  947. p.patent_certificate_url as patentCertificateUrl
  948. from patent_info p LEFT JOIN organization_identity o on p.uid = o.uid
  949. where p.deleted_sign =0 and p.id = #{id,jdbcType=VARCHAR}
  950. </select>
  951. <select id="selectByPrimaryKeys" parameterType="java.util.List" resultMap="BaseResultMap">
  952. select
  953. <include refid="Base_Column_List" />
  954. from patent_info where id in
  955. <foreach item="item" index="index" collection="list" open="("
  956. separator="," close=")">
  957. #{item}
  958. </foreach>
  959. </select>
  960. <select id="countPatentDone" parameterType="java.lang.String" resultType="java.lang.Integer">
  961. select count(1) from patent_info
  962. where uid = #{uid,jdbcType=VARCHAR}
  963. and deleted_sign = 0 and patent_state in (12,13)
  964. </select>
  965. <select id="countPatentUndone" parameterType="java.lang.String" resultType="java.lang.Integer">
  966. select count(1) from patent_info
  967. where uid = #{uid,jdbcType=VARCHAR}
  968. and deleted_sign = 0 and patent_state <![CDATA[ < ]]> 12
  969. </select>
  970. <select id="selectExpireRecord" resultType="com.goafanti.patent.bo.PatentExpireBO">
  971. select p.id, p.uid, p.patent_name as patentName,
  972. p.patent_application_date as patentApplicationDate, oi.first_mobile as firstMobile
  973. from patent_info p
  974. LEFT JOIN patent_cost pc on p.id = pc.pid
  975. LEFT JOIN organization_identity oi on oi.uid = p.uid
  976. where p.deleted_sign = 0 and p.patent_state in (12, 13)
  977. and pc.annual_fee_state = 0
  978. </select>
  979. <select id="listContractPatentByContractId" parameterType="java.lang.String" resultType="com.goafanti.patent.bo.PatentContractListBo">
  980. select
  981. pi.id, pi.uid, pi.contract_id as contractId, pi.serial_number as serialNumber,
  982. pi.patent_name as patentName, patent_number as patentNumber, a.name as principal,
  983. pi.patent_state as patentState, pi.patent_catagory as patentCatagory
  984. from patent_info pi
  985. left join admin a on a.id = pi.principal
  986. where contract_id = #{contractId,jdbcType=VARCHAR}
  987. </select>
  988. <insert id="batchInsert" parameterType="com.goafanti.common.model.PatentInfo">
  989. insert into patent_info (id,
  990. uid, serial_number,
  991. patent_number, patent_name, patent_catagory,
  992. patent_state, patent_field, patent_des,
  993. patent_prory_statement_url,
  994. patent_writing_url,
  995. authorization_notice_url, patent_certificate_url,
  996. patent_application_date, first_inventor_name,
  997. first_inventor_nationality, first_inventor_id_number,
  998. first_inventor_is_publish, second_inventor_name,
  999. second_inventor_nationality, second_inventor_is_publish,
  1000. third_inventor_name, third_inventor_nationality,
  1001. third_inventor_is_publish, create_time, author, authorized_date,
  1002. office, principal, confirm_state, record_time, deleted_sign, contacts, founder,
  1003. contract_id)
  1004. values
  1005. <foreach item="item" index="index" collection="list" separator=",">
  1006. (
  1007. #{item.id,jdbcType=VARCHAR}, #{item.uid,jdbcType=VARCHAR},
  1008. #{item.serialNumber,jdbcType=INTEGER},
  1009. #{item.patentNumber,jdbcType=VARCHAR},
  1010. #{item.patentName,jdbcType=VARCHAR},
  1011. #{item.patentCatagory,jdbcType=INTEGER},
  1012. #{item.patentState,jdbcType=INTEGER},
  1013. #{item.patentField,jdbcType=INTEGER},
  1014. #{item.patentDes,jdbcType=VARCHAR},
  1015. #{item.patentProryStatementUrl,jdbcType=VARCHAR},
  1016. #{item.patentWritingUrl,jdbcType=VARCHAR},
  1017. #{item.authorizationNoticeUrl,jdbcType=VARCHAR},
  1018. #{item.patentCertificateUrl,jdbcType=VARCHAR},
  1019. #{item.patentApplicationDate,jdbcType=TIMESTAMP},
  1020. #{item.firstInventorName,jdbcType=VARCHAR},
  1021. #{item.firstInventorNationality,jdbcType=VARCHAR},
  1022. #{item.firstInventorIdNumber,jdbcType=VARCHAR},
  1023. #{item.firstInventorIsPublish,jdbcType=INTEGER},
  1024. #{item.secondInventorName,jdbcType=VARCHAR},
  1025. #{item.secondInventorNationality,jdbcType=VARCHAR},
  1026. #{item.secondInventorIsPublish,jdbcType=INTEGER},
  1027. #{item.thirdInventorName,jdbcType=VARCHAR},
  1028. #{item.thirdInventorNationality,jdbcType=VARCHAR},
  1029. #{item.thirdInventorIsPublish,jdbcType=INTEGER},
  1030. #{item.createTime,jdbcType=TIMESTAMP},
  1031. #{item.author,jdbcType=VARCHAR},
  1032. #{item.authorizedDate,jdbcType=TIMESTAMP},
  1033. #{item.office,jdbcType=VARCHAR},
  1034. #{item.principal,jdbcType=VARCHAR},
  1035. #{item.confirmState,jdbcType=INTEGER},
  1036. #{item.recordTime,jdbcType=TIMESTAMP},
  1037. #{item.deletedSign,jdbcType=INTEGER},
  1038. #{item.contacts,jdbcType=INTEGER},
  1039. #{item.founder,jdbcType=VARCHAR},
  1040. #{item.contractId,jdbcType=VARCHAR}
  1041. )
  1042. </foreach>
  1043. </insert>
  1044. <update id="batchDeleteByContractId" parameterType="java.util.List">
  1045. update patent_info set deleted_sign = 1
  1046. where contract_id in
  1047. <foreach item="item" index="index" collection="list" open="("
  1048. separator="," close=")">
  1049. #{item}
  1050. </foreach>
  1051. </update>
  1052. </mapper>