AchievementMapper.xml 61 KB

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