PatentInfoMapper.xml 32 KB

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