PatentInfoMapper.xml 30 KB

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