AchievementMapper.xml 76 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061
  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="manager_id" jdbcType="VARCHAR" property="managerId" />
  48. <result column="salesman_id" jdbcType="VARCHAR" property="salesmanId" />
  49. <result column="status" jdbcType="INTEGER" property="status" />
  50. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  51. <result column="release_status" jdbcType="INTEGER" property="releaseStatus" />
  52. <result column="release_date" jdbcType="TIMESTAMP" property="releaseDate" />
  53. <result column="deleted_sign" jdbcType="INTEGER" property="deletedSign" />
  54. <result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
  55. <result column="tech_broker_id" jdbcType="VARCHAR" property="techBrokerId" />
  56. <result column="country_name_zh" jdbcType="VARCHAR" property="countryNameZh" />
  57. <result column="international_flag" jdbcType="INTEGER" property="internationalFlag" />
  58. <result column="jmrh_flag" jdbcType="INTEGER" property="jmrhFlag" />
  59. <result column="boutique" jdbcType="INTEGER" property="boutique" />
  60. <result column="contacts" jdbcType="VARCHAR" property="contacts" />
  61. <result column="contact_mobile" jdbcType="VARCHAR" property="contactMobile" />
  62. </resultMap>
  63. <sql id="Base_Column_List">
  64. id, serial_number, data_category, name, keyword, category, summary, introduction,
  65. technical_picture_url, field_a, field_b, field_c, maturity, maturity_picture_url,
  66. maturity_text_file_url, maturity_video_url, innovation, owner_id, owner_name, owner_type, owner_id_number,
  67. owner_mobile, owner_email, owner_postal_address, cooperation_mode, transfer_mode,
  68. bargaining_mode, transfer_price, technical_scene, breakthrough, patent_case, awards,
  69. team_des, parameter, tech_plan_url, business_plan_url, org_id, org_name, org_address,
  70. org_email, org_contacts, org_contacts_mobile, contacts, manager_id, salesman_id,
  71. status, create_time, release_status, release_date, deleted_sign, audit_status, tech_broker_id,
  72. country_name_zh,international_flag,jmrh_flag,boutique
  73. </sql>
  74. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  75. select
  76. <include refid="Base_Column_List" />
  77. from achievement
  78. where id = #{id,jdbcType=VARCHAR}
  79. </select>
  80. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  81. delete from achievement
  82. where id = #{id,jdbcType=VARCHAR}
  83. </delete>
  84. <insert id="insert" parameterType="com.goafanti.common.model.Achievement">
  85. insert into achievement (id, serial_number, data_category,
  86. name, keyword, category,
  87. summary, introduction, technical_picture_url,
  88. field_a, field_b, field_c,
  89. maturity, maturity_picture_url, maturity_text_file_url,
  90. maturity_video_url, innovation, owner_id, owner_name,
  91. owner_type, owner_id_number, owner_mobile,
  92. owner_email, owner_postal_address, cooperation_mode,
  93. transfer_mode, bargaining_mode, transfer_price,
  94. technical_scene, breakthrough, patent_case,
  95. awards, team_des, parameter,
  96. tech_plan_url, business_plan_url, org_id,
  97. org_name, org_address, org_email,
  98. org_contacts, org_contacts_mobile,
  99. manager_id, salesman_id, status,
  100. create_time, release_status, release_date,
  101. deleted_sign, audit_status, tech_broker_id,
  102. country_name_zh,international_flag,jmrh_flag,boutique,remark,contacts,contact_mobile )
  103. values (#{id,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, #{dataCategory,jdbcType=INTEGER},
  104. #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{category,jdbcType=INTEGER},
  105. #{summary,jdbcType=VARCHAR}, #{introduction,jdbcType=LONGVARCHAR}, #{technicalPictureUrl,jdbcType=VARCHAR},
  106. #{fieldA,jdbcType=INTEGER}, #{fieldB,jdbcType=INTEGER}, #{fieldC,jdbcType=INTEGER},
  107. #{maturity,jdbcType=INTEGER}, #{maturityPictureUrl,jdbcType=LONGVARCHAR}, #{maturityTextFileUrl,jdbcType=VARCHAR},
  108. #{maturityVideoUrl,jdbcType=VARCHAR}, #{innovation,jdbcType=INTEGER}, #{ownerId,jdbcType=VARCHAR}, #{ownerName,jdbcType=VARCHAR},
  109. #{ownerType,jdbcType=INTEGER}, #{ownerIdNumber,jdbcType=VARCHAR}, #{ownerMobile,jdbcType=VARCHAR},
  110. #{ownerEmail,jdbcType=VARCHAR}, #{ownerPostalAddress,jdbcType=VARCHAR}, #{cooperationMode,jdbcType=INTEGER},
  111. #{transferMode,jdbcType=INTEGER}, #{bargainingMode,jdbcType=INTEGER}, #{transferPrice,jdbcType=DECIMAL},
  112. #{technicalScene,jdbcType=VARCHAR}, #{breakthrough,jdbcType=VARCHAR}, #{patentCase,jdbcType=VARCHAR},
  113. #{awards,jdbcType=VARCHAR}, #{teamDes,jdbcType=VARCHAR}, #{parameter,jdbcType=VARCHAR},
  114. #{techPlanUrl,jdbcType=VARCHAR}, #{businessPlanUrl,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR},
  115. #{orgName,jdbcType=VARCHAR}, #{orgAddress,jdbcType=VARCHAR}, #{orgEmail,jdbcType=VARCHAR},
  116. #{orgContacts,jdbcType=VARCHAR}, #{orgContactsMobile,jdbcType=VARCHAR},
  117. #{managerId,jdbcType=VARCHAR}, #{salesmanId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
  118. #{createTime,jdbcType=TIMESTAMP}, #{releaseStatus,jdbcType=INTEGER}, #{releaseDate,jdbcType=TIMESTAMP},
  119. #{deletedSign,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER}, #{techBrokerId,jdbcType=VARCHAR},
  120. #{countryNameZh,jdbcType=VARCHAR}, #{internationalFlag,jdbcType=INTEGER},#{jmrhFlag,jdbcType=INTEGER},#{boutique,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR},#{contacts,jdbcType=VARCHAR},#{contactMobile,jdbcType=VARCHAR})
  121. </insert>
  122. <insert id="insertSelective" parameterType="com.goafanti.common.model.Achievement">
  123. insert into achievement
  124. <trim prefix="(" suffix=")" suffixOverrides=",">
  125. <if test="id != null">
  126. id,
  127. </if>
  128. <if test="serialNumber != null">
  129. serial_number,
  130. </if>
  131. <if test="dataCategory != null">
  132. data_category,
  133. </if>
  134. <if test="name != null">
  135. name,
  136. </if>
  137. <if test="keyword != null">
  138. keyword,
  139. </if>
  140. <if test="category != null">
  141. category,
  142. </if>
  143. <if test="summary != null">
  144. summary,
  145. </if>
  146. <if test="introduction != null">
  147. introduction,
  148. </if>
  149. <if test="technicalPictureUrl != null">
  150. technical_picture_url,
  151. </if>
  152. <if test="fieldA != null">
  153. field_a,
  154. </if>
  155. <if test="fieldB != null">
  156. field_b,
  157. </if>
  158. <if test="fieldC != null">
  159. field_c,
  160. </if>
  161. <if test="maturity != null">
  162. maturity,
  163. </if>
  164. <if test="maturityPictureUrl != null">
  165. maturity_picture_url,
  166. </if>
  167. <if test="maturityTextFileUrl != null">
  168. maturity_text_file_url,
  169. </if>
  170. <if test="maturityVideoUrl != null">
  171. maturity_video_url,
  172. </if>
  173. <if test="innovation != null">
  174. innovation,
  175. </if>
  176. <if test="ownerId != null">
  177. owner_id,
  178. </if>
  179. <if test="ownerName != null">
  180. owner_name,
  181. </if>
  182. <if test="ownerType != null">
  183. owner_type,
  184. </if>
  185. <if test="ownerIdNumber != null">
  186. owner_id_number,
  187. </if>
  188. <if test="ownerMobile != null">
  189. owner_mobile,
  190. </if>
  191. <if test="ownerEmail != null">
  192. owner_email,
  193. </if>
  194. <if test="ownerPostalAddress != null">
  195. owner_postal_address,
  196. </if>
  197. <if test="cooperationMode != null">
  198. cooperation_mode,
  199. </if>
  200. <if test="transferMode != null">
  201. transfer_mode,
  202. </if>
  203. <if test="bargainingMode != null">
  204. bargaining_mode,
  205. </if>
  206. <if test="transferPrice != null">
  207. transfer_price,
  208. </if>
  209. <if test="technicalScene != null">
  210. technical_scene,
  211. </if>
  212. <if test="breakthrough != null">
  213. breakthrough,
  214. </if>
  215. <if test="patentCase != null">
  216. patent_case,
  217. </if>
  218. <if test="awards != null">
  219. awards,
  220. </if>
  221. <if test="teamDes != null">
  222. team_des,
  223. </if>
  224. <if test="parameter != null">
  225. parameter,
  226. </if>
  227. <if test="techPlanUrl != null">
  228. tech_plan_url,
  229. </if>
  230. <if test="businessPlanUrl != null">
  231. business_plan_url,
  232. </if>
  233. <if test="orgId != null">
  234. org_id,
  235. </if>
  236. <if test="orgName != null">
  237. org_name,
  238. </if>
  239. <if test="orgAddress != null">
  240. org_address,
  241. </if>
  242. <if test="orgEmail != null">
  243. org_email,
  244. </if>
  245. <if test="orgContacts != null">
  246. org_contacts,
  247. </if>
  248. <if test="orgContactsMobile != null">
  249. org_contacts_mobile,
  250. </if>
  251. <if test="contacts != null">
  252. contacts,
  253. </if>
  254. <if test="managerId != null">
  255. manager_id,
  256. </if>
  257. <if test="salesmanId != null">
  258. salesman_id,
  259. </if>
  260. <if test="status != null">
  261. status,
  262. </if>
  263. <if test="createTime != null">
  264. create_time,
  265. </if>
  266. <if test="releaseStatus != null">
  267. release_status,
  268. </if>
  269. <if test="releaseDate != null">
  270. release_date,
  271. </if>
  272. <if test="deletedSign != null">
  273. deleted_sign,
  274. </if>
  275. <if test="auditStatus != null">
  276. audit_status,
  277. </if>
  278. <if test="techBrokerId != null">
  279. tech_broker_id,
  280. </if>
  281. <if test="countryNameZh != null">
  282. country_name_zh,
  283. </if>
  284. <if test="internationalFlag != null">
  285. international_flag,
  286. </if>
  287. <if test="jmrhFlag != null">
  288. jmrh_flag,
  289. </if>
  290. <if test="boutique !=null">
  291. boutique,
  292. </if>
  293. </trim>
  294. <trim prefix="values (" suffix=")" suffixOverrides=",">
  295. <if test="id != null">
  296. #{id,jdbcType=VARCHAR},
  297. </if>
  298. <if test="serialNumber != null">
  299. #{serialNumber,jdbcType=INTEGER},
  300. </if>
  301. <if test="dataCategory != null">
  302. #{dataCategory,jdbcType=INTEGER},
  303. </if>
  304. <if test="name != null">
  305. #{name,jdbcType=VARCHAR},
  306. </if>
  307. <if test="keyword != null">
  308. #{keyword,jdbcType=VARCHAR},
  309. </if>
  310. <if test="category != null">
  311. #{category,jdbcType=INTEGER},
  312. </if>
  313. <if test="summary != null">
  314. #{summary,jdbcType=VARCHAR},
  315. </if>
  316. <if test="introduction != null">
  317. #{introduction,jdbcType=LONGVARCHAR},
  318. </if>
  319. <if test="technicalPictureUrl != null">
  320. #{technicalPictureUrl,jdbcType=VARCHAR},
  321. </if>
  322. <if test="fieldA != null">
  323. #{fieldA,jdbcType=INTEGER},
  324. </if>
  325. <if test="fieldB != null">
  326. #{fieldB,jdbcType=INTEGER},
  327. </if>
  328. <if test="fieldC != null">
  329. #{fieldC,jdbcType=INTEGER},
  330. </if>
  331. <if test="maturity != null">
  332. #{maturity,jdbcType=INTEGER},
  333. </if>
  334. <if test="maturityPictureUrl != null">
  335. #{maturityPictureUrl,jdbcType=LONGVARCHAR},
  336. </if>
  337. <if test="maturityTextFileUrl != null">
  338. #{maturityTextFileUrl,jdbcType=VARCHAR},
  339. </if>
  340. <if test="maturityVideoUrl != null">
  341. #{maturityVideoUrl,jdbcType=VARCHAR},
  342. </if>
  343. <if test="innovation != null">
  344. #{innovation,jdbcType=INTEGER},
  345. </if>
  346. <if test="ownerId != null">
  347. #{ownerId,jdbcType=VARCHAR},
  348. </if>
  349. <if test="ownerName != null">
  350. #{ownerName,jdbcType=VARCHAR},
  351. </if>
  352. <if test="ownerType != null">
  353. #{ownerType,jdbcType=INTEGER},
  354. </if>
  355. <if test="ownerIdNumber != null">
  356. #{ownerIdNumber,jdbcType=VARCHAR},
  357. </if>
  358. <if test="ownerMobile != null">
  359. #{ownerMobile,jdbcType=VARCHAR},
  360. </if>
  361. <if test="ownerEmail != null">
  362. #{ownerEmail,jdbcType=VARCHAR},
  363. </if>
  364. <if test="ownerPostalAddress != null">
  365. #{ownerPostalAddress,jdbcType=VARCHAR},
  366. </if>
  367. <if test="cooperationMode != null">
  368. #{cooperationMode,jdbcType=INTEGER},
  369. </if>
  370. <if test="transferMode != null">
  371. #{transferMode,jdbcType=INTEGER},
  372. </if>
  373. <if test="bargainingMode != null">
  374. #{bargainingMode,jdbcType=INTEGER},
  375. </if>
  376. <if test="transferPrice != null">
  377. #{transferPrice,jdbcType=DECIMAL},
  378. </if>
  379. <if test="technicalScene != null">
  380. #{technicalScene,jdbcType=VARCHAR},
  381. </if>
  382. <if test="breakthrough != null">
  383. #{breakthrough,jdbcType=VARCHAR},
  384. </if>
  385. <if test="patentCase != null">
  386. #{patentCase,jdbcType=VARCHAR},
  387. </if>
  388. <if test="awards != null">
  389. #{awards,jdbcType=VARCHAR},
  390. </if>
  391. <if test="teamDes != null">
  392. #{teamDes,jdbcType=VARCHAR},
  393. </if>
  394. <if test="parameter != null">
  395. #{parameter,jdbcType=VARCHAR},
  396. </if>
  397. <if test="techPlanUrl != null">
  398. #{techPlanUrl,jdbcType=VARCHAR},
  399. </if>
  400. <if test="businessPlanUrl != null">
  401. #{businessPlanUrl,jdbcType=VARCHAR},
  402. </if>
  403. <if test="orgId != null">
  404. #{orgId,jdbcType=VARCHAR},
  405. </if>
  406. <if test="orgName != null">
  407. #{orgName,jdbcType=VARCHAR},
  408. </if>
  409. <if test="orgAddress != null">
  410. #{orgAddress,jdbcType=VARCHAR},
  411. </if>
  412. <if test="orgEmail != null">
  413. #{orgEmail,jdbcType=VARCHAR},
  414. </if>
  415. <if test="orgContacts != null">
  416. #{orgContacts,jdbcType=VARCHAR},
  417. </if>
  418. <if test="orgContactsMobile != null">
  419. #{orgContactsMobile,jdbcType=VARCHAR},
  420. </if>
  421. <if test="contacts != null">
  422. #{contacts,jdbcType=INTEGER},
  423. </if>
  424. <if test="managerId != null">
  425. #{managerId,jdbcType=VARCHAR},
  426. </if>
  427. <if test="salesmanId != null">
  428. #{salesmanId,jdbcType=VARCHAR},
  429. </if>
  430. <if test="status != null">
  431. #{status,jdbcType=INTEGER},
  432. </if>
  433. <if test="createTime != null">
  434. #{createTime,jdbcType=TIMESTAMP},
  435. </if>
  436. <if test="releaseStatus != null">
  437. #{releaseStatus,jdbcType=INTEGER},
  438. </if>
  439. <if test="releaseDate != null">
  440. #{releaseDate,jdbcType=TIMESTAMP},
  441. </if>
  442. <if test="deletedSign != null">
  443. #{deletedSign,jdbcType=INTEGER},
  444. </if>
  445. <if test="auditStatus != null">
  446. #{auditStatus,jdbcType=INTEGER},
  447. </if>
  448. <if test="techBrokerId != null">
  449. #{techBrokerId,jdbcType=VARCHAR},
  450. </if>
  451. <if test="countryNameZh != null">
  452. #{countryNameZh,jdbcType=VARCHAR},
  453. </if>
  454. <if test="internationalFlag != null">
  455. #{internationalFlag,jdbcType=INTEGER},
  456. </if>
  457. <if test="jmrhFlag != null">
  458. #{jmrhFlag,jdbcType=INTEGER},
  459. </if>
  460. <if test="boutique != null">
  461. #{boutique,jdbcType=INTEGER}
  462. </if>
  463. </trim>
  464. </insert>
  465. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Achievement">
  466. update achievement
  467. <set>
  468. <if test="serialNumber != null">
  469. serial_number = #{serialNumber,jdbcType=INTEGER},
  470. </if>
  471. <if test="dataCategory != null">
  472. data_category = #{dataCategory,jdbcType=INTEGER},
  473. </if>
  474. <if test="name != null">
  475. name = #{name,jdbcType=VARCHAR},
  476. </if>
  477. <if test="keyword != null">
  478. keyword = #{keyword,jdbcType=VARCHAR},
  479. </if>
  480. <if test="category != null">
  481. category = #{category,jdbcType=INTEGER},
  482. </if>
  483. <if test="summary != null">
  484. summary = #{summary,jdbcType=VARCHAR},
  485. </if>
  486. <if test="introduction != null">
  487. introduction = #{introduction,jdbcType=LONGVARCHAR},
  488. </if>
  489. <if test="technicalPictureUrl != null">
  490. technical_picture_url = #{technicalPictureUrl,jdbcType=VARCHAR},
  491. </if>
  492. <if test="fieldA != null">
  493. field_a = #{fieldA,jdbcType=INTEGER},
  494. </if>
  495. <if test="fieldB != null">
  496. field_b = #{fieldB,jdbcType=INTEGER},
  497. </if>
  498. <if test="fieldC != null">
  499. field_c = #{fieldC,jdbcType=INTEGER},
  500. </if>
  501. <if test="maturity != null">
  502. maturity = #{maturity,jdbcType=INTEGER},
  503. </if>
  504. <if test="maturityPictureUrl != null">
  505. maturity_picture_url = #{maturityPictureUrl,jdbcType=LONGVARCHAR},
  506. </if>
  507. <if test="maturityTextFileUrl != null">
  508. maturity_text_file_url = #{maturityTextFileUrl,jdbcType=VARCHAR},
  509. </if>
  510. <if test="maturityVideoUrl != null">
  511. maturity_video_url = #{maturityVideoUrl,jdbcType=VARCHAR},
  512. </if>
  513. <if test="innovation != null">
  514. innovation = #{innovation,jdbcType=INTEGER},
  515. </if>
  516. <if test="ownerId != null">
  517. owner_id = #{ownerId,jdbcType=VARCHAR},
  518. </if>
  519. <if test="ownerName != null">
  520. owner_name = #{ownerName,jdbcType=VARCHAR},
  521. </if>
  522. <if test="ownerType != null">
  523. owner_type = #{ownerType,jdbcType=INTEGER},
  524. </if>
  525. <if test="ownerIdNumber != null">
  526. owner_id_number = #{ownerIdNumber,jdbcType=VARCHAR},
  527. </if>
  528. <if test="ownerMobile != null">
  529. owner_mobile = #{ownerMobile,jdbcType=VARCHAR},
  530. </if>
  531. <if test="ownerEmail != null">
  532. owner_email = #{ownerEmail,jdbcType=VARCHAR},
  533. </if>
  534. <if test="ownerPostalAddress != null">
  535. owner_postal_address = #{ownerPostalAddress,jdbcType=VARCHAR},
  536. </if>
  537. <if test="cooperationMode != null">
  538. cooperation_mode = #{cooperationMode,jdbcType=INTEGER},
  539. </if>
  540. <if test="transferMode != null">
  541. transfer_mode = #{transferMode,jdbcType=INTEGER},
  542. </if>
  543. <if test="bargainingMode != null">
  544. bargaining_mode = #{bargainingMode,jdbcType=INTEGER},
  545. </if>
  546. <if test="transferPrice != null">
  547. transfer_price = #{transferPrice,jdbcType=DECIMAL},
  548. </if>
  549. <if test="technicalScene != null">
  550. technical_scene = #{technicalScene,jdbcType=VARCHAR},
  551. </if>
  552. <if test="breakthrough != null">
  553. breakthrough = #{breakthrough,jdbcType=VARCHAR},
  554. </if>
  555. <if test="patentCase != null">
  556. patent_case = #{patentCase,jdbcType=VARCHAR},
  557. </if>
  558. <if test="awards != null">
  559. awards = #{awards,jdbcType=VARCHAR},
  560. </if>
  561. <if test="teamDes != null">
  562. team_des = #{teamDes,jdbcType=VARCHAR},
  563. </if>
  564. <if test="parameter != null">
  565. parameter = #{parameter,jdbcType=VARCHAR},
  566. </if>
  567. <if test="techPlanUrl != null">
  568. tech_plan_url = #{techPlanUrl,jdbcType=VARCHAR},
  569. </if>
  570. <if test="businessPlanUrl != null">
  571. business_plan_url = #{businessPlanUrl,jdbcType=VARCHAR},
  572. </if>
  573. <if test="orgId != null">
  574. org_id = #{orgId,jdbcType=VARCHAR},
  575. </if>
  576. <if test="orgName != null">
  577. org_name = #{orgName,jdbcType=VARCHAR},
  578. </if>
  579. <if test="orgAddress != null">
  580. org_address = #{orgAddress,jdbcType=VARCHAR},
  581. </if>
  582. <if test="orgEmail != null">
  583. org_email = #{orgEmail,jdbcType=VARCHAR},
  584. </if>
  585. <if test="orgContacts != null">
  586. org_contacts = #{orgContacts,jdbcType=VARCHAR},
  587. </if>
  588. <if test="orgContactsMobile != null">
  589. org_contacts_mobile = #{orgContactsMobile,jdbcType=VARCHAR},
  590. </if>
  591. <if test="contacts != null">
  592. contacts = #{contacts,jdbcType=INTEGER},
  593. </if>
  594. <if test="managerId != null">
  595. manager_id = #{managerId,jdbcType=VARCHAR},
  596. </if>
  597. <if test="salesmanId != null">
  598. salesman_id = #{salesmanId,jdbcType=VARCHAR},
  599. </if>
  600. <if test="status != null">
  601. status = #{status,jdbcType=INTEGER},
  602. </if>
  603. <if test="createTime != null">
  604. create_time = #{createTime,jdbcType=TIMESTAMP},
  605. </if>
  606. <if test="releaseStatus != null">
  607. release_status = #{releaseStatus,jdbcType=INTEGER},
  608. </if>
  609. <if test="releaseDate != null">
  610. release_date = #{releaseDate,jdbcType=TIMESTAMP},
  611. </if>
  612. <if test="deletedSign != null">
  613. deleted_sign = #{deletedSign,jdbcType=INTEGER},
  614. </if>
  615. <if test="auditStatus != null">
  616. audit_status = #{auditStatus,jdbcType=INTEGER},
  617. </if>
  618. <if test="techBrokerId != null">
  619. tech_broker_id = #{techBrokerId,jdbcType=VARCHAR},
  620. </if>
  621. <if test="countryNameZh != null">
  622. country_name_zh = #{countryNameZh,jdbcType=VARCHAR},
  623. </if>
  624. <if test="internationalFlag != null">
  625. international_flag = #{internationalFlag,jdbcType=INTEGER},
  626. </if>
  627. <if test="jmrhFlag != null">
  628. jmrh_flag = #{jmrhFlag,jdbcType=INTEGER},
  629. </if>
  630. <if test="boutique != null">
  631. boutique = #{boutique,jdbcType=INTEGER},
  632. </if>
  633. <if test="remark != null">
  634. remark = #{remark,jdbcType=VARCHAR},
  635. </if>
  636. <if test="contacts != null">
  637. contacts = #{contacts,jdbcType=VARCHAR},
  638. </if>
  639. <if test="contactMobile != null">
  640. contact_mobile = #{contactMobile ,jdbcType=VARCHAR},
  641. </if>
  642. </set>
  643. where id = #{id,jdbcType=VARCHAR}
  644. </update>
  645. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Achievement">
  646. update achievement
  647. set serial_number = #{serialNumber,jdbcType=INTEGER},
  648. data_category = #{dataCategory,jdbcType=INTEGER},
  649. name = #{name,jdbcType=VARCHAR},
  650. keyword = #{keyword,jdbcType=VARCHAR},
  651. category = #{category,jdbcType=INTEGER},
  652. summary = #{summary,jdbcType=VARCHAR},
  653. introduction = #{introduction,jdbcType=LONGVARCHAR},
  654. technical_picture_url = #{technicalPictureUrl,jdbcType=VARCHAR},
  655. field_a = #{fieldA,jdbcType=INTEGER},
  656. field_b = #{fieldB,jdbcType=INTEGER},
  657. field_c = #{fieldC,jdbcType=INTEGER},
  658. maturity = #{maturity,jdbcType=INTEGER},
  659. maturity_picture_url = #{maturityPictureUrl,jdbcType=LONGVARCHAR},
  660. maturity_text_file_url = #{maturityTextFileUrl,jdbcType=VARCHAR},
  661. maturity_video_url = #{maturityVideoUrl,jdbcType=VARCHAR},
  662. innovation = #{innovation,jdbcType=INTEGER},
  663. owner_id = #{ownerId,jdbcType=VARCHAR},
  664. owner_name = #{ownerName,jdbcType=VARCHAR},
  665. owner_type = #{ownerType,jdbcType=INTEGER},
  666. owner_id_number = #{ownerIdNumber,jdbcType=VARCHAR},
  667. owner_mobile = #{ownerMobile,jdbcType=VARCHAR},
  668. owner_email = #{ownerEmail,jdbcType=VARCHAR},
  669. owner_postal_address = #{ownerPostalAddress,jdbcType=VARCHAR},
  670. cooperation_mode = #{cooperationMode,jdbcType=INTEGER},
  671. transfer_mode = #{transferMode,jdbcType=INTEGER},
  672. bargaining_mode = #{bargainingMode,jdbcType=INTEGER},
  673. transfer_price = #{transferPrice,jdbcType=DECIMAL},
  674. technical_scene = #{technicalScene,jdbcType=VARCHAR},
  675. breakthrough = #{breakthrough,jdbcType=VARCHAR},
  676. patent_case = #{patentCase,jdbcType=VARCHAR},
  677. awards = #{awards,jdbcType=VARCHAR},
  678. team_des = #{teamDes,jdbcType=VARCHAR},
  679. parameter = #{parameter,jdbcType=VARCHAR},
  680. tech_plan_url = #{techPlanUrl,jdbcType=VARCHAR},
  681. business_plan_url = #{businessPlanUrl,jdbcType=VARCHAR},
  682. org_id = #{orgId,jdbcType=VARCHAR},
  683. org_name = #{orgName,jdbcType=VARCHAR},
  684. org_address = #{orgAddress,jdbcType=VARCHAR},
  685. org_email = #{orgEmail,jdbcType=VARCHAR},
  686. org_contacts = #{orgContacts,jdbcType=VARCHAR},
  687. org_contacts_mobile = #{orgContactsMobile,jdbcType=VARCHAR},
  688. contacts = #{contacts,jdbcType=INTEGER},
  689. manager_id = #{managerId,jdbcType=VARCHAR},
  690. salesman_id = #{salesmanId,jdbcType=VARCHAR},
  691. status = #{status,jdbcType=INTEGER},
  692. create_time = #{createTime,jdbcType=TIMESTAMP},
  693. release_status = #{releaseStatus,jdbcType=INTEGER},
  694. release_date = #{releaseDate,jdbcType=TIMESTAMP},
  695. deleted_sign = #{deletedSign,jdbcType=INTEGER},
  696. audit_status = #{auditStatus,jdbcType=INTEGER},
  697. tech_broker_id = #{techBrokerId,jdbcType=VARCHAR},
  698. country_name_zh = #{countryNameZh,jdbcType=VARCHAR},
  699. international_flag = #{internationalFlag,jdbcType=INTEGER},
  700. jmrh_flag = #{jmrhFlag,jdbcType=INTEGER},
  701. boutique = #{boutique,jdbcType=INTEGER}
  702. where id = #{id,jdbcType=VARCHAR}
  703. </update>
  704. <select id="findUserOwnerAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
  705. select
  706. a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
  707. a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType,
  708. ui.username as username, a.owner_id as ownerId, a.org_id as orgId, a.contacts,
  709. a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique,a.create_time as createTime
  710. from achievement a
  711. LEFT JOIN admin ad on ad.id = a.tech_broker_id
  712. LEFT JOIN user_identity ui on a.owner_id = ui.uid
  713. where a.deleted_sign = 0 and a.owner_type = 0
  714. <if test="ownerName != null">
  715. and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
  716. and (a.owner_id is null or a.owner_id = '')
  717. </if>
  718. <if test="username != null">
  719. and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
  720. </if>
  721. <if test="ownerId != null">
  722. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  723. </if>
  724. <if test="serialNumber != null">
  725. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  726. </if>
  727. <if test="auditStatus != null">
  728. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  729. </if>
  730. <if test="name != null">
  731. and a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  732. </if>
  733. <if test="keyword != null">
  734. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  735. </if>
  736. <if test="category != null">
  737. and a.category = #{category,jdbcType=INTEGER}
  738. </if>
  739. <if test="status != null">
  740. and a.status = #{status,jdbcType=INTEGER}
  741. </if>
  742. <if test="rStart != null">
  743. and a.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
  744. </if>
  745. <if test="rEnd != null">
  746. and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  747. </if>
  748. <if test="cStart != null">
  749. and a.create_time <![CDATA[ > ]]> #{cStart,jdbcType=TIMESTAMP}
  750. </if>
  751. <if test="cEnd != null">
  752. and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
  753. </if>
  754. <if test="releaseStatus != null">
  755. and a.release_status = #{releaseStatus,jdbcType=INTEGER}
  756. </if>
  757. <if test="techBrokerId != null">
  758. and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
  759. </if>
  760. <if test="boutique != null">
  761. and a.boutique = #{boutique,jdbcType=INTEGER}
  762. </if>
  763. order by a.serial_number desc
  764. <if test="page_sql!=null">
  765. ${page_sql}
  766. </if>
  767. </select>
  768. <select id="findUserOwnerAchievementCount" parameterType="String" resultType="java.lang.Integer">
  769. select
  770. count(1)
  771. from achievement a
  772. where deleted_sign = 0 and owner_type = 0
  773. <if test="ownerName != null">
  774. and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
  775. and (a.owner_id is null or a.owner_id = '')
  776. </if>
  777. <if test="username != null">
  778. and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
  779. </if>
  780. <if test="ownerId != null">
  781. and owner_id = #{ownerId,jdbcType=VARCHAR}
  782. </if>
  783. <if test="serialNumber != null">
  784. and serial_number = #{serialNumber,jdbcType=INTEGER}
  785. </if>
  786. <if test="auditStatus != null">
  787. and audit_status = #{auditStatus,jdbcType=INTEGER}
  788. </if>
  789. <if test="name != null">
  790. and name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  791. </if>
  792. <if test="keyword != null">
  793. and keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  794. </if>
  795. <if test="category != null">
  796. and category = #{category,jdbcType=INTEGER}
  797. </if>
  798. <if test="status != null">
  799. and status = #{status,jdbcType=INTEGER}
  800. </if>
  801. <if test="rStart != null">
  802. and release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
  803. </if>
  804. <if test="rEnd != null">
  805. and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  806. </if>
  807. <if test="cStart != null">
  808. and a.create_time <![CDATA[ > ]]> #{cStart,jdbcType=TIMESTAMP}
  809. </if>
  810. <if test="cEnd != null">
  811. and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
  812. </if>
  813. <if test="releaseStatus != null">
  814. and release_status = #{releaseStatus,jdbcType=INTEGER}
  815. </if>
  816. <if test="techBrokerId != null">
  817. and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
  818. </if>
  819. <if test="boutique != null">
  820. and a.boutique = #{boutique,jdbcType=INTEGER}
  821. </if>
  822. </select>
  823. <select id="findOrgOwnerAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
  824. select
  825. a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
  826. a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType,
  827. a.owner_id as ownerId, a.org_id as orgId,a.create_time as createTime,
  828. a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique,ad.id techBrokerIdd,
  829. a.release_status as releaseStatus
  830. from achievement a
  831. LEFT JOIN admin ad on ad.id = a.tech_broker_id
  832. where a.deleted_sign = 0
  833. <if test="recordPerson != null">
  834. and ad.name = #{recordPerson,jdbcType=VARCHAR}
  835. </if>
  836. <if test="ownerType != null">
  837. and a.owner_type = #{ownerType,jdbcType=VARCHAR}
  838. </if>
  839. <if test="ownerName != null">
  840. and a.owner_name like CONCAT(#{ownerName,jdbcType=VARCHAR},'%')
  841. </if>
  842. <if test="ownerId != null">
  843. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  844. </if>
  845. <if test="serialNumber != null">
  846. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  847. </if>
  848. <if test="auditStatus != null">
  849. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  850. </if>
  851. <if test="name != null">
  852. and a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  853. </if>
  854. <if test="keyword != null">
  855. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  856. </if>
  857. <if test="category != null">
  858. and a.category = #{category,jdbcType=INTEGER}
  859. </if>
  860. <if test="status != null">
  861. and a.status = #{status,jdbcType=INTEGER}
  862. </if>
  863. <if test="rStart != null">
  864. and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  865. </if>
  866. <if test="rEnd != null">
  867. and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  868. </if>
  869. <if test="cStart != null">
  870. and a.create_time <![CDATA[ >= ]]> #{cStart,jdbcType=TIMESTAMP}
  871. </if>
  872. <if test="cEnd != null">
  873. and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
  874. </if>
  875. <if test="releaseStatus != null">
  876. and a.release_status = #{releaseStatus,jdbcType=INTEGER}
  877. </if>
  878. <if test="boutique != null">
  879. and a.boutique = #{boutique,jdbcType=INTEGER}
  880. </if>
  881. order by serial_number desc
  882. <if test="page_sql!=null">
  883. ${page_sql}
  884. </if>
  885. </select>
  886. <select id="findOrgOwnerAchievementCount" parameterType="String" resultType="java.lang.Integer">
  887. select
  888. count(1)
  889. from achievement a
  890. LEFT JOIN admin ad on ad.id = a.tech_broker_id
  891. where a.deleted_sign = 0
  892. <if test="recordPerson != null">
  893. and ad.name = #{recordPerson,jdbcType=VARCHAR}
  894. </if>
  895. <if test="ownerType != null">
  896. and a.owner_type = #{ownerType,jdbcType=VARCHAR}
  897. </if>
  898. <if test="ownerName != null">
  899. and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
  900. </if>
  901. <if test="ownerId != null">
  902. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  903. </if>
  904. <if test="serialNumber != null">
  905. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  906. </if>
  907. <if test="auditStatus != null">
  908. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  909. </if>
  910. <if test="name != null">
  911. and a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  912. </if>
  913. <if test="keyword != null">
  914. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  915. </if>
  916. <if test="category != null">
  917. and a.category = #{category,jdbcType=INTEGER}
  918. </if>
  919. <if test="status != null">
  920. and a.status = #{status,jdbcType=INTEGER}
  921. </if>
  922. <if test="rStart != null">
  923. and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  924. </if>
  925. <if test="rEnd != null">
  926. and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  927. </if>
  928. <if test="cStart != null">
  929. and a.create_time <![CDATA[ >= ]]> #{cStart,jdbcType=TIMESTAMP}
  930. </if>
  931. <if test="cEnd != null">
  932. and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
  933. </if>
  934. <if test="releaseStatus != null">
  935. and a.release_status = #{releaseStatus,jdbcType=INTEGER}
  936. </if>
  937. <if test="boutique != null">
  938. and a.boutique = #{boutique,jdbcType=INTEGER}
  939. </if>
  940. </select>
  941. <update id="updateReleaseDate" parameterType="java.lang.String">
  942. update achievement set release_date = null
  943. where id = #{id,jdbcType=VARCHAR}
  944. </update>
  945. <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
  946. update achievement set deleted_sign = 1
  947. where id in
  948. <foreach item="item" collection="list" open="(" separator="," close=")">
  949. #{item}
  950. </foreach>
  951. </update>
  952. <select id="findAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
  953. select
  954. a.id, a.serial_number as serialNumber, a.data_category as dataCategory, a.boutique,
  955. a.name, a.keyword, a.category, a.introduction,owner_postal_address as ownerPostalAddress,
  956. a.owner_name as ownerName, a.owner_type as ownerType, a.owner_mobile as ownerMobile,a.field_a as fieldA,a.field_b ,a.field_c as fieldC,
  957. a.status, a.release_date as releaseDate, a.audit_status as auditStatus,f.name as field,f2.name as fieldB,ifnull(b.countInterest,0) as countInterest
  958. from achievement a
  959. left join (
  960. select count(0) as countInterest,achievement_id from achievement_interest group by achievement_id
  961. )b on a.id = b.achievement_id
  962. left join field_glossory f on a.field_a=f.id
  963. left join field_glossory f2 on a.field_b=f2.id
  964. where deleted_sign = 0
  965. <if test="ownerId != null">
  966. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  967. </if>
  968. <if test="serialNumber != null">
  969. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  970. </if>
  971. <if test="auditStatus != null">
  972. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  973. </if>
  974. <if test="name != null">
  975. and a.name = #{name,jdbcType=VARCHAR}
  976. </if>
  977. <if test="keyword != null">
  978. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  979. </if>
  980. <if test="dataCategory != null and dataCategory != ''">
  981. and a.data_category = #{dataCategory,jdbcType=INTEGER}
  982. </if>
  983. <if test="category != null">
  984. and a.category = #{category,jdbcType=INTEGER}
  985. </if>
  986. <if test="ownerType != null">
  987. and a.owner_type = #{ownerType,jdbcType=INTEGER}
  988. </if>
  989. <if test="fieldA != null">
  990. and a.field_a = #{fieldA,jdbcType=VARCHAR}
  991. </if>
  992. <if test="status != null">
  993. and a.status = #{status,jdbcType=INTEGER}
  994. </if>
  995. <if test="rStart != null">
  996. and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  997. </if>
  998. <if test="rEnd != null">
  999. and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  1000. </if>
  1001. <if test="releaseStatus != null">
  1002. and a.release_status = #{releaseStatus,jdbcType=INTEGER}
  1003. </if>
  1004. order by serial_number desc
  1005. <if test="page_sql!=null">
  1006. ${page_sql}
  1007. </if>
  1008. </select>
  1009. <select id="findAchievementCount" parameterType="String" resultType="java.lang.Integer">
  1010. select
  1011. count(1)
  1012. from achievement a
  1013. left join (
  1014. select count(0) as countInterest,achievement_id from achievement_interest group by achievement_id
  1015. )b on a.id = b.achievement_id
  1016. left join field_glossory f on a.field_a=f.id
  1017. left join field_glossory f2 on a.field_b=f2.id
  1018. where deleted_sign = 0
  1019. <if test="ownerId != null">
  1020. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  1021. </if>
  1022. <if test="serialNumber != null">
  1023. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  1024. </if>
  1025. <if test="auditStatus != null">
  1026. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  1027. </if>
  1028. <if test="name != null">
  1029. and a.name = #{name,jdbcType=VARCHAR}
  1030. </if>
  1031. </select>
  1032. <select id="findAppAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
  1033. select
  1034. a.id, a.serial_number as serialNumber, a.data_category as dataCategory, a.boutique,
  1035. a.name, a.keyword, a.category, a.introduction,owner_postal_address as ownerPostalAddress,
  1036. a.owner_name as ownerName, a.owner_type as ownerType, a.owner_mobile as ownerMobile,a.field_a as fieldA,a.field_b ,a.field_c as fieldC,
  1037. a.status, a.release_date as releaseDate, a.audit_status as auditStatus,f.name as field,f2.name as fieldB,ifnull(b.countInterest,0) as countInterest
  1038. from achievement a
  1039. left join (
  1040. select count(0) as countInterest,achievement_id from achievement_interest group by achievement_id
  1041. )b on a.id = b.achievement_id
  1042. left join field_glossory f on a.field_a=f.id
  1043. left join field_glossory f2 on a.field_b=f2.id
  1044. where deleted_sign = 0
  1045. and audit_status = 3
  1046. <if test="ownerId != null">
  1047. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  1048. </if>
  1049. <if test="serialNumber != null">
  1050. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  1051. </if>
  1052. <if test="auditStatus != null">
  1053. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  1054. </if>
  1055. <if test="name != null">
  1056. and a.name = #{name,jdbcType=VARCHAR}
  1057. </if>
  1058. <if test="keyword != null">
  1059. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  1060. </if>
  1061. <if test="dataCategory != null and dataCategory != ''">
  1062. and a.data_category = #{dataCategory,jdbcType=INTEGER}
  1063. </if>
  1064. <if test="category != null">
  1065. and a.category = #{category,jdbcType=INTEGER}
  1066. </if>
  1067. <if test="ownerType != null">
  1068. and a.owner_type = #{ownerType,jdbcType=INTEGER}
  1069. </if>
  1070. <if test="fieldA != null">
  1071. and a.field_a = #{fieldA,jdbcType=VARCHAR}
  1072. </if>
  1073. <if test="status != null">
  1074. and a.status = #{status,jdbcType=INTEGER}
  1075. </if>
  1076. <if test="rStart != null">
  1077. and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  1078. </if>
  1079. <if test="rEnd != null">
  1080. and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  1081. </if>
  1082. <if test="releaseStatus != null">
  1083. and a.release_status = #{releaseStatus,jdbcType=INTEGER}
  1084. </if>
  1085. order by a.boutique desc
  1086. <if test="page_sql!=null">
  1087. ${page_sql}
  1088. </if>
  1089. </select>
  1090. <select id="findAppAchievementCount" parameterType="String" resultType="java.lang.Integer">
  1091. select
  1092. count(1)
  1093. from achievement a
  1094. left join field_glossory f on a.field_a=f.id
  1095. left join field_glossory f2 on a.field_b=f2.id
  1096. where deleted_sign = 0
  1097. and audit_status = 3
  1098. <if test="ownerId != null">
  1099. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  1100. </if>
  1101. <if test="serialNumber != null">
  1102. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  1103. </if>
  1104. <if test="auditStatus != null">
  1105. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  1106. </if>
  1107. <if test="name != null">
  1108. and a.name = #{name,jdbcType=VARCHAR}
  1109. </if>
  1110. <if test="keyword != null">
  1111. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  1112. </if>
  1113. <if test="dataCategory != null and dataCategory != ''">
  1114. and a.data_category = #{dataCategory,jdbcType=INTEGER}
  1115. </if>
  1116. <if test="category != null">
  1117. and a.category = #{category,jdbcType=INTEGER}
  1118. </if>
  1119. <if test="ownerType != null">
  1120. and a.owner_type = #{ownerType,jdbcType=INTEGER}
  1121. </if>
  1122. <if test="fieldA != null">
  1123. and a.field_a = #{fieldA,jdbcType=VARCHAR}
  1124. </if>
  1125. <if test="status != null">
  1126. and a.status = #{status,jdbcType=INTEGER}
  1127. </if>
  1128. <if test="rStart != null">
  1129. and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  1130. </if>
  1131. <if test="rEnd != null">
  1132. and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  1133. </if>
  1134. <if test="releaseStatus != null">
  1135. and a.release_status = #{releaseStatus,jdbcType=INTEGER}
  1136. </if>
  1137. </select>
  1138. <select id="selectUserOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementUserOwnerDetailBo">
  1139. select
  1140. a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
  1141. a.name, a.keyword, a.category,
  1142. a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl,
  1143. a.field_a as fieldA, a.field_b as fieldB, a.field_c as fieldC, f.name as field1, f2.name as field2,
  1144. a.maturity, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl,
  1145. a.maturity_video_url as maturityVideoUrl, a.innovation, a.owner_id as ownerId,
  1146. a.owner_name as ownerName, a.owner_type as ownerType, a.owner_id_number as ownerIdNumber,
  1147. a.owner_mobile as ownerMobile, a.owner_email as ownerEmail, a.owner_postal_address as ownerPostalAddress,
  1148. a.cooperation_mode as cooperationMode, a.transfer_mode as transferMode, a.bargaining_mode as bargainingMode,
  1149. a.transfer_price as transferPrice, a.technical_scene as technicalScene, a.breakthrough,
  1150. a.patent_case as patentCase, a.awards, a.team_des as teamDes,
  1151. a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl,
  1152. a.contacts, a.manager_id as managerId, a.salesman_id as salesmanId,
  1153. a.create_time as createTime, a.release_status as releaseStatus,
  1154. a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
  1155. ui.username as iOwnerName, ui.province, ui.city, ui.area, u.email as iOwnerEmail,
  1156. ui.id_number as iOwnerIdNumber, u.mobile as iOwnerMobile,j.easemob_name as easemobName,a.remark,
  1157. ifnull(t.x,0) as orderIntentionCount ,ifnull(t2.x,0) as orderCount,a.boutique,a.contacts,a.contact_mobile as contactMobile,
  1158. a.international_flag as internationalFlag
  1159. from achievement a
  1160. left join user_identity ui on a.owner_id = ui.uid
  1161. left join field_glossory f on a.field_a=f.id
  1162. left join field_glossory f2 on a.field_b=f2.id
  1163. left join (select count(0) as x,tl.commodity_id from t_order tr
  1164. left join t_order_detail tl on tl.order_no=tr.order_no
  1165. where order_status != 4
  1166. group by tl.commodity_id ) t on a.id=t.commodity_id
  1167. left join (select count(0) as x,tl.commodity_id from t_order tr
  1168. left join t_order_detail tl on tl.order_no=tr.order_no
  1169. where tr.order_status != 4 and tr.order_status != 0
  1170. group by tl.commodity_id) t2 on a.id=t2.commodity_id
  1171. left join jpush_easemob_account j on a.owner_id=j.uid
  1172. left join user u on u.id = a.owner_id
  1173. where a.id =#{id,jdbcType=VARCHAR}
  1174. </select>
  1175. <select id="selectOrgOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementOrgOwnerDetailBo">
  1176. select
  1177. a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
  1178. a.name, a.keyword, a.category,
  1179. a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl,
  1180. a.field_a as fieldA, a.field_b as fieldB, a.field_c as fieldC,
  1181. a.maturity, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl,
  1182. a.maturity_video_url as maturityVideoUrl, a.innovation, a.owner_id as ownerId,
  1183. a.owner_name as ownerName, a.owner_type as ownerType, a.owner_id_number as ownerIdNumber,
  1184. a.owner_mobile as ownerMobile, a.owner_email as ownerEmail, a.owner_postal_address as ownerPostalAddress,
  1185. a.cooperation_mode as cooperationMode, a.transfer_mode as transferMode, a.bargaining_mode as bargainingMode,
  1186. a.transfer_price as transferPrice, a.technical_scene as technicalScene, a.breakthrough,
  1187. a.patent_case as patentCase, a.awards, a.team_des as teamDes,
  1188. a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl,
  1189. a.contacts, a.manager_id as managerId, a.salesman_id as salesmanId, a.international_flag as internationalFlag,
  1190. a.create_time as createTime, a.release_status as releaseStatus,
  1191. a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
  1192. oi.unit_name as iOwnerName, oi.postal_address as iOwnerPostalAddress, u.email as iOwnerEmail,
  1193. oi.org_code as iOwnerIdNumber, u.mobile as iOwnerMobile,a.boutique,a.remark,a.contacts,a.contact_mobile as contactMobile
  1194. from achievement a
  1195. left join organization_identity oi on a.owner_id = oi.uid
  1196. left join user u on u.id = a.owner_id
  1197. where a.id = #{id,jdbcType=VARCHAR}
  1198. </select>
  1199. <insert id="insertBatch" parameterType="com.goafanti.common.model.Achievement">
  1200. insert into achievement
  1201. (id, deleted_sign, audit_status,
  1202. create_time, release_status, data_category,
  1203. name, keyword, category,
  1204. owner_name, owner_type, owner_id_number,
  1205. owner_mobile, owner_email, owner_postal_address,
  1206. cooperation_mode, introduction, tech_broker_id,international_flag
  1207. )
  1208. values
  1209. <foreach item="item" index="index" collection="list" separator=",">
  1210. (
  1211. #{item.id,jdbcType=VARCHAR}, #{item.deletedSign,jdbcType=INTEGER}, #{item.auditStatus,jdbcType=INTEGER},
  1212. #{item.createTime,jdbcType=TIMESTAMP}, #{item.releaseStatus,jdbcType=INTEGER}, #{item.dataCategory,jdbcType=INTEGER},
  1213. #{item.name,jdbcType=VARCHAR}, #{item.keyword,jdbcType=VARCHAR}, #{item.category,jdbcType=INTEGER},
  1214. #{item.ownerName,jdbcType=VARCHAR}, #{item.ownerType,jdbcType=VARCHAR}, #{item.ownerIdNumber,jdbcType=VARCHAR},
  1215. #{item.ownerMobile,jdbcType=VARCHAR}, #{item.ownerEmail,jdbcType=VARCHAR}, #{item.ownerPostalAddress,jdbcType=VARCHAR},
  1216. #{item.cooperationMode,jdbcType=INTEGER}, #{item.introduction,jdbcType=LONGVARCHAR},#{item.techBrokerId,jdbcType=VARCHAR},
  1217. #{item.internationalFlag,jdbcType=INTEGER}
  1218. )
  1219. </foreach>
  1220. </insert>
  1221. <select id="findSearchAchievementListByPage" parameterType="String" resultType="com.goafanti.portal.bo.AchievementSearchListBo">
  1222. select
  1223. a.id, a.name, a.keyword,a.introduction,a.category,
  1224. a.serial_number as serialNumber,
  1225. a.data_category as dataCategory,
  1226. a.owner_type as ownerType,
  1227. a.owner_name as ownerName,
  1228. a.field_a as fieldA,
  1229. a.field_b as fieldB,
  1230. a.transfer_price as transferPrice,
  1231. a.maturity,
  1232. a.introduction,a.boutique,
  1233. a.transfer_mode as transferMode,
  1234. a.technical_picture_url as technicalPictureUrl,
  1235. b.name as fieldAs,
  1236. ap.publish_page,ap.publish_platform,ap.publish_client,ap.if_top,ap.top_number,ap.show_number,bi.domain_name
  1237. from achievement a
  1238. right join achievement_publish ap on a.id=ap.achievement_id
  1239. left join branch_information bi on bi.id=ap.publish_platform
  1240. left join field_glossory b on a.field_a = b.id
  1241. where a.deleted_sign = 0
  1242. and ap.publish_client=0
  1243. and ap.publish_page='W02'
  1244. and bi.domain_name like "%"#{url,jdbcType=VARCHAR}"%"
  1245. <if test="dataCategory != null and dataCategory != ''">
  1246. and a.data_category = #{dataCategory,jdbcType=INTEGER}
  1247. </if>
  1248. <if test="category != null and category != ''">
  1249. and a.category = #{category,jdbcType=INTEGER}
  1250. </if>
  1251. <if test="fieldA != null and fieldA != ''">
  1252. and a.field_a = #{fieldA,jdbcType=INTEGER}
  1253. </if>
  1254. <if test="keyword != null and keyword != ''">
  1255. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  1256. </if>
  1257. <if test="transferMode != null">
  1258. and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
  1259. </if>
  1260. <if test="upperPrice != null and upperPrice != ''">
  1261. and a.transfer_price &lt; #{upperPrice,jdbcType=VARCHAR}
  1262. </if>
  1263. <if test="lowerPrice != null and lowerPrice != ''">
  1264. and a.transfer_price &gt; #{lowerPrice,jdbcType=VARCHAR}
  1265. </if>
  1266. <if test="internationalFlag != null ">
  1267. and a.international_flag = #{internationalFlag,jdbcType=INTEGER}
  1268. </if>
  1269. and a.audit_status = 3
  1270. <if test="dateSort == 0">
  1271. order by ap.if_top,ap.top_number,ap.show_number,a.release_date asc
  1272. </if>
  1273. <if test="dateSort == 1">
  1274. order by ap.if_top asc,ap.top_number asc,ap.show_number asc,a.release_date desc
  1275. </if>
  1276. <if test="page_sql != null">
  1277. ${page_sql}
  1278. </if>
  1279. </select>
  1280. <select id="findSearchAchievementCount" parameterType="String" resultType="java.lang.Integer">
  1281. select
  1282. count(1)
  1283. from achievement a
  1284. right join achievement_publish ap on a.id=ap.achievement_id
  1285. left join branch_information bi on bi.id=ap.publish_platform
  1286. left join field_glossory b on a.field_a = b.id
  1287. where a.deleted_sign = 0
  1288. and ap.publish_client=0
  1289. and ap.publish_page='W02'
  1290. and bi.domain_name like "%"#{url,jdbcType=VARCHAR}"%"
  1291. <if test="dataCategory != null and dataCategory != ''">
  1292. and a.data_category = #{dataCategory,jdbcType=INTEGER}
  1293. </if>
  1294. <if test="category != null and category != ''">
  1295. and a.category = #{category,jdbcType=INTEGER}
  1296. </if>
  1297. <if test="fieldA != null and fieldA != ''">
  1298. and a.field_a = #{fieldA,jdbcType=INTEGER}
  1299. </if>
  1300. <if test="keyword != null and keyword != ''">
  1301. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  1302. </if>
  1303. <if test="transferMode != null">
  1304. and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
  1305. </if>
  1306. <if test="upperPrice != null and upperPrice != ''">
  1307. and a.transfer_price &lt; #{upperPrice,jdbcType=VARCHAR}
  1308. </if>
  1309. <if test="lowerPrice != null and lowerPrice != ''">
  1310. and a.transfer_price &gt; #{lowerPrice,jdbcType=VARCHAR}
  1311. </if>
  1312. <if test="internationalFlag != null ">
  1313. and a.international_flag = #{internationalFlag,jdbcType=INTEGER}
  1314. </if>
  1315. and a.audit_status = 3
  1316. </select>
  1317. <select id="selectAchievementSearchDetail" resultType="com.goafanti.portal.bo.AchievementDetailBo">
  1318. select
  1319. a.id,
  1320. a.owner_name as ownerName,
  1321. a.serial_number as serialNumber,
  1322. a.keyword,
  1323. a.name,
  1324. a.data_category as dataCategory,
  1325. a.category,
  1326. ui.username,
  1327. oi.unit_name as unitName,
  1328. a.release_date as releaseDate,
  1329. a.owner_type as ownerType,
  1330. a.field_a as fieldA,
  1331. a.field_b as fieldB,
  1332. a.transfer_price as transferPrice,
  1333. a.maturity,
  1334. a.transfer_mode as transferMode,
  1335. a.bargaining_mode as bargainingMode,
  1336. a.summary,
  1337. a.introduction,
  1338. a.technical_picture_url as technicalPictureUrl,
  1339. a.maturity_picture_url as maturityPictureUrl,
  1340. a.maturity_text_file_url as maturityTextFileUrl,
  1341. a.maturity_video_url as maturityVideoUrl,
  1342. a.innovation,
  1343. a.cooperation_mode as cooperationMode,
  1344. a.bargaining_mode as bargainingMode,
  1345. a.technical_scene as technicalScene,
  1346. a.breakthrough,
  1347. a.patent_case as patentCase,
  1348. a.awards,
  1349. a.team_des as teamDes,
  1350. a.parameter,
  1351. a.tech_plan_url as techPlanUrl,
  1352. a.business_plan_url as businessPlanUrl,
  1353. ai.id as achievementInterestId,
  1354. ao.id as achievementOrderId,
  1355. ao.status as orderStatus
  1356. from achievement a
  1357. left join user_identity ui on ui.uid = a.owner_id
  1358. left join organization_identity oi on oi.uid = a.owner_id
  1359. left join achievement_interest ai on ai.achievement_id = a.id and ai.uid = #{0}
  1360. where a.id = #{1}
  1361. </select>
  1362. <select id="findAchievementNumByUid" parameterType="java.lang.String" resultType="java.lang.Integer">
  1363. select
  1364. count(1)
  1365. from achievement
  1366. where
  1367. deleted_sign = 0
  1368. and release_status = 1
  1369. and audit_status = 3
  1370. and owner_id = #{uid,jdbcType=VARCHAR}
  1371. </select>
  1372. <select id="findPartnerAchievementListByPage" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementPartnerListBo">
  1373. SELECT
  1374. id,
  1375. serial_number AS serialNumber,
  1376. data_category AS dataCategory,
  1377. NAME,
  1378. keyword,
  1379. category,
  1380. owner_type as ownerType,
  1381. release_date AS releaseDate,
  1382. field_a as fieldA,
  1383. maturity,
  1384. introduction,
  1385. technical_picture_url as technicalPictureUrl,
  1386. bargaining_mode as bargainingMode,
  1387. transfer_price as transferPrice
  1388. FROM
  1389. achievement
  1390. WHERE
  1391. audit_status = 3
  1392. AND release_status = 1
  1393. AND deleted_sign = 0
  1394. AND owner_id = #{ownerId,jdbcType=VARCHAR}
  1395. </select>
  1396. <select id="findPartnerAchievementCount" parameterType="java.lang.String" resultType="java.lang.Integer">
  1397. SELECT
  1398. count(1)
  1399. FROM
  1400. achievement
  1401. WHERE
  1402. audit_status = 3
  1403. AND release_status = 1
  1404. AND deleted_sign = 0
  1405. AND owner_id = #{ownerId,jdbcType=VARCHAR}
  1406. </select>
  1407. <select id="findUserPortalAchievementDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.AchievementPortalDetailBo">
  1408. SELECT
  1409. a.id,
  1410. a.name,
  1411. a.keyword,
  1412. a.category,
  1413. a.introduction,
  1414. a.maturity,
  1415. a.transfer_price AS transferPrice,
  1416. a.patent_case AS patentCase,
  1417. a.field_a as fieldA,
  1418. fg.name AS fieldAS,
  1419. fgg.name AS fieldBS,
  1420. a.release_date AS releaseDate,
  1421. dg.name as province,
  1422. dgg.name as city,
  1423. a.technical_picture_url AS technicalPictureUrl,
  1424. a.transfer_mode as transferMode,
  1425. interest.id as interestId,
  1426. u.lvl as level,
  1427. a.owner_name as ownerName,
  1428. a.owner_mobile as ownerMobile,
  1429. a.bargaining_mode as bargainingMode,
  1430. ui.city as location
  1431. FROM
  1432. achievement a
  1433. LEFT JOIN <![CDATA[ user ]]> u on u.id = a.owner_id
  1434. LEFT JOIN user_identity ui on ui.uid = a.owner_id
  1435. LEFT JOIN district_glossory dg on dg.id = ui.province
  1436. LEFT JOIN district_glossory dgg on dgg.id = ui.city
  1437. LEFT JOIN field_glossory fg on fg.id = a.field_a
  1438. LEFT JOIN field_glossory fgg on fgg.id = a.field_b
  1439. LEFT JOIN achievement_interest interest on interest.achievement_id = a.id and interest.uid = #{uid,jdbcType=VARCHAR}
  1440. WHERE
  1441. a.id = #{id,jdbcType=VARCHAR}
  1442. </select>
  1443. <select id="findOrgPortalAchievementDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.AchievementPortalDetailBo">
  1444. SELECT
  1445. a.id,
  1446. a.name,
  1447. a.keyword,
  1448. a.category,
  1449. a.introduction,
  1450. a.maturity,
  1451. a.transfer_price AS transferPrice,
  1452. a.patent_case AS patentCase,
  1453. a.field_a as fieldA,
  1454. fg.name AS fieldAS,
  1455. fgg.name AS fieldBS,
  1456. a.release_date AS releaseDate,
  1457. dg.name as province,
  1458. dgg.name as city,
  1459. a.technical_picture_url AS technicalPictureUrl,
  1460. a.transfer_mode as transferMode,
  1461. interest.id as interestId,
  1462. u.lvl as level,
  1463. a.owner_name as ownerName,
  1464. a.bargaining_mode as bargainingMode
  1465. FROM
  1466. achievement a
  1467. LEFT JOIN <![CDATA[ user ]]> u on u.id = a.owner_id
  1468. LEFT JOIN organization_identity oi on oi.uid = a.owner_id
  1469. LEFT JOIN district_glossory dg on dg.id = oi.licence_province
  1470. LEFT JOIN district_glossory dgg on dgg.id = oi.licence_city
  1471. LEFT JOIN field_glossory fg on fg.id = a.field_a
  1472. LEFT JOIN field_glossory fgg on fgg.id = a.field_b
  1473. LEFT JOIN achievement_interest interest on interest.achievement_id = a.id and interest.uid = #{uid,jdbcType=VARCHAR}
  1474. WHERE
  1475. a.id = #{id,jdbcType=VARCHAR}
  1476. </select>
  1477. <select id="findUserPortalSimilarByFieldA" resultType="com.goafanti.portal.bo.AchievementPortalSimilarListBo">
  1478. SELECT
  1479. a.id,
  1480. a.name,
  1481. a.maturity,
  1482. dg.name as uprovince,
  1483. dgg.name as ucity,
  1484. dggg.name as oprovince,
  1485. dgggg.name as ocity,
  1486. a.transfer_price as transferPrice,
  1487. a.bargaining_mode as bargainingMode
  1488. FROM
  1489. achievement a
  1490. LEFT JOIN user_identity ui ON ui.uid = a.owner_id
  1491. LEFT JOIN organization_identity oi on oi.uid = a.owner_id
  1492. LEFT JOIN district_glossory dg on dg.id = ui.province
  1493. LEFT JOIN district_glossory dgg on dgg.id = ui.city
  1494. LEFT JOIN district_glossory dggg on dggg.id = oi.licence_province
  1495. LEFT JOIN district_glossory dgggg on dgggg.id = oi.licence_city
  1496. WHERE
  1497. a.audit_status = 3
  1498. AND a.deleted_sign = 0
  1499. AND a.release_status = 1
  1500. AND a.field_a = #{fieldA,jdbcType=INTEGER}
  1501. AND a.id <![CDATA[ <> ]]> #{id,jdbcType=VARCHAR}
  1502. order by a.serial_number desc
  1503. limit 5
  1504. </select>
  1505. <select id="findOrgPortalSimilarByFieldA" resultType="com.goafanti.portal.bo.AchievementPortalSimilarListBo">
  1506. SELECT
  1507. a.id,
  1508. a.name,
  1509. a.maturity,
  1510. dg.name as oprovince,
  1511. dgg.name as ocity,
  1512. dggg.name as uprovince,
  1513. dgggg.name as ucity,
  1514. a.transfer_price as transferPrice,
  1515. a.bargaining_mode as bargainingMode
  1516. FROM
  1517. achievement a
  1518. LEFT JOIN organization_identity oi ON oi.uid = a.owner_id
  1519. LEFT JOIN user_identity ui ON ui.uid = a.owner_id
  1520. LEFT JOIN district_glossory dg on dg.id = oi.licence_province
  1521. LEFT JOIN district_glossory dgg on dgg.id = oi.licence_city
  1522. LEFT JOIN district_glossory dggg on dggg.id = ui.province
  1523. LEFT JOIN district_glossory dgggg on dgggg.id = ui.city
  1524. WHERE
  1525. a.audit_status = 3
  1526. AND a.deleted_sign = 0
  1527. AND a.release_status = 1
  1528. AND a.field_a = #{fieldA,jdbcType=INTEGER}
  1529. AND a.id <![CDATA[ <> ]]> #{id,jdbcType=VARCHAR}
  1530. order by a.serial_number desc
  1531. limit 5
  1532. </select>
  1533. <update id="updateOwnerId" parameterType="java.lang.String" >
  1534. update achievement
  1535. set owner_id = null
  1536. where id = #{id,jdbcType=VARCHAR}
  1537. </update>
  1538. <select id="selectInternationalAchievement" resultType="com.goafanti.portal.bo.InternationalListBo">
  1539. select
  1540. a.id as id,
  1541. a.name as techName,
  1542. a.introduction,
  1543. a.owner_name as ownerName,
  1544. a.owner_type as ownerType,
  1545. a.technical_picture_url as technicalPictureUrl,
  1546. a.country_name_zh as countryNameZh
  1547. from
  1548. achievement a
  1549. where
  1550. a.deleted_sign = 0 and a.data_category = 1
  1551. <!-- and a.release_status = 1 and nternational_flag = 1 -->
  1552. order by
  1553. a.release_date desc
  1554. limit 0,5
  1555. </select>
  1556. <select id="findBoutiqueListByPage" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.BoutiqueListBo">
  1557. select
  1558. a.id ,
  1559. a.name,
  1560. a.transfer_price as price,
  1561. a.summary as sketch,
  1562. a.technical_picture_url as pictureUrl,
  1563. a.owner_type as ownerType,
  1564. b.name as industryCatalog,
  1565. a.owner_name as personName
  1566. from
  1567. achievement a
  1568. left join
  1569. field_glossory b
  1570. on
  1571. a.field_a = b.id
  1572. where
  1573. a.boutique = 1 and a.audit_status = 3 and a.deleted_sign=0
  1574. <if test="fieldA != null and fieldA != ''">
  1575. and a.field_a = #{fieldA,jdbcType=INTEGER}
  1576. </if>
  1577. <if test="dataCategory != null and dataCategory != ''">
  1578. and data_category = #{dataCategory,jdbcType=INTEGER}
  1579. </if>
  1580. <if test="category != null and category != ''">
  1581. and category = #{category,jdbcType=INTEGER}
  1582. </if>
  1583. order by a.create_time desc
  1584. <if test="page_sql!=null">
  1585. ${page_sql}
  1586. </if>
  1587. </select>
  1588. <select id="findBoutiqueCount" parameterType="java.lang.String" resultType="java.lang.Integer">
  1589. select
  1590. count(0)
  1591. from
  1592. achievement a
  1593. left join
  1594. field_glossory b
  1595. on
  1596. a.field_a = b.id
  1597. where
  1598. a.boutique = 1 and a.audit_status = 3 and a.deleted_sign=0
  1599. <if test="fieldA != null and fieldA != ''">
  1600. and a.field_a = #{fieldA,jdbcType=INTEGER}
  1601. </if>
  1602. <if test="dataCategory != null and dataCategory != ''">
  1603. and data_category = #{dataCategory,jdbcType=INTEGER}
  1604. </if>
  1605. <if test="category != null and category != ''">
  1606. and category = #{category,jdbcType=INTEGER}
  1607. </if>
  1608. </select>
  1609. <select id="listAchievement" resultType="com.goafanti.achievement.bo.AchievementListBo">
  1610. select
  1611. a.id, a.name, a.keyword,a.introduction,a.category,
  1612. a.serial_number as serialNumber,
  1613. a.data_category as dataCategory,
  1614. a.owner_type as ownerType,
  1615. a.owner_name as ownerName,
  1616. a.field_a as fieldA,
  1617. a.transfer_price as transferPrice,
  1618. a.transfer_mode as transfermode,
  1619. a.maturity,
  1620. a.technical_picture_url as technicalpictureurl
  1621. from achievement a
  1622. where
  1623. a.deleted_sign = 0
  1624. and a.category = 0
  1625. and a.release_status = 1
  1626. and a.audit_status = 3
  1627. order by a.release_date desc limit 0,12
  1628. </select>
  1629. <!-- 查询猜你喜欢 -->
  1630. <select id="selectCsutomerLike" resultType="com.goafanti.achievement.bo.AchievementListBo">
  1631. select
  1632. a.id, a.name, a.keyword,a.introduction,a.category,
  1633. a.serial_number as serialNumber,
  1634. a.data_category as dataCategory,
  1635. a.owner_type as ownerType,
  1636. a.owner_name as ownerName,
  1637. a.field_a as fieldA,
  1638. a.field_b as fieldB,
  1639. a.transfer_price as transferPrice,
  1640. a.technical_picture_url as technicalpictureurl
  1641. from achievement a
  1642. LEFT JOIN aft.achievement_interest b on a.id = b.achievement_id
  1643. where
  1644. a.deleted_sign = 0
  1645. and category = 0
  1646. and a.release_status = 1
  1647. and a.audit_status = 3
  1648. <if test="boutique != null">
  1649. and a.boutique= #{boutique,jdbcType=INTEGER}
  1650. </if>
  1651. order by a.release_date desc limit 0,4
  1652. </select>
  1653. <select id="countInterest" resultType="Integer">
  1654. select count(0)
  1655. from achievement_interest
  1656. where achievement_id=#{achievementId,jdbcType=VARCHAR}
  1657. </select>
  1658. <select id="achievementInterest" resultType="com.goafanti.achievement.bo.AchievementInterestBo">
  1659. select
  1660. a.id,a.name,a.create_time as createTime
  1661. from achievement_interest ai
  1662. LEFT join achievement a on ai.achievement_id=a.id
  1663. where uid=#{uid,jdbcType=VARCHAR}
  1664. </select>
  1665. <select id="findMyAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
  1666. select
  1667. a.id, a.boutique,a.name,a.category, a.audit_status as auditStatus,ifnull(t.x,0) as buyIntention,
  1668. a.release_date as releaseDate,a.create_time as createTime,ifnull(i.y,0) as countInterest
  1669. from achievement a
  1670. left join (select count(0) as x, tl.commodity_id from t_order tr
  1671. left join t_order_detail tl on tr.order_no=tl.order_no
  1672. where tr.order_status != 4
  1673. group by tl.commodity_id ) t on a.id=t.commodity_id
  1674. left join (select count(0) as y,achievement_id from achievement_interest
  1675. group by achievement_id ) i on a.id=i.achievement_id
  1676. where a.deleted_sign = 0
  1677. <if test="ownerId != null">
  1678. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  1679. </if>
  1680. order by a.create_time desc
  1681. <if test="page_sql!=null">
  1682. ${page_sql}
  1683. </if>
  1684. </select>
  1685. <select id="findMyAchievementCount" parameterType="String" resultType="java.lang.Integer">
  1686. select
  1687. count(1)
  1688. from achievement a
  1689. where a.deleted_sign = 0
  1690. <if test="ownerId != null">
  1691. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  1692. </if>
  1693. </select>
  1694. <select id="findMyyAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
  1695. select
  1696. a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
  1697. a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType,
  1698. <!-- oi.unit_name as username, -->a.owner_id as ownerId, a.org_id as orgId,a.create_time as createTime,
  1699. a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique
  1700. from achievement a
  1701. LEFT JOIN admin ad on ad.id = a.tech_broker_id
  1702. <!-- LEFT JOIN organization_identity oi on a.owner_id = oi.uid -->
  1703. <if test="adminId != null">
  1704. LEFT JOIN user u on a.owner_id = u.id
  1705. </if>
  1706. where a.deleted_sign = 0
  1707. <if test="ownerType != null">
  1708. and a.owner_type = #{ownerType,jdbcType=VARCHAR}
  1709. </if>
  1710. <if test="techBrokerId != null">
  1711. and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
  1712. </if>
  1713. <if test="ownerName != null">
  1714. and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
  1715. </if>
  1716. <!-- <if test="unitName != null">
  1717. and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
  1718. </if> -->
  1719. <if test="ownerId != null">
  1720. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  1721. </if>
  1722. <if test="serialNumber != null">
  1723. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  1724. </if>
  1725. <if test="auditStatus != null">
  1726. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  1727. </if>
  1728. <if test="name != null">
  1729. and a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  1730. </if>
  1731. <if test="keyword != null">
  1732. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  1733. </if>
  1734. <if test="category != null">
  1735. and a.category = #{category,jdbcType=INTEGER}
  1736. </if>
  1737. <if test="status != null">
  1738. and a.status = #{status,jdbcType=INTEGER}
  1739. </if>
  1740. <if test="rStart != null">
  1741. and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  1742. </if>
  1743. <if test="rEnd != null">
  1744. and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  1745. </if>
  1746. <if test="cStart != null">
  1747. and a.create_time <![CDATA[ >= ]]> #{cStart,jdbcType=TIMESTAMP}
  1748. </if>
  1749. <if test="cEnd != null">
  1750. and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
  1751. </if>
  1752. <if test="releaseStatus != null">
  1753. and a.release_status = #{releaseStatus,jdbcType=INTEGER}
  1754. </if>
  1755. <if test="boutique != null">
  1756. and a.boutique = #{boutique,jdbcType=INTEGER}
  1757. </if>
  1758. order by serial_number desc
  1759. <if test="page_sql!=null">
  1760. ${page_sql}
  1761. </if>
  1762. </select>
  1763. <select id="findMyyAchievementCount" parameterType="String" resultType="java.lang.Integer">
  1764. select
  1765. count(1)
  1766. from achievement a
  1767. LEFT JOIN admin ad on ad.id = a.tech_broker_id
  1768. <!-- LEFT JOIN organization_identity oi on a.owner_id = oi.uid -->
  1769. <if test="adminId != null">
  1770. LEFT JOIN user u on a.owner_id = u.id
  1771. </if>
  1772. where a.deleted_sign = 0
  1773. <if test="ownerType != null">
  1774. and a.owner_type = #{ownerType,jdbcType=VARCHAR}
  1775. </if>
  1776. <if test="techBrokerId != null">
  1777. and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
  1778. </if>
  1779. <if test="ownerName != null">
  1780. and a.owner_name like CONCAT(#{ownerName,jdbcType=VARCHAR},'%')
  1781. </if>
  1782. <!-- <if test="unitName != null">
  1783. and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
  1784. </if> -->
  1785. <if test="ownerId != null">
  1786. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  1787. </if>
  1788. <if test="serialNumber != null">
  1789. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  1790. </if>
  1791. <if test="auditStatus != null">
  1792. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  1793. </if>
  1794. <if test="name != null">
  1795. and a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  1796. </if>
  1797. <if test="keyword != null">
  1798. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  1799. </if>
  1800. <if test="category != null">
  1801. and a.category = #{category,jdbcType=INTEGER}
  1802. </if>
  1803. <if test="status != null">
  1804. and a.status = #{status,jdbcType=INTEGER}
  1805. </if>
  1806. <if test="rStart != null">
  1807. and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  1808. </if>
  1809. <if test="rEnd != null">
  1810. and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  1811. </if>
  1812. <if test="cStart != null">
  1813. and a.create_time <![CDATA[ >= ]]> #{cStart,jdbcType=TIMESTAMP}
  1814. </if>
  1815. <if test="cEnd != null">
  1816. and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
  1817. </if>
  1818. <if test="releaseStatus != null">
  1819. and a.release_status = #{releaseStatus,jdbcType=INTEGER}
  1820. </if>
  1821. <if test="boutique != null">
  1822. and a.boutique = #{boutique,jdbcType=INTEGER}
  1823. </if>
  1824. </select>
  1825. <select id="findManageAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
  1826. select
  1827. a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
  1828. a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType,
  1829. <!-- oi.unit_name as username, -->a.owner_id as ownerId, a.org_id as orgId,a.create_time as createTime,
  1830. a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique
  1831. from achievement a
  1832. LEFT JOIN admin ad on ad.id = a.tech_broker_id
  1833. LEFT JOIN department dm on dm.id = ad.department_id
  1834. <!-- LEFT JOIN organization_identity oi on a.owner_id = oi.uid -->
  1835. <if test="adminId != null">
  1836. LEFT JOIN user u on a.owner_id = u.id
  1837. </if>
  1838. where a.deleted_sign = 0
  1839. <if test="recordPerson != null">
  1840. and ad.name = #{recordPerson,jdbcType=VARCHAR}
  1841. </if>
  1842. <if test="ownerType != null">
  1843. and a.owner_type = #{ownerType,jdbcType=VARCHAR}
  1844. </if>
  1845. <if test="techBrokerId != null">
  1846. and (a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR} or ad.department_id=(select department_id from admin where id=#{techBrokerId,jdbcType=VARCHAR}))
  1847. </if>
  1848. <if test="ownerName != null">
  1849. and a.owner_name like CONCAT(#{ownerName,jdbcType=VARCHAR},'%')
  1850. </if>
  1851. <!-- <if test="unitName != null">
  1852. and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
  1853. </if> -->
  1854. <if test="ownerId != null">
  1855. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  1856. </if>
  1857. <if test="serialNumber != null">
  1858. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  1859. </if>
  1860. <if test="auditStatus != null">
  1861. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  1862. </if>
  1863. <if test="name != null">
  1864. and a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  1865. </if>
  1866. <if test="keyword != null">
  1867. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  1868. </if>
  1869. <if test="category != null">
  1870. and a.category = #{category,jdbcType=INTEGER}
  1871. </if>
  1872. <if test="status != null">
  1873. and a.status = #{status,jdbcType=INTEGER}
  1874. </if>
  1875. <if test="rStart != null">
  1876. and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  1877. </if>
  1878. <if test="rEnd != null">
  1879. and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  1880. </if>
  1881. <if test="cStart != null">
  1882. and a.create_time <![CDATA[ >= ]]> #{cStart,jdbcType=TIMESTAMP}
  1883. </if>
  1884. <if test="cEnd != null">
  1885. and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
  1886. </if>
  1887. <if test="releaseStatus != null">
  1888. and a.release_status = #{releaseStatus,jdbcType=INTEGER}
  1889. </if>
  1890. <if test="boutique != null">
  1891. and a.boutique = #{boutique,jdbcType=INTEGER}
  1892. </if>
  1893. order by serial_number desc
  1894. <if test="page_sql!=null">
  1895. ${page_sql}
  1896. </if>
  1897. </select>
  1898. <select id="findManageAchievementCount" parameterType="String" resultType="java.lang.Integer">
  1899. select
  1900. count(1)
  1901. from achievement a
  1902. LEFT JOIN admin ad on ad.id = a.tech_broker_id
  1903. LEFT JOIN department dm on dm.id = ad.department_id
  1904. <!-- LEFT JOIN organization_identity oi on a.owner_id = oi.uid -->
  1905. <if test="adminId != null">
  1906. LEFT JOIN user u on a.owner_id = u.id
  1907. </if>
  1908. where a.deleted_sign = 0
  1909. <if test="recordPerson != null">
  1910. and ad.name = #{recordPerson,jdbcType=VARCHAR}
  1911. </if>
  1912. <if test="ownerType != null">
  1913. and a.owner_type = #{ownerType,jdbcType=VARCHAR}
  1914. </if>
  1915. <if test="techBrokerId != null">
  1916. and (a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR} or ad.department_id=(select department_id from admin where id=#{techBrokerId,jdbcType=VARCHAR}))
  1917. </if>
  1918. <if test="ownerName != null">
  1919. and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
  1920. </if>
  1921. <!-- <if test="unitName != null">
  1922. and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
  1923. </if> -->
  1924. <if test="ownerId != null">
  1925. and a.owner_id = #{ownerId,jdbcType=VARCHAR}
  1926. </if>
  1927. <if test="serialNumber != null">
  1928. and a.serial_number = #{serialNumber,jdbcType=INTEGER}
  1929. </if>
  1930. <if test="auditStatus != null">
  1931. and a.audit_status = #{auditStatus,jdbcType=INTEGER}
  1932. </if>
  1933. <if test="name != null">
  1934. and a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  1935. </if>
  1936. <if test="keyword != null">
  1937. and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
  1938. </if>
  1939. <if test="category != null">
  1940. and a.category = #{category,jdbcType=INTEGER}
  1941. </if>
  1942. <if test="status != null">
  1943. and a.status = #{status,jdbcType=INTEGER}
  1944. </if>
  1945. <if test="rStart != null">
  1946. and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
  1947. </if>
  1948. <if test="rEnd != null">
  1949. and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
  1950. </if>
  1951. <if test="cStart != null">
  1952. and a.create_time <![CDATA[ >= ]]> #{cStart,jdbcType=TIMESTAMP}
  1953. </if>
  1954. <if test="cEnd != null">
  1955. and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
  1956. </if>
  1957. <if test="releaseStatus != null">
  1958. and a.release_status = #{releaseStatus,jdbcType=INTEGER}
  1959. </if>
  1960. <if test="boutique != null">
  1961. and a.boutique = #{boutique,jdbcType=INTEGER}
  1962. </if>
  1963. </select>
  1964. <select id="getAppHomeAchievement" resultType="com.goafanti.app.bo.HomeAchievemend">
  1965. select ap.achievement_id as id ,a.name as name ,a.technical_picture_url as img,
  1966. ap.if_top,ap.top_number,ap.show_number
  1967. from achievement_publish ap
  1968. left join achievement a on ap.achievement_id=a.id
  1969. where ap.publish_client='1'
  1970. and ap.publish_page='W03'
  1971. order by ap.if_top,ap.top_number,ap.show_number asc
  1972. limit 0,4
  1973. </select>
  1974. <select id="getAppHomeRecommended" resultType="com.goafanti.achievement.bo.AchievementRecommended">
  1975. select ap.achievement_id as id,a.name,a.introduction,a.technical_picture_url as technicalpictureUrl,
  1976. a.field_a,a.field_b,f1.name as fieldA,f2.name as fieldB,a.boutique
  1977. from achievement_publish ap
  1978. left join achievement a on ap.achievement_id = a.id
  1979. left join field_glossory f1 on a.field_a=f1.id
  1980. left join field_glossory f2 on a.field_b=f2.id
  1981. where
  1982. ap.publish_client = '1'
  1983. and ap.publish_page = 'W01'
  1984. order by
  1985. ap.if_top,
  1986. ap.top_number,
  1987. ap.show_number asc limit 0,
  1988. 6
  1989. </select>
  1990. </mapper>