AchievementMapper.xml 62 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698
  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="adminId != null">
  863. and (u.mid = #{adminId,jdbcType=VARCHAR}
  864. </if>
  865. <if test="adminId != null">
  866. or a.salesman_id = #{adminId,jdbcType=VARCHAR}
  867. </if>
  868. <if test="adminId != null">
  869. or a.tech_broker_id = #{adminId,jdbcType=VARCHAR}
  870. )
  871. </if>
  872. <if test="ownerName != null">
  873. and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
  874. and (a.owner_id is null or a.owner_id = '')
  875. </if>
  876. <if test="unitName != null">
  877. and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
  878. </if>
  879. <if test="ownerId != null">
  880. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  881. </if>
  882. <if test="serialNumber != null">
  883. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  884. </if>
  885. <if test="auditStatus != null">
  886. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  887. </if>
  888. <if test="name != null">
  889. and a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  890. </if>
  891. <if test="keyword != null">
  892. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  893. </if>
  894. <if test="category != null">
  895. and a.category = #{category,jdbcType=INTEGER}
  896. </if>
  897. <if test="status != null">
  898. and a.status = #{status,jdbcType=INTEGER}
  899. </if>
  900. <if test="rStart != null">
  901. and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  902. </if>
  903. <if test="rEnd != null">
  904. and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  905. </if>
  906. <if test="releaseStatus != null">
  907. and a.release_status = #{releaseStatus,jdbcType=INTEGER}
  908. </if>
  909. <if test="techBrokerId != null">
  910. and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
  911. </if>
  912. <if test="boutique != null">
  913. and a.boutique = #{boutique,jdbcType=INTEGER}
  914. </if>
  915. <if test="hot != null and hot == 0"><!-- 不在首页 -->
  916. and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
  917. </if>
  918. <if test="hot != null and hot == 1"><!-- 在首页 -->
  919. and mm.effective = 1
  920. </if>
  921. order by serial_number desc
  922. <if test="page_sql!=null">
  923. ${page_sql}
  924. </if>
  925. </select>
  926. <select id="findOrgOwnerAchievementCount" parameterType="String" resultType="java.lang.Integer">
  927. select
  928. count(1)
  929. from achievement a
  930. LEFT JOIN admin ad on ad.id = a.tech_broker_id
  931. LEFT JOIN organization_identity oi on a.owner_id = oi.uid
  932. <if test="adminId != null">
  933. LEFT JOIN user u on a.owner_id = u.id
  934. </if>
  935. <if test="hot != null and hot == 1"><!-- 在首页 -->
  936. inner join marketing_management mm on a.id = mm.product_id
  937. </if>
  938. <if test="hot == null"> <!-- 无首页参数 -->
  939. left join marketing_management mm on a.id = mm.product_id
  940. </if>
  941. where a.deleted_sign = 0 and a.owner_type = 1
  942. <if test="adminId != null">
  943. and (u.mid = #{adminId,jdbcType=VARCHAR}
  944. </if>
  945. <if test="adminId != null">
  946. or a.salesman_id = #{adminId,jdbcType=VARCHAR}
  947. </if>
  948. <if test="adminId != null">
  949. or a.tech_broker_id = #{adminId,jdbcType=VARCHAR}
  950. )
  951. </if>
  952. <if test="ownerName != null">
  953. and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
  954. and (a.owner_id is null or a.owner_id = '')
  955. </if>
  956. <if test="unitName != null">
  957. and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
  958. </if>
  959. <if test="ownerId != null">
  960. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  961. </if>
  962. <if test="serialNumber != null">
  963. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  964. </if>
  965. <if test="auditStatus != null">
  966. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  967. </if>
  968. <if test="name != null">
  969. and a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  970. </if>
  971. <if test="keyword != null">
  972. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  973. </if>
  974. <if test="category != null">
  975. and a.category = #{category,jdbcType=INTEGER}
  976. </if>
  977. <if test="status != null">
  978. and a.status = #{status,jdbcType=INTEGER}
  979. </if>
  980. <if test="rStart != null">
  981. and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  982. </if>
  983. <if test="rEnd != null">
  984. and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  985. </if>
  986. <if test="releaseStatus != null">
  987. and a.release_status = #{releaseStatus,jdbcType=INTEGER}
  988. </if>
  989. <if test="techBrokerId != null">
  990. and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
  991. </if>
  992. <if test="hot != null and hot == 0"><!-- 不在首页 -->
  993. and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
  994. </if>
  995. <if test="hot != null and hot == 1"><!-- 在首页 -->
  996. and mm.effective = 1
  997. </if>
  998. </select>
  999. <update id="updateReleaseDate" parameterType="java.lang.String">
  1000. update achievement set release_date = null
  1001. where id = #{id,jdbcType=VARCHAR}
  1002. </update>
  1003. <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
  1004. update achievement set deleted_sign = 1
  1005. where id in
  1006. <foreach item="item" collection="list" open="(" separator="," close=")">
  1007. #{item}
  1008. </foreach>
  1009. </update>
  1010. <select id="findAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
  1011. select
  1012. id, serial_number as serialNumber, data_category as dataCategory,
  1013. name, keyword, category,
  1014. owner_name as ownerName, owner_type as ownerType, owner_mobile as ownerMobile,
  1015. status, release_date as releaseDate, audit_status as auditStatus
  1016. from achievement
  1017. where deleted_sign = 0 and owner_id = #{ownerId,jdbcType=VARCHAR}
  1018. <if test="serialNumber != null">
  1019. and serial_number = #{serialNumber,jdbcType=INTEGER}
  1020. </if>
  1021. <if test="auditStatus != null">
  1022. and audit_status = #{auditStatus,jdbcType=INTEGER}
  1023. </if>
  1024. <if test="name != null">
  1025. and name = #{name,jdbcType=VARCHAR}
  1026. </if>
  1027. <if test="keyword != null">
  1028. and keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  1029. </if>
  1030. <if test="category != null">
  1031. and category = #{category,jdbcType=INTEGER}
  1032. </if>
  1033. <if test="ownerType != null">
  1034. and owner_type = #{ownerType,jdbcType=INTEGER}
  1035. </if>
  1036. <if test="status != null">
  1037. and status = #{status,jdbcType=INTEGER}
  1038. </if>
  1039. <if test="rStart != null">
  1040. and release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  1041. </if>
  1042. <if test="rEnd != null">
  1043. and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  1044. </if>
  1045. <if test="releaseStatus != null">
  1046. and release_status = #{releaseStatus,jdbcType=INTEGER}
  1047. </if>
  1048. order by serial_number desc
  1049. <if test="page_sql!=null">
  1050. ${page_sql}
  1051. </if>
  1052. </select>
  1053. <select id="findAchievementCount" parameterType="String" resultType="java.lang.Integer">
  1054. select
  1055. count(1)
  1056. from achievement
  1057. where deleted_sign = 0 and owner_id = #{ownerId,jdbcType=VARCHAR}
  1058. <if test="serialNumber != null">
  1059. and serial_number = #{serialNumber,jdbcType=INTEGER}
  1060. </if>
  1061. <if test="auditStatus != null">
  1062. and audit_status = #{auditStatus,jdbcType=INTEGER}
  1063. </if>
  1064. <if test="name != null">
  1065. and name = #{name,jdbcType=VARCHAR}
  1066. </if>
  1067. <if test="keyword != null">
  1068. and keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  1069. </if>
  1070. <if test="category != null">
  1071. and category = #{category,jdbcType=INTEGER}
  1072. </if>
  1073. <if test="ownerType != null">
  1074. and owner_type = #{ownerType,jdbcType=INTEGER}
  1075. </if>
  1076. <if test="status != null">
  1077. and status = #{status,jdbcType=INTEGER}
  1078. </if>
  1079. <if test="rStart != null">
  1080. and release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  1081. </if>
  1082. <if test="rEnd != null">
  1083. and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  1084. </if>
  1085. <if test="releaseStatus != null">
  1086. and release_status = #{releaseStatus,jdbcType=INTEGER}
  1087. </if>
  1088. </select>
  1089. <select id="selectUserOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementUserOwnerDetailBo">
  1090. select
  1091. a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
  1092. a.name, a.keyword, a.category,
  1093. a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl,
  1094. a.field_a as fieldA, a.field_b as fieldB, a.field_c as fieldC,
  1095. a.maturity, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl,
  1096. a.maturity_video_url as maturityVideoUrl, a.innovation, a.owner_id as ownerId,
  1097. a.owner_name as ownerName, a.owner_type as ownerType, a.owner_id_number as ownerIdNumber,
  1098. a.owner_mobile as ownerMobile, a.owner_email as ownerEmail, a.owner_postal_address as ownerPostalAddress,
  1099. a.cooperation_mode as cooperationMode, a.transfer_mode as transferMode, a.bargaining_mode as bargainingMode,
  1100. a.transfer_price as transferPrice, a.technical_scene as technicalScene, a.breakthrough,
  1101. a.patent_case as patentCase, a.awards, a.team_des as teamDes,
  1102. a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl,
  1103. a.contacts, a.manager_id as managerId, a.salesman_id as salesmanId,
  1104. a.create_time as createTime, a.release_status as releaseStatus,
  1105. a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
  1106. ui.username as iOwnerName, ui.province, ui.city, ui.area, u.email as iOwnerEmail,
  1107. ui.id_number as iOwnerIdNumber, u.mobile as iOwnerMobile,a.boutique,ifnull(mm.effective,0) as hot,mm.cover_img as coverImg
  1108. from achievement a
  1109. left join user_identity ui on a.owner_id = ui.uid
  1110. left join user u on u.id = a.owner_id
  1111. left join marketing_management mm on a.id = mm.product_id
  1112. where a.id = #{id,jdbcType=VARCHAR}
  1113. </select>
  1114. <select id="selectOrgOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementOrgOwnerDetailBo">
  1115. select
  1116. a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
  1117. a.name, a.keyword, a.category,
  1118. a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl,
  1119. a.field_a as fieldA, a.field_b as fieldB, a.field_c as fieldC,
  1120. a.maturity, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl,
  1121. a.maturity_video_url as maturityVideoUrl, a.innovation, a.owner_id as ownerId,
  1122. a.owner_name as ownerName, a.owner_type as ownerType, a.owner_id_number as ownerIdNumber,
  1123. a.owner_mobile as ownerMobile, a.owner_email as ownerEmail, a.owner_postal_address as ownerPostalAddress,
  1124. a.cooperation_mode as cooperationMode, a.transfer_mode as transferMode, a.bargaining_mode as bargainingMode,
  1125. a.transfer_price as transferPrice, a.technical_scene as technicalScene, a.breakthrough,
  1126. a.patent_case as patentCase, a.awards, a.team_des as teamDes,
  1127. a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl,
  1128. a.contacts, a.manager_id as managerId, a.salesman_id as salesmanId,
  1129. a.create_time as createTime, a.release_status as releaseStatus,
  1130. a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
  1131. oi.unit_name as iOwnerName, oi.postal_address as iOwnerPostalAddress, u.email as iOwnerEmail,
  1132. oi.org_code as iOwnerIdNumber, u.mobile as iOwnerMobile,a.boutique,ifnull(mm.effective,0) hot,mm.cover_img as coverImg
  1133. from achievement a
  1134. left join organization_identity oi on a.owner_id = oi.uid
  1135. left join user u on u.id = a.owner_id
  1136. left join marketing_management mm on a.id = mm.product_id
  1137. where a.id = #{id,jdbcType=VARCHAR}
  1138. </select>
  1139. <insert id="insertBatch" parameterType="com.goafanti.common.model.Achievement">
  1140. insert into achievement
  1141. (id, deleted_sign, audit_status,
  1142. create_time, release_status, data_category,
  1143. name, keyword, category,
  1144. owner_name, owner_type, owner_id_number,
  1145. owner_mobile, owner_email, owner_postal_address,
  1146. cooperation_mode, introduction, tech_broker_id
  1147. )
  1148. values
  1149. <foreach item="item" index="index" collection="list" separator=",">
  1150. (
  1151. #{item.id,jdbcType=VARCHAR}, #{item.deletedSign,jdbcType=INTEGER}, #{item.auditStatus,jdbcType=INTEGER},
  1152. #{item.createTime,jdbcType=TIMESTAMP}, #{item.releaseStatus,jdbcType=INTEGER}, #{item.dataCategory,jdbcType=INTEGER},
  1153. #{item.name,jdbcType=VARCHAR}, #{item.keyword,jdbcType=VARCHAR}, #{item.category,jdbcType=INTEGER},
  1154. #{item.ownerName,jdbcType=VARCHAR}, #{item.ownerType,jdbcType=VARCHAR}, #{item.ownerIdNumber,jdbcType=VARCHAR},
  1155. #{item.ownerMobile,jdbcType=VARCHAR}, #{item.ownerEmail,jdbcType=VARCHAR}, #{item.ownerPostalAddress,jdbcType=VARCHAR},
  1156. #{item.cooperationMode,jdbcType=INTEGER}, #{item.introduction,jdbcType=LONGVARCHAR},#{item.techBrokerId,jdbcType=VARCHAR}
  1157. )
  1158. </foreach>
  1159. </insert>
  1160. <select id="findSearchAchievementListByPage" parameterType="String" resultType="com.goafanti.portal.bo.AchievementSearchListBo">
  1161. select
  1162. a.id, a.name, a.keyword,a.introduction,a.category,
  1163. a.serial_number as serialNumber,
  1164. a.data_category as dataCategory,
  1165. a.owner_type as ownerType,
  1166. a.owner_name as ownerName,
  1167. a.field_a as fieldA,
  1168. a.field_b as fieldB,
  1169. a.transfer_price as transferPrice,
  1170. a.maturity,
  1171. a.introduction,
  1172. a.transfer_mode as transferMode,
  1173. a.technical_picture_url as technicalPictureUrl,
  1174. b.name as fieldAs
  1175. from achievement a
  1176. left join field_glossory b on a.field_a = b.id
  1177. where a.deleted_sign = 0
  1178. <if test="dataCategory != null and dataCategory != ''">
  1179. and a.data_category = #{dataCategory,jdbcType=INTEGER}
  1180. </if>
  1181. <if test="category != null and category != ''">
  1182. and a.category = #{category,jdbcType=INTEGER}
  1183. </if>
  1184. <if test="fieldA != null and fieldA != ''">
  1185. and a.field_a = #{fieldA,jdbcType=INTEGER}
  1186. </if>
  1187. <if test="keyword != null and keyword != ''">
  1188. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  1189. </if>
  1190. <if test="transferMode != null">
  1191. and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
  1192. </if>
  1193. <if test="upperPrice != null and upperPrice != ''">
  1194. and a.transfer_price &lt; #{upperPrice,jdbcType=VARCHAR}
  1195. </if>
  1196. <if test="lowerPrice != null and lowerPrice != ''">
  1197. and a.transfer_price &gt; #{lowerPrice,jdbcType=VARCHAR}
  1198. </if>
  1199. and a.release_status = 1
  1200. and a.audit_status = 3
  1201. <if test="dateSort == 0">
  1202. order by a.release_date asc
  1203. </if>
  1204. <if test="dateSort == 1">
  1205. order by a.release_date desc
  1206. </if>
  1207. <if test="page_sql != null">
  1208. ${page_sql}
  1209. </if>
  1210. </select>
  1211. <select id="findSearchAchievementCount" parameterType="String" resultType="java.lang.Integer">
  1212. select
  1213. count(1)
  1214. from achievement a
  1215. where a.deleted_sign = 0
  1216. <if test="dataCategory != null and dataCategory != ''">
  1217. and a.data_category = #{dataCategory,jdbcType=INTEGER}
  1218. </if>
  1219. <if test="category != null and category != ''">
  1220. and a.category = #{category,jdbcType=INTEGER}
  1221. </if>
  1222. <if test="fieldA != null and fieldA != ''">
  1223. and a.field_a = #{fieldA,jdbcType=INTEGER}
  1224. </if>
  1225. <if test="keyword != null and keyword != ''">
  1226. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  1227. </if>
  1228. <if test="transferMode != null">
  1229. and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
  1230. </if>
  1231. <if test="upperPrice != null and upperPrice != ''">
  1232. and a.transfer_price &lt; #{upperPrice,jdbcType=VARCHAR}
  1233. </if>
  1234. <if test="lowerPrice != null and lowerPrice != ''">
  1235. and a.transfer_price &gt; #{lowerPrice,jdbcType=VARCHAR}
  1236. </if>
  1237. and a.release_status = 1
  1238. and a.audit_status = 3
  1239. <if test="dateSort == 0">
  1240. order by a.release_date asc
  1241. </if>
  1242. <if test="dateSort == 1">
  1243. order by a.release_date desc
  1244. </if>
  1245. </select>
  1246. <select id="selectAchievementSearchDetail" resultType="com.goafanti.portal.bo.AchievementDetailBo">
  1247. select
  1248. a.id,
  1249. a.owner_name as ownerName,
  1250. a.serial_number as serialNumber,
  1251. a.keyword,
  1252. a.name,
  1253. a.data_category as dataCategory,
  1254. a.category,
  1255. ui.username,
  1256. oi.unit_name as unitName,
  1257. a.release_date as releaseDate,
  1258. a.owner_type as ownerType,
  1259. a.field_a as fieldA,
  1260. a.field_b as fieldB,
  1261. a.transfer_price as transferPrice,
  1262. a.maturity,
  1263. a.transfer_mode as transferMode,
  1264. a.bargaining_mode as bargainingMode,
  1265. a.summary,
  1266. a.introduction,
  1267. a.technical_picture_url as technicalPictureUrl,
  1268. a.maturity_picture_url as maturityPictureUrl,
  1269. a.maturity_text_file_url as maturityTextFileUrl,
  1270. a.maturity_video_url as maturityVideoUrl,
  1271. a.innovation,
  1272. a.cooperation_mode as cooperationMode,
  1273. a.bargaining_mode as bargainingMode,
  1274. a.technical_scene as technicalScene,
  1275. a.breakthrough,
  1276. a.patent_case as patentCase,
  1277. a.awards,
  1278. a.team_des as teamDes,
  1279. a.parameter,
  1280. a.tech_plan_url as techPlanUrl,
  1281. a.business_plan_url as businessPlanUrl,
  1282. ai.id as achievementInterestId,
  1283. ao.id as achievementOrderId,
  1284. ao.status as orderStatus
  1285. from achievement a
  1286. left join user_identity ui on ui.uid = a.owner_id
  1287. left join organization_identity oi on oi.uid = a.owner_id
  1288. left join achievement_interest ai on ai.achievement_id = a.id and ai.uid = #{0}
  1289. left join achievement_order ao on ao.achievement_id = a.id and ao.uid = #{0} and ao.status <![CDATA[ <> ]]> 6
  1290. where a.id = #{1}
  1291. </select>
  1292. <select id="findAchievementNumByUid" parameterType="java.lang.String" resultType="java.lang.Integer">
  1293. select
  1294. count(1)
  1295. from achievement
  1296. where
  1297. deleted_sign = 0
  1298. and release_status = 1
  1299. and audit_status = 3
  1300. and owner_id = #{uid,jdbcType=VARCHAR}
  1301. </select>
  1302. <select id="findPartnerAchievementListByPage" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementPartnerListBo">
  1303. SELECT
  1304. id,
  1305. serial_number AS serialNumber,
  1306. data_category AS dataCategory,
  1307. NAME,
  1308. keyword,
  1309. category,
  1310. owner_type as ownerType,
  1311. release_date AS releaseDate,
  1312. field_a as fieldA,
  1313. maturity,
  1314. introduction,
  1315. technical_picture_url as technicalPictureUrl,
  1316. bargaining_mode as bargainingMode,
  1317. transfer_price as transferPrice
  1318. FROM
  1319. achievement
  1320. WHERE
  1321. audit_status = 3
  1322. AND release_status = 1
  1323. AND deleted_sign = 0
  1324. AND owner_id = #{ownerId,jdbcType=VARCHAR}
  1325. </select>
  1326. <select id="findPartnerAchievementCount" parameterType="java.lang.String" resultType="java.lang.Integer">
  1327. SELECT
  1328. count(1)
  1329. FROM
  1330. achievement
  1331. WHERE
  1332. audit_status = 3
  1333. AND release_status = 1
  1334. AND deleted_sign = 0
  1335. AND owner_id = #{ownerId,jdbcType=VARCHAR}
  1336. </select>
  1337. <select id="findUserPortalAchievementDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.AchievementPortalDetailBo">
  1338. SELECT
  1339. a.id,
  1340. a.name,
  1341. a.keyword,
  1342. a.category,
  1343. a.introduction,
  1344. a.maturity,
  1345. a.transfer_price AS transferPrice,
  1346. a.patent_case AS patentCase,
  1347. a.field_a as fieldA,
  1348. fg.name AS fieldAS,
  1349. fgg.name AS fieldBS,
  1350. a.release_date AS releaseDate,
  1351. dg.name as province,
  1352. dgg.name as city,
  1353. a.technical_picture_url AS technicalPictureUrl,
  1354. a.transfer_mode as transferMode,
  1355. interest.id as interestId,
  1356. u.lvl as level,
  1357. a.owner_name as ownerName,
  1358. a.owner_mobile as ownerMobile,
  1359. a.bargaining_mode as bargainingMode,
  1360. ui.city as location
  1361. FROM
  1362. achievement a
  1363. LEFT JOIN <![CDATA[ user ]]> u on u.id = a.owner_id
  1364. LEFT JOIN user_identity ui on ui.uid = a.owner_id
  1365. LEFT JOIN district_glossory dg on dg.id = ui.province
  1366. LEFT JOIN district_glossory dgg on dgg.id = ui.city
  1367. LEFT JOIN field_glossory fg on fg.id = a.field_a
  1368. LEFT JOIN field_glossory fgg on fgg.id = a.field_b
  1369. LEFT JOIN achievement_interest interest on interest.achievement_id = a.id and interest.uid = #{uid,jdbcType=VARCHAR}
  1370. WHERE
  1371. a.id = #{id,jdbcType=VARCHAR}
  1372. </select>
  1373. <select id="findOrgPortalAchievementDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.AchievementPortalDetailBo">
  1374. SELECT
  1375. a.id,
  1376. a.name,
  1377. a.keyword,
  1378. a.category,
  1379. a.introduction,
  1380. a.maturity,
  1381. a.transfer_price AS transferPrice,
  1382. a.patent_case AS patentCase,
  1383. a.field_a as fieldA,
  1384. fg.name AS fieldAS,
  1385. fgg.name AS fieldBS,
  1386. a.release_date AS releaseDate,
  1387. dg.name as province,
  1388. dgg.name as city,
  1389. a.technical_picture_url AS technicalPictureUrl,
  1390. a.transfer_mode as transferMode,
  1391. interest.id as interestId,
  1392. u.lvl as level,
  1393. a.owner_name as ownerName,
  1394. a.bargaining_mode as bargainingMode
  1395. FROM
  1396. achievement a
  1397. LEFT JOIN <![CDATA[ user ]]> u on u.id = a.owner_id
  1398. LEFT JOIN organization_identity oi on oi.uid = a.owner_id
  1399. LEFT JOIN district_glossory dg on dg.id = oi.licence_province
  1400. LEFT JOIN district_glossory dgg on dgg.id = oi.licence_city
  1401. LEFT JOIN field_glossory fg on fg.id = a.field_a
  1402. LEFT JOIN field_glossory fgg on fgg.id = a.field_b
  1403. LEFT JOIN achievement_interest interest on interest.achievement_id = a.id and interest.uid = #{uid,jdbcType=VARCHAR}
  1404. WHERE
  1405. a.id = #{id,jdbcType=VARCHAR}
  1406. </select>
  1407. <select id="findUserPortalSimilarByFieldA" resultType="com.goafanti.portal.bo.AchievementPortalSimilarListBo">
  1408. SELECT
  1409. a.id,
  1410. a.name,
  1411. a.maturity,
  1412. dg.name as uprovince,
  1413. dgg.name as ucity,
  1414. dggg.name as oprovince,
  1415. dgggg.name as ocity,
  1416. a.transfer_price as transferPrice,
  1417. a.bargaining_mode as bargainingMode
  1418. FROM
  1419. achievement a
  1420. LEFT JOIN user_identity ui ON ui.uid = a.owner_id
  1421. LEFT JOIN organization_identity oi on oi.uid = a.owner_id
  1422. LEFT JOIN district_glossory dg on dg.id = ui.province
  1423. LEFT JOIN district_glossory dgg on dgg.id = ui.city
  1424. LEFT JOIN district_glossory dggg on dggg.id = oi.licence_province
  1425. LEFT JOIN district_glossory dgggg on dgggg.id = oi.licence_city
  1426. WHERE
  1427. a.audit_status = 3
  1428. AND a.deleted_sign = 0
  1429. AND a.release_status = 1
  1430. AND a.field_a = #{fieldA,jdbcType=INTEGER}
  1431. AND a.id <![CDATA[ <> ]]> #{id,jdbcType=VARCHAR}
  1432. order by a.serial_number desc
  1433. limit 5
  1434. </select>
  1435. <select id="findOrgPortalSimilarByFieldA" resultType="com.goafanti.portal.bo.AchievementPortalSimilarListBo">
  1436. SELECT
  1437. a.id,
  1438. a.name,
  1439. a.maturity,
  1440. dg.name as oprovince,
  1441. dgg.name as ocity,
  1442. dggg.name as uprovince,
  1443. dgggg.name as ucity,
  1444. a.transfer_price as transferPrice,
  1445. a.bargaining_mode as bargainingMode
  1446. FROM
  1447. achievement a
  1448. LEFT JOIN organization_identity oi ON oi.uid = a.owner_id
  1449. LEFT JOIN user_identity ui ON ui.uid = a.owner_id
  1450. LEFT JOIN district_glossory dg on dg.id = oi.licence_province
  1451. LEFT JOIN district_glossory dgg on dgg.id = oi.licence_city
  1452. LEFT JOIN district_glossory dggg on dggg.id = ui.province
  1453. LEFT JOIN district_glossory dgggg on dgggg.id = ui.city
  1454. WHERE
  1455. a.audit_status = 3
  1456. AND a.deleted_sign = 0
  1457. AND a.release_status = 1
  1458. AND a.field_a = #{fieldA,jdbcType=INTEGER}
  1459. AND a.id <![CDATA[ <> ]]> #{id,jdbcType=VARCHAR}
  1460. order by a.serial_number desc
  1461. limit 5
  1462. </select>
  1463. <update id="updateOwnerId" parameterType="java.lang.String" >
  1464. update achievement
  1465. set owner_id = null
  1466. where id = #{id,jdbcType=VARCHAR}
  1467. </update>
  1468. <select id="selectInternationalAchievement" resultType="com.goafanti.portal.bo.InternationalListBo">
  1469. select
  1470. a.id as id,
  1471. a.name as techName,
  1472. a.introduction,
  1473. a.owner_name as ownerName,
  1474. a.owner_type as ownerType,
  1475. a.technical_picture_url as technicalPictureUrl,
  1476. a.country_name_zh as countryNameZh
  1477. from
  1478. achievement a
  1479. where
  1480. a.deleted_sign = 0 and a.data_category = 1
  1481. <!-- and a.release_status = 1 and nternational_flag = 1 -->
  1482. order by
  1483. a.release_date desc
  1484. limit 0,5
  1485. </select>
  1486. <select id="selectJmrhAchievement" resultType="com.goafanti.residentIntegration.bo.ResidentIntegrationBo">
  1487. select
  1488. id, name, owner_type as ownerType
  1489. from
  1490. achievement t
  1491. where
  1492. jmrh_flag = 1 and data_category = 0 and audit_status = 3
  1493. order by
  1494. create_time desc
  1495. limit 5;
  1496. </select>
  1497. <select id="selectJmrTechnology" resultType="com.goafanti.residentIntegration.bo.ResidentIntegrationBo">
  1498. select
  1499. id, name, maturity, owner_type as ownerType
  1500. from
  1501. achievement t
  1502. where
  1503. jmrh_flag = 1 and data_category = 1 and audit_status = 3
  1504. order by
  1505. create_time desc
  1506. limit 5;
  1507. </select>
  1508. <select id="selectJmrProject" resultType="com.goafanti.residentIntegration.bo.ResidentIntegrationBo">
  1509. select
  1510. a.id, a.name, c.residence_city as residenceCity,d.name as industry, owner_type as ownerType
  1511. from
  1512. achievement a
  1513. left join
  1514. user b on a.owner_id = b.id
  1515. left join
  1516. user_info c on b.id = c.uid
  1517. left join
  1518. field_glossory d on a.field_a = d.id
  1519. where
  1520. jmrh_flag = 1 and data_category = 1 and audit_status = 3
  1521. order by
  1522. a.create_time asc
  1523. limit 5;
  1524. </select>
  1525. <select id="findBoutiqueListByPage" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.BoutiqueListBo">
  1526. select
  1527. a.id ,
  1528. a.name,
  1529. a.transfer_price as price,
  1530. a.summary as sketch,
  1531. a.technical_picture_url as pictureUrl,
  1532. a.owner_type as ownerType,
  1533. b.name as industryCatalog,
  1534. a.owner_name as personName
  1535. from
  1536. achievement a
  1537. left join
  1538. field_glossory b
  1539. on
  1540. a.field_a = b.id
  1541. where
  1542. a.boutique = 1 and a.audit_status = 3 and a.deleted_sign=0
  1543. <if test="fieldA != null and fieldA != ''">
  1544. and a.field_a = #{fieldA,jdbcType=INTEGER}
  1545. </if>
  1546. <if test="dataCategory != null and dataCategory != ''">
  1547. and data_category = #{dataCategory,jdbcType=INTEGER}
  1548. </if>
  1549. <if test="category != null and category != ''">
  1550. and category = #{category,jdbcType=INTEGER}
  1551. </if>
  1552. order by a.create_time desc
  1553. <if test="page_sql!=null">
  1554. ${page_sql}
  1555. </if>
  1556. </select>
  1557. <select id="findBoutiqueCount" parameterType="java.lang.String" resultType="java.lang.Integer">
  1558. select
  1559. count(0)
  1560. from
  1561. achievement a
  1562. left join
  1563. field_glossory b
  1564. on
  1565. a.field_a = b.id
  1566. where
  1567. a.boutique = 1 and a.audit_status = 3 and a.deleted_sign=0
  1568. <if test="fieldA != null and fieldA != ''">
  1569. and a.field_a = #{fieldA,jdbcType=INTEGER}
  1570. </if>
  1571. <if test="dataCategory != null and dataCategory != ''">
  1572. and data_category = #{dataCategory,jdbcType=INTEGER}
  1573. </if>
  1574. <if test="category != null and category != ''">
  1575. and category = #{category,jdbcType=INTEGER}
  1576. </if>
  1577. </select>
  1578. <select id="listAchievement" resultType="com.goafanti.achievement.bo.AchievementListBo">
  1579. select
  1580. a.id, a.name, a.keyword,a.introduction,a.category,
  1581. a.serial_number as serialNumber,
  1582. a.data_category as dataCategory,
  1583. a.owner_type as ownerType,
  1584. a.owner_name as ownerName,
  1585. a.field_a as fieldA,
  1586. a.transfer_price as transferPrice,
  1587. a.transfer_mode as transfermode,
  1588. a.maturity,
  1589. a.technical_picture_url as technicalpictureurl
  1590. from achievement a
  1591. where
  1592. a.deleted_sign = 0
  1593. and a.category = 0
  1594. and a.release_status = 1
  1595. and a.audit_status = 3
  1596. order by a.release_date desc limit 0,12
  1597. </select>
  1598. <!-- 查询猜你喜欢 -->
  1599. <select id="selectCsutomerLike" resultType="com.goafanti.achievement.bo.AchievementListBo">
  1600. select
  1601. a.id, a.name, a.keyword,a.introduction,a.category,
  1602. a.serial_number as serialNumber,
  1603. a.data_category as dataCategory,
  1604. a.owner_type as ownerType,
  1605. a.owner_name as ownerName,
  1606. a.field_a as fieldA,
  1607. a.field_b as fieldB,
  1608. a.transfer_price as transferPrice,
  1609. a.technical_picture_url as technicalpictureurl
  1610. from achievement a
  1611. LEFT JOIN aft.achievement_interest b on a.id = b.achievement_id
  1612. where
  1613. a.deleted_sign = 0
  1614. and category = 0
  1615. and a.release_status = 1
  1616. and a.audit_status = 3
  1617. <if test="boutique != null">
  1618. and a.boutique= #{boutique,jdbcType=INTEGER}
  1619. </if>
  1620. order by a.release_date desc limit 0,4
  1621. </select>
  1622. <select id="findBusinessVarietiesListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.BusinessBo">
  1623. select
  1624. b.id,b.create_id,b.create_time,b.update_time,b.delete_sign,b.cid,
  1625. b.cname,b.super_id,b.super_id,b.layer,b.status,b2.cname
  1626. from business_varieties b
  1627. LEFT JOIN business_varieties b2 on b.super_id = b2.id
  1628. where b.deleted_sign= 1
  1629. <if test="cname != null">
  1630. and b.cname= #{cname,jdbcType=VARCHAR}
  1631. </if>
  1632. <if test="super_id != null">
  1633. and b.super_id= #{super_id,jdbcType=INTEGER}
  1634. </if>
  1635. <if test="layer != null">
  1636. and layer= #{layer,jdbcType=VARCHAR}
  1637. </if>
  1638. <if test="status != null">
  1639. and status= #{status,jdbcType=VARCHAR}
  1640. </if>
  1641. order by b.id desc
  1642. <if test="page_sql!=null">
  1643. ${page_sql}
  1644. </if>
  1645. </select>
  1646. <select id="findBusinessVarietiesListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.BusinessBo">
  1647. select
  1648. count(distinct(c.id))
  1649. from business_varieties b
  1650. LEFT JOIN business_varieties b2 on b.super_id = b2.id
  1651. where b.deleted_sign= 1
  1652. <if test="cname != null">
  1653. and b.cname= #{cname,jdbcType=VARCHAR}
  1654. </if>
  1655. <if test="super_id != null">
  1656. and b.super_id= #{super_id,jdbcType=INTEGER}
  1657. </if>
  1658. <if test="layer != null">
  1659. and layer= #{layer,jdbcType=VARCHAR}
  1660. </if>
  1661. <if test="status != null">
  1662. and status= #{status,jdbcType=VARCHAR}
  1663. </if>
  1664. </select>
  1665. </mapper>