PatentInfoMapper.xml 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996
  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
  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. <if test="principal != null">
  612. left join patent_log l on p.id=l.pid
  613. </if>
  614. where p.deleted_sign = 0
  615. <if test="principal != null">
  616. and l.principal = #{principal,jdbcType=VARCHAR}
  617. </if>
  618. <if test="serialNumber != null">
  619. and p.serial_number = #{serialNumber,jdbcType=INTEGER}
  620. </if>
  621. <if test="patentNumber != null">
  622. and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
  623. </if>
  624. <if test="office != null">
  625. and p.office = #{office,jdbcType=VARCHAR}
  626. </if>
  627. <if test="unitName != null">
  628. and o.unit_name= #{unitName,jdbcType=VARCHAR}
  629. </if>
  630. <if test="patentCatagory != null">
  631. and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
  632. </if>
  633. <if test="patentName != null">
  634. and p.patent_name= #{patentName,jdbcType=VARCHAR}
  635. </if>
  636. <if test="patentState != null">
  637. and p.patent_state= #{patentState,jdbcType=INTEGER}
  638. </if>
  639. <if test="cStart != null">
  640. and
  641. p.create_time <![CDATA[ > ]]>
  642. #{cStart,jdbcType=TIMESTAMP}
  643. </if>
  644. <if test="cEnd != null">
  645. and
  646. p.create_time <![CDATA[ < ]]>
  647. #{cEnd,jdbcType=TIMESTAMP}
  648. </if>
  649. <if test="pStart != null">
  650. and
  651. p.patent_application_date <![CDATA[ > ]]>
  652. #{pStart,jdbcType=TIMESTAMP}
  653. </if>
  654. <if test="pEnd != null">
  655. and
  656. p.patent_application_date <![CDATA[ < ]]>
  657. #{pEnd,jdbcType=TIMESTAMP}
  658. </if>
  659. <if test="author != null">
  660. and p.author = #{author,jdbcType=VARCHAR}
  661. </if>
  662. <if test="uid != null">
  663. and p.uid = #{uid,jdbcType=VARCHAR}
  664. </if>
  665. <if test="locationProvince != null">
  666. and o.licence_province =
  667. #{locationProvince,jdbcType=VARCHAR}
  668. </if>
  669. <if test="principal != null">
  670. group by p.id
  671. </if>
  672. ORDER BY p.serial_number DESC
  673. <if test="page_sql!=null">
  674. ${page_sql}
  675. </if>
  676. </select>
  677. <select id="findManagePatentCount" resultType="java.lang.Integer"
  678. parameterType="String">
  679. select count(1)
  680. from patent_info p
  681. LEFT JOIN organization_identity o on
  682. p.uid = o.uid
  683. LEFT JOIN admin a on a.id = p.author
  684. <if test="principal != null">
  685. left join patent_log l on p.id=l.pid
  686. </if>
  687. where p.deleted_sign = 0
  688. <if test="principal != null">
  689. and l.principal = #{principal,jdbcType=VARCHAR}
  690. </if>
  691. <if test="serialNumber != null">
  692. and p.serial_number = #{serialNumber,jdbcType=INTEGER}
  693. </if>
  694. <if test="patentNumber != null">
  695. and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
  696. </if>
  697. <if test="office != null">
  698. and p.office = #{office,jdbcType=VARCHAR}
  699. </if>
  700. <if test="unitName != null">
  701. and o.unit_name= #{unitName,jdbcType=VARCHAR}
  702. </if>
  703. <if test="patentCatagory != null">
  704. and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
  705. </if>
  706. <if test="patentName != null">
  707. and p.patent_name= #{patentName,jdbcType=VARCHAR}
  708. </if>
  709. <if test="patentState != null">
  710. and p.patent_state= #{patentState,jdbcType=INTEGER}
  711. </if>
  712. <if test="cStart != null">
  713. and
  714. p.create_time <![CDATA[ > ]]>
  715. #{cStart,jdbcType=TIMESTAMP}
  716. </if>
  717. <if test="cEnd != null">
  718. and
  719. p.create_time <![CDATA[ < ]]>
  720. #{cEnd,jdbcType=TIMESTAMP}
  721. </if>
  722. <if test="pStart != null">
  723. and
  724. p.patent_application_date <![CDATA[ > ]]>
  725. #{pStart,jdbcType=TIMESTAMP}
  726. </if>
  727. <if test="pEnd != null">
  728. and
  729. p.patent_application_date <![CDATA[ < ]]>
  730. #{pEnd,jdbcType=TIMESTAMP}
  731. </if>
  732. <if test="author != null">
  733. and p.author = #{author,jdbcType=VARCHAR}
  734. </if>
  735. <if test="uid != null">
  736. and p.uid = #{uid,jdbcType=VARCHAR}
  737. </if>
  738. <if test="locationProvince != null">
  739. and
  740. o.licence_province=#{locationProvince,jdbcType=VARCHAR}
  741. </if>
  742. <if test="principal != null">
  743. group by p.id
  744. </if>
  745. </select>
  746. <select id="findManagePendingPaymentListByPage" resultType="com.goafanti.patent.bo.PatentPendingBo"
  747. parameterType="String">
  748. select p.id as pid, p.uid as uid, o.id as oid, c.id as cid,
  749. p.serial_number as serialNumber,
  750. p.patent_number as patentNumber, o.licence_province as locationProvince, o.unit_name
  751. as unitName,
  752. p.patent_catagory as patentCatagory, p.patent_name as patentName, p.patent_state as
  753. patentState,
  754. c.annual_fee_state as annualFeeState, p.authorized_date as authorizedDate
  755. from patent_info p
  756. LEFT JOIN patent_cost c on p.id = c.pid and c.annual_fee_state = 0
  757. LEFT JOIN organization_identity o on p.uid = o.uid
  758. <if test="principal != null">
  759. left join patent_log l on p.id=l.pid
  760. </if>
  761. where p.deleted_sign = 0 and c.annual_fee_state = 0
  762. <if test="principal != null">
  763. and l.principal = #{principal,jdbcType=VARCHAR}
  764. </if>
  765. <if test="locationProvince != null">
  766. and o.licence_province =
  767. #{locationProvince,jdbcType=VARCHAR}
  768. </if>
  769. <if test="principal != null">
  770. group by p.id
  771. </if>
  772. ORDER BY p.serial_number DESC
  773. <if test="page_sql!=null">
  774. ${page_sql}
  775. </if>
  776. </select>
  777. <select id="findManagePendingPaymentCount" resultType="java.lang.Integer"
  778. parameterType="String">
  779. select count(1)
  780. from patent_info p
  781. INNER JOIN patent_cost c on p.id = c.pid
  782. LEFT JOIN organization_identity o on p.uid = o.id
  783. <if test="principal != null">
  784. left join patent_log l on p.id=l.pid
  785. </if>
  786. where p.deleted_sign = 0 and c.annual_fee_state = 0
  787. <if test="principal != null">
  788. and l.principal = #{principal,jdbcType=VARCHAR}
  789. </if>
  790. <if test="locationProvince != null">
  791. and o.licence_province =
  792. #{locationProvince,jdbcType=VARCHAR}
  793. </if>
  794. <if test="principal != null">
  795. group by p.id
  796. </if>
  797. </select>
  798. <select id="findNoticeOfCorrectionListByPage" parameterType="String"
  799. resultType="com.goafanti.patent.bo.PatentNoticeOfCorrectionBo">
  800. select p.uid as uid ,p.id as pid , o.id as oid , p.serial_number as
  801. serialNumber , p.patent_number as patentNumber ,
  802. p.patent_name as patentName , p.office ,
  803. o.location_province as locationProvince,
  804. o.unit_name as unitName , p.patent_catagory as
  805. patentCatagory ,
  806. p.patent_state as patentState , a.name as author , p.record_time as
  807. recordTime
  808. FROM patent_info p
  809. LEFT JOIN organization_identity o ON o.uid = p.uid
  810. LEFT JOIN admin a on a.id = p.author
  811. <if test="principal != null">
  812. left join patent_log l on p.id=l.pid
  813. </if>
  814. where p.patent_state in
  815. (6,8) and p.deleted_sign = 0
  816. <if test="principal != null">
  817. and l.principal = #{principal,jdbcType=VARCHAR}
  818. </if>
  819. <if test="serialNumber != null">
  820. and p.serial_number = #{serialNumber,jdbcType=INTEGER}
  821. </if>
  822. <if test="patentNumber != null">
  823. and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
  824. </if>
  825. <if test="office != null">
  826. and p.office = #{office,jdbcType=VARCHAR}
  827. </if>
  828. <if test="unitName != null">
  829. and o.unit_name= #{unitName,jdbcType=VARCHAR}
  830. </if>
  831. <if test="patentCatagory != null">
  832. and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
  833. </if>
  834. <if test="patentName != null">
  835. and p.patent_name= #{patentName,jdbcType=VARCHAR}
  836. </if>
  837. <if test="patentState != null">
  838. and p.patent_state= #{patentState,jdbcType=INTEGER}
  839. </if>
  840. <if test="authorizedDate != null">
  841. and p.authorized_date =
  842. #{authorizedDate,jdbcType=TIMESTAMP}
  843. </if>
  844. <if test="author != null">
  845. and p.author = #{author,jdbcType=VARCHAR}
  846. </if>
  847. <if test="locationProvince != null">
  848. and
  849. o.licence_province=#{locationProvince,jdbcType=VARCHAR}
  850. </if>
  851. <if test="principal != null">
  852. group by p.id
  853. </if>
  854. order by p.serial_number DESC
  855. <if test="page_sql!=null">
  856. ${page_sql}
  857. </if>
  858. </select>
  859. <select id="findNoticeOfCorrectionCount" resultType="java.lang.Integer"
  860. parameterType="String">
  861. select count(1)
  862. FROM patent_info p
  863. LEFT JOIN organization_identity o ON o.uid = p.uid
  864. LEFT JOIN admin a on a.id = p.author
  865. <if test="principal != null">
  866. left join patent_log l on p.id=l.pid
  867. </if>
  868. where p.patent_state in
  869. (6,8) and p.deleted_sign = 0
  870. <if test="principal != null">
  871. and l.principal = #{principal,jdbcType=VARCHAR}
  872. </if>
  873. <if test="serialNumber != null">
  874. and p.serial_number = #{serialNumber,jdbcType=INTEGER}
  875. </if>
  876. <if test="patentNumber != null">
  877. and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
  878. </if>
  879. <if test="office != null">
  880. and p.office = #{office,jdbcType=VARCHAR}
  881. </if>
  882. <if test="unitName != null">
  883. and o.unit_name= #{unitName,jdbcType=VARCHAR}
  884. </if>
  885. <if test="patentCatagory != null">
  886. and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
  887. </if>
  888. <if test="patentName != null">
  889. and p.patent_name= #{patentName,jdbcType=VARCHAR}
  890. </if>
  891. <if test="patentState != null">
  892. and p.patent_state= #{patentState,jdbcType=INTEGER}
  893. </if>
  894. <if test="authorizedDate != null">
  895. and p.authorized_date =
  896. #{authorizedDate,jdbcType=TIMESTAMP}
  897. </if>
  898. <if test="author != null">
  899. and p.author = #{author,jdbcType=VARCHAR}
  900. </if>
  901. <if test="locationProvince != null">
  902. and
  903. o.licence_province=#{locationProvince,jdbcType=VARCHAR}
  904. </if>
  905. <if test="principal != null">
  906. group by p.id
  907. </if>
  908. </select>
  909. <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
  910. update patent_info set deleted_sign = 1
  911. where id in
  912. <foreach item="item" index="index" collection="list" open="("
  913. separator="," close=")">
  914. #{item}
  915. </foreach>
  916. </update>
  917. <select id="selectPatentInfoDetail" resultType="com.goafanti.patent.bo.PatentInfoDetailBo"
  918. parameterType="java.lang.String">
  919. select p.id, p.uid, o.unit_name as unitName,o.org_code as orgCode,
  920. o.licence_province as locationProvince,
  921. o.licence_city as locationCity, o.licence_area as locationArea, o.postal_address as postalAddress,
  922. p.contacts, p.author,
  923. p.serial_number as serialNumber , p.patent_number as patentNumber ,
  924. p.patent_name as patentName, p.office,
  925. p.patent_catagory as patentCatagory,p.patent_state as patentState,
  926. p.patent_field as patentField, p.patent_des as patentDes , p.first_inventor_name as
  927. firstInventorName,
  928. p.first_inventor_nationality as firstInventorNationality,
  929. p.first_inventor_id_number as firstInventorIdNumber, p.first_inventor_is_publish as
  930. firstInventorIsPublish,
  931. p.second_inventor_name as secondInventorName , p.second_inventor_nationality as
  932. secondInventorNationality ,
  933. p.second_inventor_is_publish as secondInventorIsPublish, p.third_inventor_name as
  934. thirdInventorName,
  935. p.third_inventor_nationality as thirdInventorNationality, p.third_inventor_is_publish as
  936. thirdInventorIsPublish,
  937. p.patent_prory_statement_url as patentProryStatementUrl ,
  938. p.patent_writing_url as patentWritingUrl ,
  939. p.authorization_notice_url as authorizationNoticeUrl ,
  940. p.patent_certificate_url as patentCertificateUrl
  941. from patent_info p LEFT JOIN organization_identity o on p.uid = o.uid
  942. where p.deleted_sign =0 and p.id = #{id,jdbcType=VARCHAR}
  943. </select>
  944. <select id="selectByPrimaryKeys" parameterType="java.util.List" resultMap="BaseResultMap">
  945. select
  946. <include refid="Base_Column_List" />
  947. from patent_info where id in
  948. <foreach item="item" index="index" collection="list" open="("
  949. separator="," close=")">
  950. #{item}
  951. </foreach>
  952. </select>
  953. <select id="countPatentDone" parameterType="java.lang.String" resultType="java.lang.Integer">
  954. select count(1) from patent_info
  955. where uid = #{uid,jdbcType=VARCHAR}
  956. and deleted_sign = 0 and patent_state in (12,13)
  957. </select>
  958. <select id="countPatentUndone" parameterType="java.lang.String" resultType="java.lang.Integer">
  959. select count(1) from patent_info
  960. where uid = #{uid,jdbcType=VARCHAR}
  961. and deleted_sign = 0 and patent_state <![CDATA[ < ]]> 12
  962. </select>
  963. <select id="selectExpireRecord" resultType="com.goafanti.patent.bo.PatentExpireBO">
  964. select p.id, p.uid, p.patent_name as patentName,
  965. p.patent_application_date as patentApplicationDate, oi.first_mobile as firstMobile
  966. from patent_info p
  967. LEFT JOIN patent_cost pc on p.id = pc.pid
  968. LEFT JOIN organization_identity oi on oi.uid = p.uid
  969. where p.deleted_sign = 0 and p.patent_state in (12, 13)
  970. and pc.annual_fee_state = 0
  971. </select>
  972. </mapper>