AchievementMapper.xml 50 KB

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