AchievementMapper.xml 52 KB

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