AchievementMapper.xml 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240
  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.AchievementMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.Achievement">
  5. <id column="id" jdbcType="VARCHAR" property="id" />
  6. <result column="serial_number" jdbcType="INTEGER" property="serialNumber" />
  7. <result column="data_category" jdbcType="INTEGER" property="dataCategory" />
  8. <result column="name" jdbcType="VARCHAR" property="name" />
  9. <result column="keyword" jdbcType="VARCHAR" property="keyword" />
  10. <result column="category" jdbcType="INTEGER" property="category" />
  11. <result column="summary" jdbcType="VARCHAR" property="summary" />
  12. <result column="introduction" jdbcType="VARCHAR" property="introduction" />
  13. <result column="technical_picture_url" jdbcType="VARCHAR" property="technicalPictureUrl" />
  14. <result column="field_a" jdbcType="INTEGER" property="fieldA" />
  15. <result column="field_b" jdbcType="INTEGER" property="fieldB" />
  16. <result column="field_c" jdbcType="INTEGER" property="fieldC" />
  17. <result column="maturity" jdbcType="INTEGER" property="maturity" />
  18. <result column="maturity_picture_url" jdbcType="LONGVARCHAR" property="maturityPictureUrl" />
  19. <result column="maturity_text_file_url" jdbcType="VARCHAR" property="maturityTextFileUrl" />
  20. <result column="maturity_video_url" jdbcType="VARCHAR" property="maturityVideoUrl" />
  21. <result column="innovation" jdbcType="INTEGER" property="innovation" />
  22. <result column="owner_id" jdbcType="VARCHAR" property="ownerId" />
  23. <result column="owner_name" jdbcType="VARCHAR" property="ownerName" />
  24. <result column="owner_type" jdbcType="INTEGER" property="ownerType" />
  25. <result column="owner_id_number" jdbcType="VARCHAR" property="ownerIdNumber" />
  26. <result column="owner_mobile" jdbcType="VARCHAR" property="ownerMobile" />
  27. <result column="owner_email" jdbcType="VARCHAR" property="ownerEmail" />
  28. <result column="owner_postal_address" jdbcType="VARCHAR" property="ownerPostalAddress" />
  29. <result column="cooperation_mode" jdbcType="INTEGER" property="cooperationMode" />
  30. <result column="transfer_mode" jdbcType="INTEGER" property="transferMode" />
  31. <result column="bargaining_mode" jdbcType="INTEGER" property="bargainingMode" />
  32. <result column="transfer_price" jdbcType="DECIMAL" property="transferPrice" />
  33. <result column="technical_scene" jdbcType="VARCHAR" property="technicalScene" />
  34. <result column="breakthrough" jdbcType="VARCHAR" property="breakthrough" />
  35. <result column="patent_case" jdbcType="VARCHAR" property="patentCase" />
  36. <result column="awards" jdbcType="VARCHAR" property="awards" />
  37. <result column="team_des" jdbcType="VARCHAR" property="teamDes" />
  38. <result column="parameter" jdbcType="VARCHAR" property="parameter" />
  39. <result column="tech_plan_url" jdbcType="VARCHAR" property="techPlanUrl" />
  40. <result column="business_plan_url" jdbcType="VARCHAR" property="businessPlanUrl" />
  41. <result column="org_id" jdbcType="VARCHAR" property="orgId" />
  42. <result column="org_name" jdbcType="VARCHAR" property="orgName" />
  43. <result column="org_address" jdbcType="VARCHAR" property="orgAddress" />
  44. <result column="org_email" jdbcType="VARCHAR" property="orgEmail" />
  45. <result column="org_contacts" jdbcType="VARCHAR" property="orgContacts" />
  46. <result column="org_contacts_mobile" jdbcType="VARCHAR" property="orgContactsMobile" />
  47. <result column="contacts" jdbcType="INTEGER" property="contacts" />
  48. <result column="manager_id" jdbcType="VARCHAR" property="managerId" />
  49. <result column="salesman_id" jdbcType="VARCHAR" property="salesmanId" />
  50. <result column="status" jdbcType="INTEGER" property="status" />
  51. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  52. <result column="release_status" jdbcType="INTEGER" property="releaseStatus" />
  53. <result column="release_date" jdbcType="TIMESTAMP" property="releaseDate" />
  54. <result column="deleted_sign" jdbcType="INTEGER" property="deletedSign" />
  55. <result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
  56. <result column="tech_broker_id" jdbcType="VARCHAR" property="techBrokerId" />
  57. </resultMap>
  58. <sql id="Base_Column_List">
  59. id, serial_number, data_category, name, keyword, category, summary, introduction,
  60. technical_picture_url, field_a, field_b, field_c, maturity, maturity_picture_url,
  61. maturity_text_file_url, maturity_video_url, innovation, owner_id, owner_name, owner_type, owner_id_number,
  62. owner_mobile, owner_email, owner_postal_address, cooperation_mode, transfer_mode,
  63. bargaining_mode, transfer_price, technical_scene, breakthrough, patent_case, awards,
  64. team_des, parameter, tech_plan_url, business_plan_url, org_id, org_name, org_address,
  65. org_email, org_contacts, org_contacts_mobile, contacts, manager_id, salesman_id,
  66. status, create_time, release_status, release_date, deleted_sign, audit_status, tech_broker_id
  67. </sql>
  68. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  69. select
  70. <include refid="Base_Column_List" />
  71. from achievement
  72. where id = #{id,jdbcType=VARCHAR}
  73. </select>
  74. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  75. delete from achievement
  76. where id = #{id,jdbcType=VARCHAR}
  77. </delete>
  78. <insert id="insert" parameterType="com.goafanti.common.model.Achievement">
  79. insert into achievement (id, serial_number, data_category,
  80. name, keyword, category,
  81. summary, introduction, technical_picture_url,
  82. field_a, field_b, field_c,
  83. maturity, maturity_picture_url, maturity_text_file_url,
  84. maturity_video_url, innovation, owner_id, owner_name,
  85. owner_type, owner_id_number, owner_mobile,
  86. owner_email, owner_postal_address, cooperation_mode,
  87. transfer_mode, bargaining_mode, transfer_price,
  88. technical_scene, breakthrough, patent_case,
  89. awards, team_des, parameter,
  90. tech_plan_url, business_plan_url, org_id,
  91. org_name, org_address, org_email,
  92. org_contacts, org_contacts_mobile, contacts,
  93. manager_id, salesman_id, status,
  94. create_time, release_status, release_date,
  95. deleted_sign, audit_status, tech_broker_id)
  96. values (#{id,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, #{dataCategory,jdbcType=INTEGER},
  97. #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{category,jdbcType=INTEGER},
  98. #{summary,jdbcType=VARCHAR}, #{introduction,jdbcType=VARCHAR}, #{technicalPictureUrl,jdbcType=VARCHAR},
  99. #{fieldA,jdbcType=INTEGER}, #{fieldB,jdbcType=INTEGER}, #{fieldC,jdbcType=INTEGER},
  100. #{maturity,jdbcType=INTEGER}, #{maturityPictureUrl,jdbcType=LONGVARCHAR}, #{maturityTextFileUrl,jdbcType=VARCHAR},
  101. #{maturityVideoUrl,jdbcType=VARCHAR}, #{innovation,jdbcType=INTEGER}, #{ownerId,jdbcType=VARCHAR}, #{ownerName,jdbcType=VARCHAR},
  102. #{ownerType,jdbcType=INTEGER}, #{ownerIdNumber,jdbcType=VARCHAR}, #{ownerMobile,jdbcType=VARCHAR},
  103. #{ownerEmail,jdbcType=VARCHAR}, #{ownerPostalAddress,jdbcType=VARCHAR}, #{cooperationMode,jdbcType=INTEGER},
  104. #{transferMode,jdbcType=INTEGER}, #{bargainingMode,jdbcType=INTEGER}, #{transferPrice,jdbcType=DECIMAL},
  105. #{technicalScene,jdbcType=VARCHAR}, #{breakthrough,jdbcType=VARCHAR}, #{patentCase,jdbcType=VARCHAR},
  106. #{awards,jdbcType=VARCHAR}, #{teamDes,jdbcType=VARCHAR}, #{parameter,jdbcType=VARCHAR},
  107. #{techPlanUrl,jdbcType=VARCHAR}, #{businessPlanUrl,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR},
  108. #{orgName,jdbcType=VARCHAR}, #{orgAddress,jdbcType=VARCHAR}, #{orgEmail,jdbcType=VARCHAR},
  109. #{orgContacts,jdbcType=VARCHAR}, #{orgContactsMobile,jdbcType=VARCHAR}, #{contacts,jdbcType=INTEGER},
  110. #{managerId,jdbcType=VARCHAR}, #{salesmanId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
  111. #{createTime,jdbcType=TIMESTAMP}, #{releaseStatus,jdbcType=INTEGER}, #{releaseDate,jdbcType=TIMESTAMP},
  112. #{deletedSign,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER}, #{techBrokerId,jdbcType=VARCHAR})
  113. </insert>
  114. <insert id="insertSelective" parameterType="com.goafanti.common.model.Achievement">
  115. insert into achievement
  116. <trim prefix="(" suffix=")" suffixOverrides=",">
  117. <if test="id != null">
  118. id,
  119. </if>
  120. <if test="serialNumber != null">
  121. serial_number,
  122. </if>
  123. <if test="dataCategory != null">
  124. data_category,
  125. </if>
  126. <if test="name != null">
  127. name,
  128. </if>
  129. <if test="keyword != null">
  130. keyword,
  131. </if>
  132. <if test="category != null">
  133. category,
  134. </if>
  135. <if test="summary != null">
  136. summary,
  137. </if>
  138. <if test="introduction != null">
  139. introduction,
  140. </if>
  141. <if test="technicalPictureUrl != null">
  142. technical_picture_url,
  143. </if>
  144. <if test="fieldA != null">
  145. field_a,
  146. </if>
  147. <if test="fieldB != null">
  148. field_b,
  149. </if>
  150. <if test="fieldC != null">
  151. field_c,
  152. </if>
  153. <if test="maturity != null">
  154. maturity,
  155. </if>
  156. <if test="maturityPictureUrl != null">
  157. maturity_picture_url,
  158. </if>
  159. <if test="maturityTextFileUrl != null">
  160. maturity_text_file_url,
  161. </if>
  162. <if test="maturityVideoUrl != null">
  163. maturity_video_url,
  164. </if>
  165. <if test="innovation != null">
  166. innovation,
  167. </if>
  168. <if test="ownerId != null">
  169. owner_id,
  170. </if>
  171. <if test="ownerName != null">
  172. owner_name,
  173. </if>
  174. <if test="ownerType != null">
  175. owner_type,
  176. </if>
  177. <if test="ownerIdNumber != null">
  178. owner_id_number,
  179. </if>
  180. <if test="ownerMobile != null">
  181. owner_mobile,
  182. </if>
  183. <if test="ownerEmail != null">
  184. owner_email,
  185. </if>
  186. <if test="ownerPostalAddress != null">
  187. owner_postal_address,
  188. </if>
  189. <if test="cooperationMode != null">
  190. cooperation_mode,
  191. </if>
  192. <if test="transferMode != null">
  193. transfer_mode,
  194. </if>
  195. <if test="bargainingMode != null">
  196. bargaining_mode,
  197. </if>
  198. <if test="transferPrice != null">
  199. transfer_price,
  200. </if>
  201. <if test="technicalScene != null">
  202. technical_scene,
  203. </if>
  204. <if test="breakthrough != null">
  205. breakthrough,
  206. </if>
  207. <if test="patentCase != null">
  208. patent_case,
  209. </if>
  210. <if test="awards != null">
  211. awards,
  212. </if>
  213. <if test="teamDes != null">
  214. team_des,
  215. </if>
  216. <if test="parameter != null">
  217. parameter,
  218. </if>
  219. <if test="techPlanUrl != null">
  220. tech_plan_url,
  221. </if>
  222. <if test="businessPlanUrl != null">
  223. business_plan_url,
  224. </if>
  225. <if test="orgId != null">
  226. org_id,
  227. </if>
  228. <if test="orgName != null">
  229. org_name,
  230. </if>
  231. <if test="orgAddress != null">
  232. org_address,
  233. </if>
  234. <if test="orgEmail != null">
  235. org_email,
  236. </if>
  237. <if test="orgContacts != null">
  238. org_contacts,
  239. </if>
  240. <if test="orgContactsMobile != null">
  241. org_contacts_mobile,
  242. </if>
  243. <if test="contacts != null">
  244. contacts,
  245. </if>
  246. <if test="managerId != null">
  247. manager_id,
  248. </if>
  249. <if test="salesmanId != null">
  250. salesman_id,
  251. </if>
  252. <if test="status != null">
  253. status,
  254. </if>
  255. <if test="createTime != null">
  256. create_time,
  257. </if>
  258. <if test="releaseStatus != null">
  259. release_status,
  260. </if>
  261. <if test="releaseDate != null">
  262. release_date,
  263. </if>
  264. <if test="deletedSign != null">
  265. deleted_sign,
  266. </if>
  267. <if test="auditStatus != null">
  268. audit_status,
  269. </if>
  270. <if test="techBrokerId != null">
  271. tech_broker_id,
  272. </if>
  273. </trim>
  274. <trim prefix="values (" suffix=")" suffixOverrides=",">
  275. <if test="id != null">
  276. #{id,jdbcType=VARCHAR},
  277. </if>
  278. <if test="serialNumber != null">
  279. #{serialNumber,jdbcType=INTEGER},
  280. </if>
  281. <if test="dataCategory != null">
  282. #{dataCategory,jdbcType=INTEGER},
  283. </if>
  284. <if test="name != null">
  285. #{name,jdbcType=VARCHAR},
  286. </if>
  287. <if test="keyword != null">
  288. #{keyword,jdbcType=VARCHAR},
  289. </if>
  290. <if test="category != null">
  291. #{category,jdbcType=INTEGER},
  292. </if>
  293. <if test="summary != null">
  294. #{summary,jdbcType=VARCHAR},
  295. </if>
  296. <if test="introduction != null">
  297. #{introduction,jdbcType=VARCHAR},
  298. </if>
  299. <if test="technicalPictureUrl != null">
  300. #{technicalPictureUrl,jdbcType=VARCHAR},
  301. </if>
  302. <if test="fieldA != null">
  303. #{fieldA,jdbcType=INTEGER},
  304. </if>
  305. <if test="fieldB != null">
  306. #{fieldB,jdbcType=INTEGER},
  307. </if>
  308. <if test="fieldC != null">
  309. #{fieldC,jdbcType=INTEGER},
  310. </if>
  311. <if test="maturity != null">
  312. #{maturity,jdbcType=INTEGER},
  313. </if>
  314. <if test="maturityPictureUrl != null">
  315. #{maturityPictureUrl,jdbcType=LONGVARCHAR},
  316. </if>
  317. <if test="maturityTextFileUrl != null">
  318. #{maturityTextFileUrl,jdbcType=VARCHAR},
  319. </if>
  320. <if test="maturityVideoUrl != null">
  321. #{maturityVideoUrl,jdbcType=VARCHAR},
  322. </if>
  323. <if test="innovation != null">
  324. #{innovation,jdbcType=INTEGER},
  325. </if>
  326. <if test="ownerId != null">
  327. #{ownerId,jdbcType=VARCHAR},
  328. </if>
  329. <if test="ownerName != null">
  330. #{ownerName,jdbcType=VARCHAR},
  331. </if>
  332. <if test="ownerType != null">
  333. #{ownerType,jdbcType=INTEGER},
  334. </if>
  335. <if test="ownerIdNumber != null">
  336. #{ownerIdNumber,jdbcType=VARCHAR},
  337. </if>
  338. <if test="ownerMobile != null">
  339. #{ownerMobile,jdbcType=VARCHAR},
  340. </if>
  341. <if test="ownerEmail != null">
  342. #{ownerEmail,jdbcType=VARCHAR},
  343. </if>
  344. <if test="ownerPostalAddress != null">
  345. #{ownerPostalAddress,jdbcType=VARCHAR},
  346. </if>
  347. <if test="cooperationMode != null">
  348. #{cooperationMode,jdbcType=INTEGER},
  349. </if>
  350. <if test="transferMode != null">
  351. #{transferMode,jdbcType=INTEGER},
  352. </if>
  353. <if test="bargainingMode != null">
  354. #{bargainingMode,jdbcType=INTEGER},
  355. </if>
  356. <if test="transferPrice != null">
  357. #{transferPrice,jdbcType=DECIMAL},
  358. </if>
  359. <if test="technicalScene != null">
  360. #{technicalScene,jdbcType=VARCHAR},
  361. </if>
  362. <if test="breakthrough != null">
  363. #{breakthrough,jdbcType=VARCHAR},
  364. </if>
  365. <if test="patentCase != null">
  366. #{patentCase,jdbcType=VARCHAR},
  367. </if>
  368. <if test="awards != null">
  369. #{awards,jdbcType=VARCHAR},
  370. </if>
  371. <if test="teamDes != null">
  372. #{teamDes,jdbcType=VARCHAR},
  373. </if>
  374. <if test="parameter != null">
  375. #{parameter,jdbcType=VARCHAR},
  376. </if>
  377. <if test="techPlanUrl != null">
  378. #{techPlanUrl,jdbcType=VARCHAR},
  379. </if>
  380. <if test="businessPlanUrl != null">
  381. #{businessPlanUrl,jdbcType=VARCHAR},
  382. </if>
  383. <if test="orgId != null">
  384. #{orgId,jdbcType=VARCHAR},
  385. </if>
  386. <if test="orgName != null">
  387. #{orgName,jdbcType=VARCHAR},
  388. </if>
  389. <if test="orgAddress != null">
  390. #{orgAddress,jdbcType=VARCHAR},
  391. </if>
  392. <if test="orgEmail != null">
  393. #{orgEmail,jdbcType=VARCHAR},
  394. </if>
  395. <if test="orgContacts != null">
  396. #{orgContacts,jdbcType=VARCHAR},
  397. </if>
  398. <if test="orgContactsMobile != null">
  399. #{orgContactsMobile,jdbcType=VARCHAR},
  400. </if>
  401. <if test="contacts != null">
  402. #{contacts,jdbcType=INTEGER},
  403. </if>
  404. <if test="managerId != null">
  405. #{managerId,jdbcType=VARCHAR},
  406. </if>
  407. <if test="salesmanId != null">
  408. #{salesmanId,jdbcType=VARCHAR},
  409. </if>
  410. <if test="status != null">
  411. #{status,jdbcType=INTEGER},
  412. </if>
  413. <if test="createTime != null">
  414. #{createTime,jdbcType=TIMESTAMP},
  415. </if>
  416. <if test="releaseStatus != null">
  417. #{releaseStatus,jdbcType=INTEGER},
  418. </if>
  419. <if test="releaseDate != null">
  420. #{releaseDate,jdbcType=TIMESTAMP},
  421. </if>
  422. <if test="deletedSign != null">
  423. #{deletedSign,jdbcType=INTEGER},
  424. </if>
  425. <if test="auditStatus != null">
  426. #{auditStatus,jdbcType=INTEGER},
  427. </if>
  428. <if test="techBrokerId != null">
  429. #{techBrokerId,jdbcType=VARCHAR},
  430. </if>
  431. </trim>
  432. </insert>
  433. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Achievement">
  434. update achievement
  435. <set>
  436. <if test="serialNumber != null">
  437. serial_number = #{serialNumber,jdbcType=INTEGER},
  438. </if>
  439. <if test="dataCategory != null">
  440. data_category = #{dataCategory,jdbcType=INTEGER},
  441. </if>
  442. <if test="name != null">
  443. name = #{name,jdbcType=VARCHAR},
  444. </if>
  445. <if test="keyword != null">
  446. keyword = #{keyword,jdbcType=VARCHAR},
  447. </if>
  448. <if test="category != null">
  449. category = #{category,jdbcType=INTEGER},
  450. </if>
  451. <if test="summary != null">
  452. summary = #{summary,jdbcType=VARCHAR},
  453. </if>
  454. <if test="introduction != null">
  455. introduction = #{introduction,jdbcType=VARCHAR},
  456. </if>
  457. <if test="technicalPictureUrl != null">
  458. technical_picture_url = #{technicalPictureUrl,jdbcType=VARCHAR},
  459. </if>
  460. <if test="fieldA != null">
  461. field_a = #{fieldA,jdbcType=INTEGER},
  462. </if>
  463. <if test="fieldB != null">
  464. field_b = #{fieldB,jdbcType=INTEGER},
  465. </if>
  466. <if test="fieldC != null">
  467. field_c = #{fieldC,jdbcType=INTEGER},
  468. </if>
  469. <if test="maturity != null">
  470. maturity = #{maturity,jdbcType=INTEGER},
  471. </if>
  472. <if test="maturityPictureUrl != null">
  473. maturity_picture_url = #{maturityPictureUrl,jdbcType=LONGVARCHAR},
  474. </if>
  475. <if test="maturityTextFileUrl != null">
  476. maturity_text_file_url = #{maturityTextFileUrl,jdbcType=VARCHAR},
  477. </if>
  478. <if test="maturityVideoUrl != null">
  479. maturity_video_url = #{maturityVideoUrl,jdbcType=VARCHAR},
  480. </if>
  481. <if test="innovation != null">
  482. innovation = #{innovation,jdbcType=INTEGER},
  483. </if>
  484. <if test="ownerId != null">
  485. owner_id = #{ownerId,jdbcType=VARCHAR},
  486. </if>
  487. <if test="ownerName != null">
  488. owner_name = #{ownerName,jdbcType=VARCHAR},
  489. </if>
  490. <if test="ownerType != null">
  491. owner_type = #{ownerType,jdbcType=INTEGER},
  492. </if>
  493. <if test="ownerIdNumber != null">
  494. owner_id_number = #{ownerIdNumber,jdbcType=VARCHAR},
  495. </if>
  496. <if test="ownerMobile != null">
  497. owner_mobile = #{ownerMobile,jdbcType=VARCHAR},
  498. </if>
  499. <if test="ownerEmail != null">
  500. owner_email = #{ownerEmail,jdbcType=VARCHAR},
  501. </if>
  502. <if test="ownerPostalAddress != null">
  503. owner_postal_address = #{ownerPostalAddress,jdbcType=VARCHAR},
  504. </if>
  505. <if test="cooperationMode != null">
  506. cooperation_mode = #{cooperationMode,jdbcType=INTEGER},
  507. </if>
  508. <if test="transferMode != null">
  509. transfer_mode = #{transferMode,jdbcType=INTEGER},
  510. </if>
  511. <if test="bargainingMode != null">
  512. bargaining_mode = #{bargainingMode,jdbcType=INTEGER},
  513. </if>
  514. <if test="transferPrice != null">
  515. transfer_price = #{transferPrice,jdbcType=DECIMAL},
  516. </if>
  517. <if test="technicalScene != null">
  518. technical_scene = #{technicalScene,jdbcType=VARCHAR},
  519. </if>
  520. <if test="breakthrough != null">
  521. breakthrough = #{breakthrough,jdbcType=VARCHAR},
  522. </if>
  523. <if test="patentCase != null">
  524. patent_case = #{patentCase,jdbcType=VARCHAR},
  525. </if>
  526. <if test="awards != null">
  527. awards = #{awards,jdbcType=VARCHAR},
  528. </if>
  529. <if test="teamDes != null">
  530. team_des = #{teamDes,jdbcType=VARCHAR},
  531. </if>
  532. <if test="parameter != null">
  533. parameter = #{parameter,jdbcType=VARCHAR},
  534. </if>
  535. <if test="techPlanUrl != null">
  536. tech_plan_url = #{techPlanUrl,jdbcType=VARCHAR},
  537. </if>
  538. <if test="businessPlanUrl != null">
  539. business_plan_url = #{businessPlanUrl,jdbcType=VARCHAR},
  540. </if>
  541. <if test="orgId != null">
  542. org_id = #{orgId,jdbcType=VARCHAR},
  543. </if>
  544. <if test="orgName != null">
  545. org_name = #{orgName,jdbcType=VARCHAR},
  546. </if>
  547. <if test="orgAddress != null">
  548. org_address = #{orgAddress,jdbcType=VARCHAR},
  549. </if>
  550. <if test="orgEmail != null">
  551. org_email = #{orgEmail,jdbcType=VARCHAR},
  552. </if>
  553. <if test="orgContacts != null">
  554. org_contacts = #{orgContacts,jdbcType=VARCHAR},
  555. </if>
  556. <if test="orgContactsMobile != null">
  557. org_contacts_mobile = #{orgContactsMobile,jdbcType=VARCHAR},
  558. </if>
  559. <if test="contacts != null">
  560. contacts = #{contacts,jdbcType=INTEGER},
  561. </if>
  562. <if test="managerId != null">
  563. manager_id = #{managerId,jdbcType=VARCHAR},
  564. </if>
  565. <if test="salesmanId != null">
  566. salesman_id = #{salesmanId,jdbcType=VARCHAR},
  567. </if>
  568. <if test="status != null">
  569. status = #{status,jdbcType=INTEGER},
  570. </if>
  571. <if test="createTime != null">
  572. create_time = #{createTime,jdbcType=TIMESTAMP},
  573. </if>
  574. <if test="releaseStatus != null">
  575. release_status = #{releaseStatus,jdbcType=INTEGER},
  576. </if>
  577. <if test="releaseDate != null">
  578. release_date = #{releaseDate,jdbcType=TIMESTAMP},
  579. </if>
  580. <if test="deletedSign != null">
  581. deleted_sign = #{deletedSign,jdbcType=INTEGER},
  582. </if>
  583. <if test="auditStatus != null">
  584. audit_status = #{auditStatus,jdbcType=INTEGER},
  585. </if>
  586. <if test="techBrokerId != null">
  587. tech_broker_id = #{techBrokerId,jdbcType=VARCHAR},
  588. </if>
  589. </set>
  590. where id = #{id,jdbcType=VARCHAR}
  591. </update>
  592. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Achievement">
  593. update achievement
  594. set serial_number = #{serialNumber,jdbcType=INTEGER},
  595. data_category = #{dataCategory,jdbcType=INTEGER},
  596. name = #{name,jdbcType=VARCHAR},
  597. keyword = #{keyword,jdbcType=VARCHAR},
  598. category = #{category,jdbcType=INTEGER},
  599. summary = #{summary,jdbcType=VARCHAR},
  600. introduction = #{introduction,jdbcType=VARCHAR},
  601. technical_picture_url = #{technicalPictureUrl,jdbcType=VARCHAR},
  602. field_a = #{fieldA,jdbcType=INTEGER},
  603. field_b = #{fieldB,jdbcType=INTEGER},
  604. field_c = #{fieldC,jdbcType=INTEGER},
  605. maturity = #{maturity,jdbcType=INTEGER},
  606. maturity_picture_url = #{maturityPictureUrl,jdbcType=LONGVARCHAR},
  607. maturity_text_file_url = #{maturityTextFileUrl,jdbcType=VARCHAR},
  608. maturity_video_url = #{maturityVideoUrl,jdbcType=VARCHAR},
  609. innovation = #{innovation,jdbcType=INTEGER},
  610. owner_id = #{ownerId,jdbcType=VARCHAR},
  611. owner_name = #{ownerName,jdbcType=VARCHAR},
  612. owner_type = #{ownerType,jdbcType=INTEGER},
  613. owner_id_number = #{ownerIdNumber,jdbcType=VARCHAR},
  614. owner_mobile = #{ownerMobile,jdbcType=VARCHAR},
  615. owner_email = #{ownerEmail,jdbcType=VARCHAR},
  616. owner_postal_address = #{ownerPostalAddress,jdbcType=VARCHAR},
  617. cooperation_mode = #{cooperationMode,jdbcType=INTEGER},
  618. transfer_mode = #{transferMode,jdbcType=INTEGER},
  619. bargaining_mode = #{bargainingMode,jdbcType=INTEGER},
  620. transfer_price = #{transferPrice,jdbcType=DECIMAL},
  621. technical_scene = #{technicalScene,jdbcType=VARCHAR},
  622. breakthrough = #{breakthrough,jdbcType=VARCHAR},
  623. patent_case = #{patentCase,jdbcType=VARCHAR},
  624. awards = #{awards,jdbcType=VARCHAR},
  625. team_des = #{teamDes,jdbcType=VARCHAR},
  626. parameter = #{parameter,jdbcType=VARCHAR},
  627. tech_plan_url = #{techPlanUrl,jdbcType=VARCHAR},
  628. business_plan_url = #{businessPlanUrl,jdbcType=VARCHAR},
  629. org_id = #{orgId,jdbcType=VARCHAR},
  630. org_name = #{orgName,jdbcType=VARCHAR},
  631. org_address = #{orgAddress,jdbcType=VARCHAR},
  632. org_email = #{orgEmail,jdbcType=VARCHAR},
  633. org_contacts = #{orgContacts,jdbcType=VARCHAR},
  634. org_contacts_mobile = #{orgContactsMobile,jdbcType=VARCHAR},
  635. contacts = #{contacts,jdbcType=INTEGER},
  636. manager_id = #{managerId,jdbcType=VARCHAR},
  637. salesman_id = #{salesmanId,jdbcType=VARCHAR},
  638. status = #{status,jdbcType=INTEGER},
  639. create_time = #{createTime,jdbcType=TIMESTAMP},
  640. release_status = #{releaseStatus,jdbcType=INTEGER},
  641. release_date = #{releaseDate,jdbcType=TIMESTAMP},
  642. deleted_sign = #{deletedSign,jdbcType=INTEGER},
  643. audit_status = #{auditStatus,jdbcType=INTEGER},
  644. tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
  645. where id = #{id,jdbcType=VARCHAR}
  646. </update>
  647. <select id="findUserOwnerAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
  648. select
  649. a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
  650. a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType,
  651. ui.username as username, a.owner_id as ownerId, a.org_id as orgId, a.contacts,
  652. a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId
  653. from achievement a
  654. LEFT JOIN admin ad on a.id = a.tech_broker_id
  655. LEFT JOIN user_identity ui on a.owner_id = ui.uid
  656. where a.deleted_sign = 0 and a.owner_type = 0
  657. <if test="ownerId != null">
  658. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  659. </if>
  660. <if test="serialNumber != null">
  661. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  662. </if>
  663. <if test="auditStatus != null">
  664. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  665. </if>
  666. <if test="name != null">
  667. and a.name = #{name,jdbcType=VARCHAR}
  668. </if>
  669. <if test="keyword != null">
  670. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  671. </if>
  672. <if test="category != null">
  673. and a.category = #{category,jdbcType=INTEGER}
  674. </if>
  675. <if test="status != null">
  676. and a.status = #{status,jdbcType=INTEGER}
  677. </if>
  678. <if test="rStart != null">
  679. and a.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
  680. </if>
  681. <if test="rEnd != null">
  682. and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  683. </if>
  684. <if test="releaseStatus != null">
  685. and a.release_status = #{releaseStatus,jdbcType=INTEGER}
  686. </if>
  687. order by a.serial_number desc
  688. <if test="page_sql!=null">
  689. ${page_sql}
  690. </if>
  691. </select>
  692. <select id="findUserOwnerAchievementCount" parameterType="String" resultType="java.lang.Integer">
  693. select
  694. count(1)
  695. from achievement
  696. where deleted_sign = 0 and owner_type = 0
  697. <if test="ownerId != null">
  698. and owner_id = #{ownerId,jdbcType=VARCHAR}
  699. </if>
  700. <if test="serialNumber != null">
  701. and serial_number = #{serialNumber,jdbcType=INTEGER}
  702. </if>
  703. <if test="auditStatus != null">
  704. and audit_status = #{auditStatus,jdbcType=INTEGER}
  705. </if>
  706. <if test="name != null">
  707. and name = #{name,jdbcType=VARCHAR}
  708. </if>
  709. <if test="keyword != null">
  710. and keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  711. </if>
  712. <if test="category != null">
  713. and category = #{category,jdbcType=INTEGER}
  714. </if>
  715. <if test="status != null">
  716. and status = #{status,jdbcType=INTEGER}
  717. </if>
  718. <if test="rStart != null">
  719. and release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
  720. </if>
  721. <if test="rEnd != null">
  722. and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  723. </if>
  724. <if test="releaseStatus != null">
  725. and release_status = #{releaseStatus,jdbcType=INTEGER}
  726. </if>
  727. </select>
  728. <select id="findOrgOwnerAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
  729. select
  730. a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
  731. a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType,
  732. oi.unit_name as username, a.owner_id as ownerId, a.org_id as orgId, a.contacts,
  733. a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId
  734. from achievement a
  735. LEFT JOIN admin ad on ad.id = a.tech_broker_id
  736. LEFT JOIN organization_identity oi on a.owner_id = oi.uid
  737. where a.deleted_sign = 0 and a.owner_type = 1
  738. <if test="ownerId != null">
  739. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  740. </if>
  741. <if test="serialNumber != null">
  742. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  743. </if>
  744. <if test="auditStatus != null">
  745. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  746. </if>
  747. <if test="name != null">
  748. and a.name = #{name,jdbcType=VARCHAR}
  749. </if>
  750. <if test="keyword != null">
  751. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  752. </if>
  753. <if test="category != null">
  754. and a.category = #{category,jdbcType=INTEGER}
  755. </if>
  756. <if test="status != null">
  757. and a.status = #{status,jdbcType=INTEGER}
  758. </if>
  759. <if test="rStart != null">
  760. and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  761. </if>
  762. <if test="rEnd != null">
  763. and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  764. </if>
  765. <if test="releaseStatus != null">
  766. and a.release_status = #{releaseStatus,jdbcType=INTEGER}
  767. </if>
  768. order by serial_number desc
  769. <if test="page_sql!=null">
  770. ${page_sql}
  771. </if>
  772. </select>
  773. <select id="findOrgOwnerAchievementCount" parameterType="String" resultType="java.lang.Integer">
  774. select
  775. count(1)
  776. from achievement a
  777. where a.deleted_sign = 0 and a.owner_type = 1
  778. <if test="ownerId != null">
  779. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  780. </if>
  781. <if test="serialNumber != null">
  782. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  783. </if>
  784. <if test="auditStatus != null">
  785. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  786. </if>
  787. <if test="name != null">
  788. and a.name = #{name,jdbcType=VARCHAR}
  789. </if>
  790. <if test="keyword != null">
  791. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  792. </if>
  793. <if test="category != null">
  794. and a.category = #{category,jdbcType=INTEGER}
  795. </if>
  796. <if test="status != null">
  797. and a.status = #{status,jdbcType=INTEGER}
  798. </if>
  799. <if test="rStart != null">
  800. and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  801. </if>
  802. <if test="rEnd != null">
  803. and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  804. </if>
  805. <if test="releaseStatus != null">
  806. and a.release_status = #{releaseStatus,jdbcType=INTEGER}
  807. </if>
  808. </select>
  809. <update id="updateReleaseDate" parameterType="java.lang.String">
  810. update achievement set release_date = null
  811. where id = #{id,jdbcType=VARCHAR}
  812. </update>
  813. <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
  814. update achievement set deleted_sign = 1
  815. where id in
  816. <foreach item="item" collection="list" open="(" separator="," close=")">
  817. #{item}
  818. </foreach>
  819. </update>
  820. <select id="findAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
  821. select
  822. id, serial_number as serialNumber, data_category as dataCategory,
  823. name, keyword, category,
  824. owner_name as ownerName, owner_type as ownerType, owner_mobile as ownerMobile,
  825. status, release_date as releaseDate, audit_status as auditStatus
  826. from achievement
  827. where deleted_sign = 0 and owner_id = #{ownerId,jdbcType=VARCHAR}
  828. <if test="serialNumber != null">
  829. and serial_number = #{serialNumber,jdbcType=INTEGER}
  830. </if>
  831. <if test="auditStatus != null">
  832. and audit_status = #{auditStatus,jdbcType=INTEGER}
  833. </if>
  834. <if test="name != null">
  835. and name = #{name,jdbcType=VARCHAR}
  836. </if>
  837. <if test="keyword != null">
  838. and keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  839. </if>
  840. <if test="category != null">
  841. and category = #{category,jdbcType=INTEGER}
  842. </if>
  843. <if test="ownerType != null">
  844. and owner_type = #{ownerType,jdbcType=INTEGER}
  845. </if>
  846. <if test="status != null">
  847. and status = #{status,jdbcType=INTEGER}
  848. </if>
  849. <if test="rStart != null">
  850. and release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  851. </if>
  852. <if test="rEnd != null">
  853. and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  854. </if>
  855. <if test="releaseStatus != null">
  856. and release_status = #{releaseStatus,jdbcType=INTEGER}
  857. </if>
  858. order by serial_number desc
  859. <if test="page_sql!=null">
  860. ${page_sql}
  861. </if>
  862. </select>
  863. <select id="findAchievementCount" parameterType="String" resultType="java.lang.Integer">
  864. select
  865. count(1)
  866. from achievement
  867. where deleted_sign = 0 and owner_id = #{ownerId,jdbcType=VARCHAR}
  868. <if test="serialNumber != null">
  869. and serial_number = #{serialNumber,jdbcType=INTEGER}
  870. </if>
  871. <if test="auditStatus != null">
  872. and audit_status = #{auditStatus,jdbcType=INTEGER}
  873. </if>
  874. <if test="name != null">
  875. and name = #{name,jdbcType=VARCHAR}
  876. </if>
  877. <if test="keyword != null">
  878. and keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  879. </if>
  880. <if test="category != null">
  881. and category = #{category,jdbcType=INTEGER}
  882. </if>
  883. <if test="ownerType != null">
  884. and owner_type = #{ownerType,jdbcType=INTEGER}
  885. </if>
  886. <if test="status != null">
  887. and status = #{status,jdbcType=INTEGER}
  888. </if>
  889. <if test="rStart != null">
  890. and release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  891. </if>
  892. <if test="rEnd != null">
  893. and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  894. </if>
  895. <if test="releaseStatus != null">
  896. and release_status = #{releaseStatus,jdbcType=INTEGER}
  897. </if>
  898. </select>
  899. <select id="selectUserOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementUserOwnerDetailBo">
  900. select
  901. a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
  902. a.name, a.keyword, a.category,
  903. a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl,
  904. a.field_a as fieldA, a.field_b as fieldB, a.field_c as fieldC,
  905. a.maturity, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl,
  906. a.maturity_video_url as maturityVideoUrl, a.innovation, a.owner_id as ownerId,
  907. a.owner_name as ownerName, a.owner_type as ownerType, a.owner_id_number as ownerIdNumber,
  908. a.owner_mobile as ownerMobile, a.owner_email as ownerEmail, a.owner_postal_address as ownerPostalAddress,
  909. a.cooperation_mode as cooperationMode, a.transfer_mode as transferMode, a.bargaining_mode as bargainingMode,
  910. a.transfer_price as transferPrice, a.technical_scene as technicalScene, a.breakthrough,
  911. a.patent_case as patentCase, a.awards, a.team_des as teamDes,
  912. a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl,
  913. a.contacts, a.manager_id as managerId, a.salesman_id as salesmanId,
  914. a.create_time as createTime, a.release_status as releaseStatus,
  915. a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
  916. ui.username as iOwnerName, ui.province, ui.city, ui.area, u.email as iOwnerEmail,
  917. ui.id_number as iOwnerIdNumber, u.mobile as iOwnerMobile
  918. from achievement a
  919. left join user_identity ui on a.owner_id = ui.uid
  920. left join user u on u.id = a.owner_id
  921. where a.id = #{id,jdbcType=VARCHAR}
  922. </select>
  923. <select id="selectOrgOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementOrgOwnerDetailBo">
  924. select
  925. a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
  926. a.name, a.keyword, a.category,
  927. a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl,
  928. a.field_a as fieldA, a.field_b as fieldB, a.field_c as fieldC,
  929. a.maturity, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl,
  930. a.maturity_video_url as maturityVideoUrl, a.innovation, a.owner_id as ownerId,
  931. a.owner_name as ownerName, a.owner_type as ownerType, a.owner_id_number as ownerIdNumber,
  932. a.owner_mobile as ownerMobile, a.owner_email as ownerEmail, a.owner_postal_address as ownerPostalAddress,
  933. a.cooperation_mode as cooperationMode, a.transfer_mode as transferMode, a.bargaining_mode as bargainingMode,
  934. a.transfer_price as transferPrice, a.technical_scene as technicalScene, a.breakthrough,
  935. a.patent_case as patentCase, a.awards, a.team_des as teamDes,
  936. a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl,
  937. a.contacts, a.manager_id as managerId, a.salesman_id as salesmanId,
  938. a.create_time as createTime, a.release_status as releaseStatus,
  939. a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
  940. oi.unit_name as iOwnerName, oi.postal_address as iOwnerPostalAddress, u.email as iOwnerEmail,
  941. oi.org_code as iOwnerIdNumber
  942. from achievement a
  943. left join organization_identity oi on a.owner_id = oi.uid
  944. left join user u on u.id = a.owner_id
  945. where a.id = #{id,jdbcType=VARCHAR}
  946. </select>
  947. <insert id="insertBatch" parameterType="com.goafanti.common.model.Achievement">
  948. insert into achievement
  949. (id, deleted_sign, audit_status,
  950. create_time, release_status, data_category,
  951. name, keyword, category,
  952. owner_name, owner_type, owner_id_number,
  953. owner_mobile, owner_email, owner_postal_address,
  954. cooperation_mode
  955. )
  956. values
  957. <foreach item="item" index="index" collection="list" separator=",">
  958. (
  959. #{item.id,jdbcType=VARCHAR}, #{item.deletedSign,jdbcType=INTEGER}, #{item.auditStatus,jdbcType=INTEGER},
  960. #{item.createTime,jdbcType=TIMESTAMP}, #{item.releaseStatus,jdbcType=INTEGER}, #{item.dataCategory,jdbcType=INTEGER},
  961. #{item.name,jdbcType=VARCHAR}, #{item.keyword,jdbcType=VARCHAR}, #{item.category,jdbcType=INTEGER},
  962. #{item.ownerName,jdbcType=VARCHAR}, #{item.ownerType,jdbcType=VARCHAR}, #{item.ownerIdNumber,jdbcType=VARCHAR},
  963. #{item.ownerMobile,jdbcType=VARCHAR}, #{item.ownerEmail,jdbcType=VARCHAR}, #{item.ownerPostalAddress,jdbcType=VARCHAR},
  964. #{item.cooperationMode,jdbcType=INTEGER}
  965. )
  966. </foreach>
  967. </insert>
  968. <select id="findSearchAchievementListByPage" parameterType="String" resultType="com.goafanti.portal.bo.AchievementSearchListBo">
  969. select
  970. a.id, a.name, a.keyword,
  971. a.serial_number as serialNumber, a.data_category as dataCategory, a.category,
  972. a.release_date as releaseDate, a.owner_type as ownerType, ui.username,
  973. oi.unit_name as unitName, a.field_a as fieldA, a.field_b as fieldB,
  974. a.transfer_price as transferPrice, a.maturity, a.transfer_mode as transferMode,
  975. a.bargaining_mode as bargainingMode, u.lvl as level
  976. from achievement a
  977. left join user_identity ui on ui.uid = a.owner_id
  978. left join organization_identity oi on oi.uid = a.owner_id
  979. left join user u on u.id = a.owner_id
  980. where a.deleted_sign = 0
  981. <if test="keyword != null">
  982. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  983. </if>
  984. <if test="category != null">
  985. and a.category = #{category,jdbcType=INTEGER}
  986. </if>
  987. <if test="bargainingMode != null">
  988. and a.bargaining_mode = #{bargainingMode,jdbcType=INTEGER}
  989. </if>
  990. <if test="maturity != null">
  991. and a.maturity = #{maturity,jdbcType=INTEGER}
  992. </if>
  993. <if test="transferPriceLower != null">
  994. and a.transfer_price <![CDATA[ >= ]]> #{transferPriceLower,jdbcType=DECIMAL}
  995. </if>
  996. <if test="transferPriceUpper != null">
  997. and a.transfer_price <![CDATA[ <= ]]> #{transferPriceUpper,jdbcType=DECIMAL}
  998. </if>
  999. <if test="transferMode != null">
  1000. and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
  1001. </if>
  1002. <if test="fieldA != null">
  1003. and a.field_a = #{fieldA,jdbcType=INTEGER}
  1004. </if>
  1005. <if test="fieldB != null">
  1006. and a.field_b = #{fieldB,jdbcType=INTEGER}
  1007. </if>
  1008. and a.deleted_sign = 0
  1009. and a.release_status = 1
  1010. and a.audit_status = 3
  1011. order by a.release_date desc
  1012. <if test="page_sql!=null">
  1013. ${page_sql}
  1014. </if>
  1015. </select>
  1016. <select id="findSearchAchievementCount" parameterType="String" resultType="java.lang.Integer">
  1017. select
  1018. count(1)
  1019. from achievement a
  1020. where a.deleted_sign = 0
  1021. <if test="keyword != null">
  1022. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  1023. </if>
  1024. <if test="bargainingMode != null">
  1025. and a.bargaining_mode = #{bargainingMode,jdbcType=INTEGER}
  1026. </if>
  1027. <if test="category != null">
  1028. and a.category = #{category,jdbcType=INTEGER}
  1029. </if>
  1030. <if test="maturity != null">
  1031. and a.maturity = #{maturity,jdbcType=INTEGER}
  1032. </if>
  1033. <if test="transferPriceLower != null">
  1034. and a.transfer_price <![CDATA[ >= ]]> #{transferPriceLower,jdbcType=DECIMAL}
  1035. </if>
  1036. <if test="transferPriceUpper != null">
  1037. and a.transfer_price <![CDATA[ <= ]]> #{transferPriceUpper,jdbcType=DECIMAL}
  1038. </if>
  1039. <if test="transferMode != null">
  1040. and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
  1041. </if>
  1042. <if test="fieldA != null">
  1043. and a.field_a = #{fieldA,jdbcType=INTEGER}
  1044. </if>
  1045. <if test="fieldB != null">
  1046. and a.field_b = #{fieldB,jdbcType=INTEGER}
  1047. </if>
  1048. and a.release_status = 1
  1049. and a.audit_status = 3
  1050. </select>
  1051. <select id="selectAchievementSearchDetail" resultType="com.goafanti.portal.bo.AchievementDetailBo">
  1052. select
  1053. a.id, a.serial_number as serialNumber, a.keyword,
  1054. a.name, a.data_category as dataCategory, a.category,
  1055. ui.username, oi.unit_name as unitName, a.release_date as releaseDate,
  1056. a.owner_type as ownerType, a.field_a as fieldA, a.field_b as fieldB,
  1057. a.transfer_price as transferPrice, a.maturity, a.transfer_mode as transferMode,
  1058. a.bargaining_mode as bargainingMode, a.summary, a.introduction,
  1059. a.technical_picture_url as technicalPictureUrl, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl,
  1060. a.maturity_video_url as maturityVideoUrl, a.innovation, a.cooperation_mode as cooperationMode,
  1061. a.bargaining_mode as bargainingMode, a.technical_scene as technicalScene, a.breakthrough,
  1062. a.patent_case as patentCase, a.awards, a.team_des as teamDes,
  1063. a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl,
  1064. ai.id as achievementInterestId, ao.id as achievementOrderId, ao.status as orderStatus
  1065. from achievement a
  1066. left join user_identity ui on ui.uid = a.owner_id
  1067. left join organization_identity oi on oi.uid = a.owner_id
  1068. left join achievement_interest ai on ai.achievement_id = a.id and ai.uid = #{0}
  1069. left join achievement_order ao on ao.achievement_id = a.id and ao.uid = #{0} and ao.status <![CDATA[ <> ]]> 6
  1070. where a.id = #{1}
  1071. </select>
  1072. <select id="findAchievementNumByUid" parameterType="java.lang.String" resultType="java.lang.Integer">
  1073. select
  1074. count(1)
  1075. from achievement
  1076. where
  1077. deleted_sign = 0
  1078. and release_status = 1
  1079. and audit_status = 3
  1080. and owner_id = #{uid,jdbcType=VARCHAR}
  1081. </select>
  1082. <select id="findPartnerAchievementListByPage" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementPartnerListBo">
  1083. SELECT
  1084. id,
  1085. serial_number AS serialNumber,
  1086. data_category AS dataCategory,
  1087. NAME,
  1088. keyword,
  1089. category,
  1090. owner_type as ownerType,
  1091. release_date AS releaseDate
  1092. FROM
  1093. achievement
  1094. WHERE
  1095. audit_status = 3
  1096. AND release_status = 1
  1097. AND deleted_sign = 0
  1098. AND owner_id = #{ownerId,jdbcType=VARCHAR}
  1099. </select>
  1100. <select id="findPartnerAchievementCount" parameterType="java.lang.String" resultType="java.lang.Integer">
  1101. SELECT
  1102. count(1)
  1103. FROM
  1104. achievement
  1105. WHERE
  1106. audit_status = 3
  1107. AND release_status = 1
  1108. AND deleted_sign = 0
  1109. AND owner_id = #{ownerId,jdbcType=VARCHAR}
  1110. </select>
  1111. <select id="findUserPortalAchievementDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.AchievementPortalDetailBo">
  1112. SELECT
  1113. a.id,
  1114. a.name,
  1115. a.keyword,
  1116. a.introduction,
  1117. a.maturity,
  1118. a.transfer_price AS transferPrice,
  1119. a.patent_case AS patentCase,
  1120. a.field_a as fieldA,
  1121. fg.name AS fieldAS,
  1122. fgg.name AS fieldBS,
  1123. a.release_date AS releaseDate,
  1124. dg.name as province,
  1125. dgg.name as city,
  1126. a.technical_picture_url AS technicalPictureUrl,
  1127. a.transfer_mode as transferMode,
  1128. interest.id as interestId,
  1129. u.lvl as level,
  1130. ui.username as ownerName
  1131. FROM
  1132. achievement a
  1133. LEFT JOIN <![CDATA[ user ]]> u on u.id = a.owner_id
  1134. LEFT JOIN user_identity ui ON a.owner_id = ui.uid
  1135. LEFT JOIN district_glossory dg on dg.id = ui.province
  1136. LEFT JOIN district_glossory dgg on dgg.id = ui.city
  1137. LEFT JOIN field_glossory fg on fg.id = a.field_a
  1138. LEFT JOIN field_glossory fgg on fgg.id = a.field_b
  1139. LEFT JOIN achievement_interest interest on interest.achievement_id = a.id and interest.uid = #{uid,jdbcType=VARCHAR}
  1140. WHERE
  1141. a.id = #{id,jdbcType=VARCHAR}
  1142. </select>
  1143. <select id="findOrgPortalAchievementDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.AchievementPortalDetailBo">
  1144. SELECT
  1145. a.id,
  1146. a.name,
  1147. a.keyword,
  1148. a.introduction,
  1149. a.maturity,
  1150. a.transfer_price AS transferPrice,
  1151. a.patent_case AS patentCase,
  1152. a.field_a as fieldA,
  1153. fg.name AS fieldAS,
  1154. fgg.name AS fieldBS,
  1155. a.release_date AS releaseDate,
  1156. dg.name as province,
  1157. dgg.name as city,
  1158. a.technical_picture_url AS technicalPictureUrl,
  1159. a.transfer_mode as transferMode,
  1160. interest.id as interestId,
  1161. u.lvl as level,
  1162. oi.unit_name as ownerName
  1163. FROM
  1164. achievement a
  1165. LEFT JOIN <![CDATA[ user ]]> u on u.id = a.owner_id
  1166. LEFT JOIN organization_identity oi ON a.owner_id = oi.uid
  1167. LEFT JOIN district_glossory dg on dg.id = oi.licence_province
  1168. LEFT JOIN district_glossory dgg on dgg.id = oi.licence_city
  1169. LEFT JOIN field_glossory fg on fg.id = a.field_a
  1170. LEFT JOIN field_glossory fgg on fgg.id = a.field_b
  1171. LEFT JOIN achievement_interest interest on interest.achievement_id = a.id and interest.uid = #{uid,jdbcType=VARCHAR}
  1172. WHERE
  1173. a.id = #{id,jdbcType=VARCHAR}
  1174. </select>
  1175. <select id="findUserPortalSimilarByFieldA" resultType="com.goafanti.portal.bo.AchievementPortalSimilarListBo">
  1176. SELECT
  1177. a.id,
  1178. a.name,
  1179. a.maturity,
  1180. ui.province,
  1181. ui.city,
  1182. a.transfer_price as transferPrice
  1183. FROM
  1184. achievement a
  1185. LEFT JOIN user_identity ui ON ui.uid = a.owner_id
  1186. WHERE
  1187. a.audit_status = 3
  1188. AND a.deleted_sign = 0
  1189. AND a.release_status = 1
  1190. AND a.field_a = #{fieldA,jdbcType=INTEGER}
  1191. AND a.id <![CDATA[ <> ]]> #{id,jdbcType=VARCHAR}
  1192. order by a.serial_number desc
  1193. limit 5
  1194. </select>
  1195. <select id="findOrgPortalSimilarByFieldA" resultType="com.goafanti.portal.bo.AchievementPortalSimilarListBo">
  1196. SELECT
  1197. a.id,
  1198. a.name,
  1199. a.maturity,
  1200. oi.licence_province as province,
  1201. oi.licence_city as city,
  1202. a.transfer_price as transferPrice
  1203. FROM
  1204. achievement a
  1205. LEFT JOIN organization_identity oi ON oi.uid = a.owner_id
  1206. WHERE
  1207. a.audit_status = 3
  1208. AND a.deleted_sign = 0
  1209. AND a.release_status = 1
  1210. AND a.field_a = #{fieldA,jdbcType=INTEGER}
  1211. AND a.id <![CDATA[ <> ]]> #{id,jdbcType=VARCHAR}
  1212. order by a.serial_number desc
  1213. limit 5
  1214. </select>
  1215. </mapper>