| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.goafanti.common.dao.AchievementMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.Achievement">
- <id column="id" jdbcType="VARCHAR" property="id" />
- <result column="serial_number" jdbcType="INTEGER" property="serialNumber" />
- <result column="data_category" jdbcType="INTEGER" property="dataCategory" />
- <result column="name" jdbcType="VARCHAR" property="name" />
- <result column="keyword" jdbcType="VARCHAR" property="keyword" />
- <result column="category" jdbcType="INTEGER" property="category" />
- <result column="summary" jdbcType="VARCHAR" property="summary" />
- <result column="introduction" jdbcType="LONGVARCHAR" property="introduction" />
- <result column="technical_picture_url" jdbcType="VARCHAR" property="technicalPictureUrl" />
- <result column="field_a" jdbcType="INTEGER" property="fieldA" />
- <result column="field_b" jdbcType="INTEGER" property="fieldB" />
- <result column="field_c" jdbcType="INTEGER" property="fieldC" />
- <result column="maturity" jdbcType="INTEGER" property="maturity" />
- <result column="maturity_picture_url" jdbcType="LONGVARCHAR" property="maturityPictureUrl" />
- <result column="maturity_text_file_url" jdbcType="VARCHAR" property="maturityTextFileUrl" />
- <result column="maturity_video_url" jdbcType="VARCHAR" property="maturityVideoUrl" />
- <result column="innovation" jdbcType="INTEGER" property="innovation" />
- <result column="owner_id" jdbcType="VARCHAR" property="ownerId" />
- <result column="owner_name" jdbcType="VARCHAR" property="ownerName" />
- <result column="owner_type" jdbcType="INTEGER" property="ownerType" />
- <result column="owner_id_number" jdbcType="VARCHAR" property="ownerIdNumber" />
- <result column="owner_mobile" jdbcType="VARCHAR" property="ownerMobile" />
- <result column="owner_email" jdbcType="VARCHAR" property="ownerEmail" />
- <result column="owner_postal_address" jdbcType="VARCHAR" property="ownerPostalAddress" />
- <result column="cooperation_mode" jdbcType="INTEGER" property="cooperationMode" />
- <result column="transfer_mode" jdbcType="INTEGER" property="transferMode" />
- <result column="bargaining_mode" jdbcType="INTEGER" property="bargainingMode" />
- <result column="transfer_price" jdbcType="DECIMAL" property="transferPrice" />
- <result column="technical_scene" jdbcType="VARCHAR" property="technicalScene" />
- <result column="breakthrough" jdbcType="VARCHAR" property="breakthrough" />
- <result column="patent_case" jdbcType="VARCHAR" property="patentCase" />
- <result column="awards" jdbcType="VARCHAR" property="awards" />
- <result column="team_des" jdbcType="VARCHAR" property="teamDes" />
- <result column="parameter" jdbcType="VARCHAR" property="parameter" />
- <result column="tech_plan_url" jdbcType="VARCHAR" property="techPlanUrl" />
- <result column="business_plan_url" jdbcType="VARCHAR" property="businessPlanUrl" />
- <result column="org_id" jdbcType="VARCHAR" property="orgId" />
- <result column="org_name" jdbcType="VARCHAR" property="orgName" />
- <result column="org_address" jdbcType="VARCHAR" property="orgAddress" />
- <result column="org_email" jdbcType="VARCHAR" property="orgEmail" />
- <result column="org_contacts" jdbcType="VARCHAR" property="orgContacts" />
- <result column="org_contacts_mobile" jdbcType="VARCHAR" property="orgContactsMobile" />
- <result column="contacts" jdbcType="INTEGER" property="contacts" />
- <result column="manager_id" jdbcType="VARCHAR" property="managerId" />
- <result column="salesman_id" jdbcType="VARCHAR" property="salesmanId" />
- <result column="status" jdbcType="INTEGER" property="status" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="release_status" jdbcType="INTEGER" property="releaseStatus" />
- <result column="release_date" jdbcType="TIMESTAMP" property="releaseDate" />
- <result column="deleted_sign" jdbcType="INTEGER" property="deletedSign" />
- <result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
- <result column="tech_broker_id" jdbcType="VARCHAR" property="techBrokerId" />
- <result column="country_name_zh" jdbcType="VARCHAR" property="countryNameZh" />
- <result column="international_flag" jdbcType="INTEGER" property="internationalFlag" />
- <result column="jmrh_flag" jdbcType="INTEGER" property="jmrhFlag" />
- <result column="boutique" jdbcType="INTEGER" property="boutique" />
- </resultMap>
- <sql id="Base_Column_List">
- id, serial_number, data_category, name, keyword, category, summary, introduction,
- technical_picture_url, field_a, field_b, field_c, maturity, maturity_picture_url,
- maturity_text_file_url, maturity_video_url, innovation, owner_id, owner_name, owner_type, owner_id_number,
- owner_mobile, owner_email, owner_postal_address, cooperation_mode, transfer_mode,
- bargaining_mode, transfer_price, technical_scene, breakthrough, patent_case, awards,
- team_des, parameter, tech_plan_url, business_plan_url, org_id, org_name, org_address,
- org_email, org_contacts, org_contacts_mobile, contacts, manager_id, salesman_id,
- status, create_time, release_status, release_date, deleted_sign, audit_status, tech_broker_id,
- country_name_zh,international_flag,jmrh_flag,boutique
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from achievement
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete from achievement
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.Achievement">
- insert into achievement (id, serial_number, data_category,
- name, keyword, category,
- summary, introduction, technical_picture_url,
- field_a, field_b, field_c,
- maturity, maturity_picture_url, maturity_text_file_url,
- maturity_video_url, innovation, owner_id, owner_name,
- owner_type, owner_id_number, owner_mobile,
- owner_email, owner_postal_address, cooperation_mode,
- transfer_mode, bargaining_mode, transfer_price,
- technical_scene, breakthrough, patent_case,
- awards, team_des, parameter,
- tech_plan_url, business_plan_url, org_id,
- org_name, org_address, org_email,
- org_contacts, org_contacts_mobile, contacts,
- manager_id, salesman_id, status,
- create_time, release_status, release_date,
- deleted_sign, audit_status, tech_broker_id,
- country_name_zh,international_flag,jmrh_flag,boutique,remark)
- values (#{id,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, #{dataCategory,jdbcType=INTEGER},
- #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{category,jdbcType=INTEGER},
- #{summary,jdbcType=VARCHAR}, #{introduction,jdbcType=LONGVARCHAR}, #{technicalPictureUrl,jdbcType=VARCHAR},
- #{fieldA,jdbcType=INTEGER}, #{fieldB,jdbcType=INTEGER}, #{fieldC,jdbcType=INTEGER},
- #{maturity,jdbcType=INTEGER}, #{maturityPictureUrl,jdbcType=LONGVARCHAR}, #{maturityTextFileUrl,jdbcType=VARCHAR},
- #{maturityVideoUrl,jdbcType=VARCHAR}, #{innovation,jdbcType=INTEGER}, #{ownerId,jdbcType=VARCHAR}, #{ownerName,jdbcType=VARCHAR},
- #{ownerType,jdbcType=INTEGER}, #{ownerIdNumber,jdbcType=VARCHAR}, #{ownerMobile,jdbcType=VARCHAR},
- #{ownerEmail,jdbcType=VARCHAR}, #{ownerPostalAddress,jdbcType=VARCHAR}, #{cooperationMode,jdbcType=INTEGER},
- #{transferMode,jdbcType=INTEGER}, #{bargainingMode,jdbcType=INTEGER}, #{transferPrice,jdbcType=DECIMAL},
- #{technicalScene,jdbcType=VARCHAR}, #{breakthrough,jdbcType=VARCHAR}, #{patentCase,jdbcType=VARCHAR},
- #{awards,jdbcType=VARCHAR}, #{teamDes,jdbcType=VARCHAR}, #{parameter,jdbcType=VARCHAR},
- #{techPlanUrl,jdbcType=VARCHAR}, #{businessPlanUrl,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR},
- #{orgName,jdbcType=VARCHAR}, #{orgAddress,jdbcType=VARCHAR}, #{orgEmail,jdbcType=VARCHAR},
- #{orgContacts,jdbcType=VARCHAR}, #{orgContactsMobile,jdbcType=VARCHAR}, #{contacts,jdbcType=INTEGER},
- #{managerId,jdbcType=VARCHAR}, #{salesmanId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
- #{createTime,jdbcType=TIMESTAMP}, #{releaseStatus,jdbcType=INTEGER}, #{releaseDate,jdbcType=TIMESTAMP},
- #{deletedSign,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER}, #{techBrokerId,jdbcType=VARCHAR},
- #{countryNameZh,jdbcType=VARCHAR}, #{internationalFlag,jdbcType=INTEGER},#{jmrhFlag,jdbcType=INTEGER},#{boutique,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.Achievement">
- insert into achievement
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="serialNumber != null">
- serial_number,
- </if>
- <if test="dataCategory != null">
- data_category,
- </if>
- <if test="name != null">
- name,
- </if>
- <if test="keyword != null">
- keyword,
- </if>
- <if test="category != null">
- category,
- </if>
- <if test="summary != null">
- summary,
- </if>
- <if test="introduction != null">
- introduction,
- </if>
- <if test="technicalPictureUrl != null">
- technical_picture_url,
- </if>
- <if test="fieldA != null">
- field_a,
- </if>
- <if test="fieldB != null">
- field_b,
- </if>
- <if test="fieldC != null">
- field_c,
- </if>
- <if test="maturity != null">
- maturity,
- </if>
- <if test="maturityPictureUrl != null">
- maturity_picture_url,
- </if>
- <if test="maturityTextFileUrl != null">
- maturity_text_file_url,
- </if>
- <if test="maturityVideoUrl != null">
- maturity_video_url,
- </if>
- <if test="innovation != null">
- innovation,
- </if>
- <if test="ownerId != null">
- owner_id,
- </if>
- <if test="ownerName != null">
- owner_name,
- </if>
- <if test="ownerType != null">
- owner_type,
- </if>
- <if test="ownerIdNumber != null">
- owner_id_number,
- </if>
- <if test="ownerMobile != null">
- owner_mobile,
- </if>
- <if test="ownerEmail != null">
- owner_email,
- </if>
- <if test="ownerPostalAddress != null">
- owner_postal_address,
- </if>
- <if test="cooperationMode != null">
- cooperation_mode,
- </if>
- <if test="transferMode != null">
- transfer_mode,
- </if>
- <if test="bargainingMode != null">
- bargaining_mode,
- </if>
- <if test="transferPrice != null">
- transfer_price,
- </if>
- <if test="technicalScene != null">
- technical_scene,
- </if>
- <if test="breakthrough != null">
- breakthrough,
- </if>
- <if test="patentCase != null">
- patent_case,
- </if>
- <if test="awards != null">
- awards,
- </if>
- <if test="teamDes != null">
- team_des,
- </if>
- <if test="parameter != null">
- parameter,
- </if>
- <if test="techPlanUrl != null">
- tech_plan_url,
- </if>
- <if test="businessPlanUrl != null">
- business_plan_url,
- </if>
- <if test="orgId != null">
- org_id,
- </if>
- <if test="orgName != null">
- org_name,
- </if>
- <if test="orgAddress != null">
- org_address,
- </if>
- <if test="orgEmail != null">
- org_email,
- </if>
- <if test="orgContacts != null">
- org_contacts,
- </if>
- <if test="orgContactsMobile != null">
- org_contacts_mobile,
- </if>
- <if test="contacts != null">
- contacts,
- </if>
- <if test="managerId != null">
- manager_id,
- </if>
- <if test="salesmanId != null">
- salesman_id,
- </if>
- <if test="status != null">
- status,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="releaseStatus != null">
- release_status,
- </if>
- <if test="releaseDate != null">
- release_date,
- </if>
- <if test="deletedSign != null">
- deleted_sign,
- </if>
- <if test="auditStatus != null">
- audit_status,
- </if>
- <if test="techBrokerId != null">
- tech_broker_id,
- </if>
- <if test="countryNameZh != null">
- country_name_zh,
- </if>
- <if test="internationalFlag != null">
- international_flag,
- </if>
- <if test="jmrhFlag != null">
- jmrh_flag,
- </if>
- <if test="boutique !=null">
- boutique,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="serialNumber != null">
- #{serialNumber,jdbcType=INTEGER},
- </if>
- <if test="dataCategory != null">
- #{dataCategory,jdbcType=INTEGER},
- </if>
- <if test="name != null">
- #{name,jdbcType=VARCHAR},
- </if>
- <if test="keyword != null">
- #{keyword,jdbcType=VARCHAR},
- </if>
- <if test="category != null">
- #{category,jdbcType=INTEGER},
- </if>
- <if test="summary != null">
- #{summary,jdbcType=VARCHAR},
- </if>
- <if test="introduction != null">
- #{introduction,jdbcType=LONGVARCHAR},
- </if>
- <if test="technicalPictureUrl != null">
- #{technicalPictureUrl,jdbcType=VARCHAR},
- </if>
- <if test="fieldA != null">
- #{fieldA,jdbcType=INTEGER},
- </if>
- <if test="fieldB != null">
- #{fieldB,jdbcType=INTEGER},
- </if>
- <if test="fieldC != null">
- #{fieldC,jdbcType=INTEGER},
- </if>
- <if test="maturity != null">
- #{maturity,jdbcType=INTEGER},
- </if>
- <if test="maturityPictureUrl != null">
- #{maturityPictureUrl,jdbcType=LONGVARCHAR},
- </if>
- <if test="maturityTextFileUrl != null">
- #{maturityTextFileUrl,jdbcType=VARCHAR},
- </if>
- <if test="maturityVideoUrl != null">
- #{maturityVideoUrl,jdbcType=VARCHAR},
- </if>
- <if test="innovation != null">
- #{innovation,jdbcType=INTEGER},
- </if>
- <if test="ownerId != null">
- #{ownerId,jdbcType=VARCHAR},
- </if>
- <if test="ownerName != null">
- #{ownerName,jdbcType=VARCHAR},
- </if>
- <if test="ownerType != null">
- #{ownerType,jdbcType=INTEGER},
- </if>
- <if test="ownerIdNumber != null">
- #{ownerIdNumber,jdbcType=VARCHAR},
- </if>
- <if test="ownerMobile != null">
- #{ownerMobile,jdbcType=VARCHAR},
- </if>
- <if test="ownerEmail != null">
- #{ownerEmail,jdbcType=VARCHAR},
- </if>
- <if test="ownerPostalAddress != null">
- #{ownerPostalAddress,jdbcType=VARCHAR},
- </if>
- <if test="cooperationMode != null">
- #{cooperationMode,jdbcType=INTEGER},
- </if>
- <if test="transferMode != null">
- #{transferMode,jdbcType=INTEGER},
- </if>
- <if test="bargainingMode != null">
- #{bargainingMode,jdbcType=INTEGER},
- </if>
- <if test="transferPrice != null">
- #{transferPrice,jdbcType=DECIMAL},
- </if>
- <if test="technicalScene != null">
- #{technicalScene,jdbcType=VARCHAR},
- </if>
- <if test="breakthrough != null">
- #{breakthrough,jdbcType=VARCHAR},
- </if>
- <if test="patentCase != null">
- #{patentCase,jdbcType=VARCHAR},
- </if>
- <if test="awards != null">
- #{awards,jdbcType=VARCHAR},
- </if>
- <if test="teamDes != null">
- #{teamDes,jdbcType=VARCHAR},
- </if>
- <if test="parameter != null">
- #{parameter,jdbcType=VARCHAR},
- </if>
- <if test="techPlanUrl != null">
- #{techPlanUrl,jdbcType=VARCHAR},
- </if>
- <if test="businessPlanUrl != null">
- #{businessPlanUrl,jdbcType=VARCHAR},
- </if>
- <if test="orgId != null">
- #{orgId,jdbcType=VARCHAR},
- </if>
- <if test="orgName != null">
- #{orgName,jdbcType=VARCHAR},
- </if>
- <if test="orgAddress != null">
- #{orgAddress,jdbcType=VARCHAR},
- </if>
- <if test="orgEmail != null">
- #{orgEmail,jdbcType=VARCHAR},
- </if>
- <if test="orgContacts != null">
- #{orgContacts,jdbcType=VARCHAR},
- </if>
- <if test="orgContactsMobile != null">
- #{orgContactsMobile,jdbcType=VARCHAR},
- </if>
- <if test="contacts != null">
- #{contacts,jdbcType=INTEGER},
- </if>
- <if test="managerId != null">
- #{managerId,jdbcType=VARCHAR},
- </if>
- <if test="salesmanId != null">
- #{salesmanId,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- #{status,jdbcType=INTEGER},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="releaseStatus != null">
- #{releaseStatus,jdbcType=INTEGER},
- </if>
- <if test="releaseDate != null">
- #{releaseDate,jdbcType=TIMESTAMP},
- </if>
- <if test="deletedSign != null">
- #{deletedSign,jdbcType=INTEGER},
- </if>
- <if test="auditStatus != null">
- #{auditStatus,jdbcType=INTEGER},
- </if>
- <if test="techBrokerId != null">
- #{techBrokerId,jdbcType=VARCHAR},
- </if>
- <if test="countryNameZh != null">
- #{countryNameZh,jdbcType=VARCHAR},
- </if>
- <if test="internationalFlag != null">
- #{internationalFlag,jdbcType=INTEGER},
- </if>
- <if test="jmrhFlag != null">
- #{jmrhFlag,jdbcType=INTEGER},
- </if>
- <if test="boutique != null">
- #{boutique,jdbcType=INTEGER}
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Achievement">
- update achievement
- <set>
- <if test="serialNumber != null">
- serial_number = #{serialNumber,jdbcType=INTEGER},
- </if>
- <if test="dataCategory != null">
- data_category = #{dataCategory,jdbcType=INTEGER},
- </if>
- <if test="name != null">
- name = #{name,jdbcType=VARCHAR},
- </if>
- <if test="keyword != null">
- keyword = #{keyword,jdbcType=VARCHAR},
- </if>
- <if test="category != null">
- category = #{category,jdbcType=INTEGER},
- </if>
- <if test="summary != null">
- summary = #{summary,jdbcType=VARCHAR},
- </if>
- <if test="introduction != null">
- introduction = #{introduction,jdbcType=LONGVARCHAR},
- </if>
- <if test="technicalPictureUrl != null">
- technical_picture_url = #{technicalPictureUrl,jdbcType=VARCHAR},
- </if>
- <if test="fieldA != null">
- field_a = #{fieldA,jdbcType=INTEGER},
- </if>
- <if test="fieldB != null">
- field_b = #{fieldB,jdbcType=INTEGER},
- </if>
- <if test="fieldC != null">
- field_c = #{fieldC,jdbcType=INTEGER},
- </if>
- <if test="maturity != null">
- maturity = #{maturity,jdbcType=INTEGER},
- </if>
- <if test="maturityPictureUrl != null">
- maturity_picture_url = #{maturityPictureUrl,jdbcType=LONGVARCHAR},
- </if>
- <if test="maturityTextFileUrl != null">
- maturity_text_file_url = #{maturityTextFileUrl,jdbcType=VARCHAR},
- </if>
- <if test="maturityVideoUrl != null">
- maturity_video_url = #{maturityVideoUrl,jdbcType=VARCHAR},
- </if>
- <if test="innovation != null">
- innovation = #{innovation,jdbcType=INTEGER},
- </if>
- <if test="ownerId != null">
- owner_id = #{ownerId,jdbcType=VARCHAR},
- </if>
- <if test="ownerName != null">
- owner_name = #{ownerName,jdbcType=VARCHAR},
- </if>
- <if test="ownerType != null">
- owner_type = #{ownerType,jdbcType=INTEGER},
- </if>
- <if test="ownerIdNumber != null">
- owner_id_number = #{ownerIdNumber,jdbcType=VARCHAR},
- </if>
- <if test="ownerMobile != null">
- owner_mobile = #{ownerMobile,jdbcType=VARCHAR},
- </if>
- <if test="ownerEmail != null">
- owner_email = #{ownerEmail,jdbcType=VARCHAR},
- </if>
- <if test="ownerPostalAddress != null">
- owner_postal_address = #{ownerPostalAddress,jdbcType=VARCHAR},
- </if>
- <if test="cooperationMode != null">
- cooperation_mode = #{cooperationMode,jdbcType=INTEGER},
- </if>
- <if test="transferMode != null">
- transfer_mode = #{transferMode,jdbcType=INTEGER},
- </if>
- <if test="bargainingMode != null">
- bargaining_mode = #{bargainingMode,jdbcType=INTEGER},
- </if>
- <if test="transferPrice != null">
- transfer_price = #{transferPrice,jdbcType=DECIMAL},
- </if>
- <if test="technicalScene != null">
- technical_scene = #{technicalScene,jdbcType=VARCHAR},
- </if>
- <if test="breakthrough != null">
- breakthrough = #{breakthrough,jdbcType=VARCHAR},
- </if>
- <if test="patentCase != null">
- patent_case = #{patentCase,jdbcType=VARCHAR},
- </if>
- <if test="awards != null">
- awards = #{awards,jdbcType=VARCHAR},
- </if>
- <if test="teamDes != null">
- team_des = #{teamDes,jdbcType=VARCHAR},
- </if>
- <if test="parameter != null">
- parameter = #{parameter,jdbcType=VARCHAR},
- </if>
- <if test="techPlanUrl != null">
- tech_plan_url = #{techPlanUrl,jdbcType=VARCHAR},
- </if>
- <if test="businessPlanUrl != null">
- business_plan_url = #{businessPlanUrl,jdbcType=VARCHAR},
- </if>
- <if test="orgId != null">
- org_id = #{orgId,jdbcType=VARCHAR},
- </if>
- <if test="orgName != null">
- org_name = #{orgName,jdbcType=VARCHAR},
- </if>
- <if test="orgAddress != null">
- org_address = #{orgAddress,jdbcType=VARCHAR},
- </if>
- <if test="orgEmail != null">
- org_email = #{orgEmail,jdbcType=VARCHAR},
- </if>
- <if test="orgContacts != null">
- org_contacts = #{orgContacts,jdbcType=VARCHAR},
- </if>
- <if test="orgContactsMobile != null">
- org_contacts_mobile = #{orgContactsMobile,jdbcType=VARCHAR},
- </if>
- <if test="contacts != null">
- contacts = #{contacts,jdbcType=INTEGER},
- </if>
- <if test="managerId != null">
- manager_id = #{managerId,jdbcType=VARCHAR},
- </if>
- <if test="salesmanId != null">
- salesman_id = #{salesmanId,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=INTEGER},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="releaseStatus != null">
- release_status = #{releaseStatus,jdbcType=INTEGER},
- </if>
- <if test="releaseDate != null">
- release_date = #{releaseDate,jdbcType=TIMESTAMP},
- </if>
- <if test="deletedSign != null">
- deleted_sign = #{deletedSign,jdbcType=INTEGER},
- </if>
- <if test="auditStatus != null">
- audit_status = #{auditStatus,jdbcType=INTEGER},
- </if>
- <if test="techBrokerId != null">
- tech_broker_id = #{techBrokerId,jdbcType=VARCHAR},
- </if>
- <if test="countryNameZh != null">
- country_name_zh = #{countryNameZh,jdbcType=VARCHAR},
- </if>
- <if test="internationalFlag != null">
- international_flag = #{internationalFlag,jdbcType=INTEGER},
- </if>
- <if test="jmrhFlag != null">
- jmrh_flag = #{jmrhFlag,jdbcType=INTEGER},
- </if>
- <if test="boutique != null">
- boutique = #{boutique,jdbcType=INTEGER},
- </if>
- <if test="remark != null">
- remark = #{remark,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Achievement">
- update achievement
- set serial_number = #{serialNumber,jdbcType=INTEGER},
- data_category = #{dataCategory,jdbcType=INTEGER},
- name = #{name,jdbcType=VARCHAR},
- keyword = #{keyword,jdbcType=VARCHAR},
- category = #{category,jdbcType=INTEGER},
- summary = #{summary,jdbcType=VARCHAR},
- introduction = #{introduction,jdbcType=LONGVARCHAR},
- technical_picture_url = #{technicalPictureUrl,jdbcType=VARCHAR},
- field_a = #{fieldA,jdbcType=INTEGER},
- field_b = #{fieldB,jdbcType=INTEGER},
- field_c = #{fieldC,jdbcType=INTEGER},
- maturity = #{maturity,jdbcType=INTEGER},
- maturity_picture_url = #{maturityPictureUrl,jdbcType=LONGVARCHAR},
- maturity_text_file_url = #{maturityTextFileUrl,jdbcType=VARCHAR},
- maturity_video_url = #{maturityVideoUrl,jdbcType=VARCHAR},
- innovation = #{innovation,jdbcType=INTEGER},
- owner_id = #{ownerId,jdbcType=VARCHAR},
- owner_name = #{ownerName,jdbcType=VARCHAR},
- owner_type = #{ownerType,jdbcType=INTEGER},
- owner_id_number = #{ownerIdNumber,jdbcType=VARCHAR},
- owner_mobile = #{ownerMobile,jdbcType=VARCHAR},
- owner_email = #{ownerEmail,jdbcType=VARCHAR},
- owner_postal_address = #{ownerPostalAddress,jdbcType=VARCHAR},
- cooperation_mode = #{cooperationMode,jdbcType=INTEGER},
- transfer_mode = #{transferMode,jdbcType=INTEGER},
- bargaining_mode = #{bargainingMode,jdbcType=INTEGER},
- transfer_price = #{transferPrice,jdbcType=DECIMAL},
- technical_scene = #{technicalScene,jdbcType=VARCHAR},
- breakthrough = #{breakthrough,jdbcType=VARCHAR},
- patent_case = #{patentCase,jdbcType=VARCHAR},
- awards = #{awards,jdbcType=VARCHAR},
- team_des = #{teamDes,jdbcType=VARCHAR},
- parameter = #{parameter,jdbcType=VARCHAR},
- tech_plan_url = #{techPlanUrl,jdbcType=VARCHAR},
- business_plan_url = #{businessPlanUrl,jdbcType=VARCHAR},
- org_id = #{orgId,jdbcType=VARCHAR},
- org_name = #{orgName,jdbcType=VARCHAR},
- org_address = #{orgAddress,jdbcType=VARCHAR},
- org_email = #{orgEmail,jdbcType=VARCHAR},
- org_contacts = #{orgContacts,jdbcType=VARCHAR},
- org_contacts_mobile = #{orgContactsMobile,jdbcType=VARCHAR},
- contacts = #{contacts,jdbcType=INTEGER},
- manager_id = #{managerId,jdbcType=VARCHAR},
- salesman_id = #{salesmanId,jdbcType=VARCHAR},
- status = #{status,jdbcType=INTEGER},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- release_status = #{releaseStatus,jdbcType=INTEGER},
- release_date = #{releaseDate,jdbcType=TIMESTAMP},
- deleted_sign = #{deletedSign,jdbcType=INTEGER},
- audit_status = #{auditStatus,jdbcType=INTEGER},
- tech_broker_id = #{techBrokerId,jdbcType=VARCHAR},
- country_name_zh = #{countryNameZh,jdbcType=VARCHAR},
- international_flag = #{internationalFlag,jdbcType=INTEGER},
- jmrh_flag = #{jmrhFlag,jdbcType=INTEGER},
- boutique = #{boutique,jdbcType=INTEGER}
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <select id="findUserOwnerAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
- select
- a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
- a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType,
- ui.username as username, a.owner_id as ownerId, a.org_id as orgId, a.contacts,
- a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique,a.create_time as createTime
- <if test="hot != null and hot == 1"><!-- 在首页 -->
- ,1 as hot
- </if>
- <if test="hot != null and hot == 0"><!-- 不在首页 -->
- ,0 as hot
- </if>
- <if test="hot==null"><!-- 无首页参数 -->
- ,ifnull(mm.effective,0) as hot
- </if>
- from achievement a
- LEFT JOIN admin ad on ad.id = a.tech_broker_id
- LEFT JOIN user_identity ui on a.owner_id = ui.uid
- <if test="hot != null and hot == 1"><!-- 在首页 -->
- inner join marketing_management mm on a.id = mm.product_id
- </if>
- <if test="hot == null"> <!-- 无首页参数 -->
- left join marketing_management mm on a.id = mm.product_id
- </if>
- where a.deleted_sign = 0 and a.owner_type = 0
- <if test="ownerName != null">
- and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
- and (a.owner_id is null or a.owner_id = '')
- </if>
- <if test="username != null">
- and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
- </if>
- <if test="ownerId != null">
- and a.owner_id = #{ownerId,jdbcType=VARCHAR}
- </if>
- <if test="serialNumber != null">
- and a.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="auditStatus != null">
- and a.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="keyword != null">
- and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="category != null">
- and a.category = #{category,jdbcType=INTEGER}
- </if>
- <if test="status != null">
- and a.status = #{status,jdbcType=INTEGER}
- </if>
- <if test="rStart != null">
- and a.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
- </if>
- <if test="rEnd != null">
- and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="cStart != null">
- and a.create_time <![CDATA[ > ]]> #{cStart,jdbcType=TIMESTAMP}
- </if>
- <if test="cEnd != null">
- and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="releaseStatus != null">
- and a.release_status = #{releaseStatus,jdbcType=INTEGER}
- </if>
- <if test="techBrokerId != null">
- and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
- </if>
- <if test="boutique != null">
- and a.boutique = #{boutique,jdbcType=INTEGER}
- </if>
- <if test="hot != null and hot == 0"><!-- 不在首页 -->
- and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
- </if>
- <if test="hot != null and hot == 1"><!-- 在首页 -->
- and mm.effective = 1
- </if>
- order by a.serial_number desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findUserOwnerAchievementCount" parameterType="String" resultType="java.lang.Integer">
- select
- count(1)
- from achievement a
- <if test="hot != null and hot == 1"><!-- 在首页 -->
- inner join marketing_management mm on a.id = mm.product_id
- </if>
- <if test="hot == null"> <!-- 无首页参数 -->
- left join marketing_management mm on a.id = mm.product_id
- </if>
- where deleted_sign = 0 and owner_type = 0
- <if test="ownerName != null">
- and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
- and (a.owner_id is null or a.owner_id = '')
- </if>
- <if test="username != null">
- and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
- </if>
- <if test="ownerId != null">
- and owner_id = #{ownerId,jdbcType=VARCHAR}
- </if>
- <if test="serialNumber != null">
- and serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="auditStatus != null">
- and audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="keyword != null">
- and keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="category != null">
- and category = #{category,jdbcType=INTEGER}
- </if>
- <if test="status != null">
- and status = #{status,jdbcType=INTEGER}
- </if>
- <if test="rStart != null">
- and release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
- </if>
- <if test="rEnd != null">
- and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="cStart != null">
- and a.create_time <![CDATA[ > ]]> #{cStart,jdbcType=TIMESTAMP}
- </if>
- <if test="cEnd != null">
- and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="releaseStatus != null">
- and release_status = #{releaseStatus,jdbcType=INTEGER}
- </if>
- <if test="techBrokerId != null">
- and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
- </if>
- <if test="boutique != null">
- and a.boutique = #{boutique,jdbcType=INTEGER}
- </if>
- <if test="hot != null and hot = 0"><!-- 不在首页 -->
- and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
- </if>
- <if test="hot != null and hot = 1"><!-- 在首页 -->
- and mm.effective = 1
- </if>
- </select>
-
-
-
- <select id="findOrgOwnerAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
- select
- a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
- a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType,
- <!-- oi.unit_name as username, -->a.owner_id as ownerId, a.org_id as orgId, a.contacts,a.create_time as createTime,
- a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique
- <if test="hot != null and hot == 1"><!-- 在首页 -->
- ,1 as hot
- </if>
- <if test="hot != null and hot == 0"><!-- 无首页参数 -->
- ,0 as hot
- </if>
- <if test="hot==null"><!-- 在首页 -->
- ,ifnull(mm.effective,0) as hot
- </if>
- from achievement a
- LEFT JOIN admin ad on ad.id = a.tech_broker_id
- <!-- LEFT JOIN organization_identity oi on a.owner_id = oi.uid -->
- <if test="adminId != null">
- LEFT JOIN user u on a.owner_id = u.id
- </if>
- <if test="hot != null and hot == 1"> <!-- 在首页 -->
- inner join marketing_management mm on a.id = mm.product_id
- </if>
- <if test="hot == null"> <!-- 无首页参数 -->
- left join marketing_management mm on a.id = mm.product_id
- </if>
- where a.deleted_sign = 0
- <if test="ownerType != null">
- and a.owner_type = #{ownerType,jdbcType=VARCHAR}
- </if>
- <if test="techBrokerId != null">
- and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
- </if>
- <if test="ownerName != null">
- and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
- </if>
- <!-- <if test="unitName != null">
- and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
- </if> -->
- <if test="ownerId != null">
- and a.owner_id = #{ownerId,jdbcType=VARCHAR}
- </if>
- <if test="serialNumber != null">
- and a.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="auditStatus != null">
- and a.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="keyword != null">
- and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="category != null">
- and a.category = #{category,jdbcType=INTEGER}
- </if>
- <if test="status != null">
- and a.status = #{status,jdbcType=INTEGER}
- </if>
- <if test="rStart != null">
- and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
- </if>
- <if test="rEnd != null">
- and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="cStart != null">
- and a.create_time <![CDATA[ >= ]]> #{cStart,jdbcType=TIMESTAMP}
- </if>
- <if test="cEnd != null">
- and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="releaseStatus != null">
- and a.release_status = #{releaseStatus,jdbcType=INTEGER}
- </if>
-
- <if test="boutique != null">
- and a.boutique = #{boutique,jdbcType=INTEGER}
- </if>
- <if test="hot != null and hot == 0"><!-- 不在首页 -->
- and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
- </if>
- <if test="hot != null and hot == 1"><!-- 在首页 -->
- and mm.effective = 1
- </if>
- order by serial_number desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findOrgOwnerAchievementCount" parameterType="String" resultType="java.lang.Integer">
- select
- count(1)
- from achievement a
- LEFT JOIN admin ad on ad.id = a.tech_broker_id
- <!-- LEFT JOIN organization_identity oi on a.owner_id = oi.uid -->
- <if test="adminId != null">
- LEFT JOIN user u on a.owner_id = u.id
- </if>
- <if test="hot != null and hot == 1"><!-- 在首页 -->
- inner join marketing_management mm on a.id = mm.product_id
- </if>
- <if test="hot == null"> <!-- 无首页参数 -->
- left join marketing_management mm on a.id = mm.product_id
- </if>
- where a.deleted_sign = 0
- <if test="ownerType != null">
- and a.owner_type = #{ownerType,jdbcType=VARCHAR}
- </if>
- <if test="techBrokerId != null">
- and a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
- </if>
- <if test="ownerName != null">
- and a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
- </if>
- <!-- <if test="unitName != null">
- and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
- </if> -->
- <if test="ownerId != null">
- and a.owner_id = #{ownerId,jdbcType=VARCHAR}
- </if>
- <if test="serialNumber != null">
- and a.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="auditStatus != null">
- and a.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and a.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="keyword != null">
- and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="category != null">
- and a.category = #{category,jdbcType=INTEGER}
- </if>
- <if test="status != null">
- and a.status = #{status,jdbcType=INTEGER}
- </if>
- <if test="rStart != null">
- and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
- </if>
- <if test="rEnd != null">
- and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="cStart != null">
- and a.create_time <![CDATA[ >= ]]> #{cStart,jdbcType=TIMESTAMP}
- </if>
- <if test="cEnd != null">
- and a.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="releaseStatus != null">
- and a.release_status = #{releaseStatus,jdbcType=INTEGER}
- </if>
-
- <if test="hot != null and hot == 0"><!-- 不在首页 -->
- and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
- </if>
- <if test="hot != null and hot == 1"><!-- 在首页 -->
- and mm.effective = 1
- </if>
- </select>
-
-
- <update id="updateReleaseDate" parameterType="java.lang.String">
- update achievement set release_date = null
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
- update achievement set deleted_sign = 1
- where id in
- <foreach item="item" collection="list" open="(" separator="," close=")">
- #{item}
- </foreach>
- </update>
- <select id="findAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
-
- select
- a.id, a.serial_number as serialNumber, a.data_category as dataCategory, a.boutique,
- a.name, a.keyword, a.category, a.introduction,owner_postal_address as ownerPostalAddress,
- 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,
- 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
- from achievement a
- left join (
- select count(0) as countInterest,achievement_id from achievement_interest group by achievement_id
- )b on a.id = b.achievement_id
- left join field_glossory f on a.field_a=f.id
- left join field_glossory f2 on a.field_b=f2.id
- where deleted_sign = 0
- <if test="ownerId != null">
- and a.owner_id = #{ownerId,jdbcType=VARCHAR}
- </if>
- <if test="serialNumber != null">
- and a.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="auditStatus != null">
- and a.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and a.name = #{name,jdbcType=VARCHAR}
- </if>
- <if test="keyword != null">
- and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="dataCategory != null and dataCategory != ''">
- and a.data_category = #{dataCategory,jdbcType=INTEGER}
- </if>
- <if test="category != null">
- and a.category = #{category,jdbcType=INTEGER}
- </if>
- <if test="ownerType != null">
- and a.owner_type = #{ownerType,jdbcType=INTEGER}
- </if>
- <if test="fieldA != null">
- and a.field_a = #{fieldA,jdbcType=VARCHAR}
- </if>
- <if test="status != null">
- and a.status = #{status,jdbcType=INTEGER}
- </if>
- <if test="rStart != null">
- and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
- </if>
- <if test="rEnd != null">
- and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="releaseStatus != null">
- and a.release_status = #{releaseStatus,jdbcType=INTEGER}
- </if>
-
- order by serial_number desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findAchievementCount" parameterType="String" resultType="java.lang.Integer">
- select
- count(1)
- from achievement a
- left join field_glossory f on a.field_a=f.id
- left join field_glossory f2 on a.field_b=f2.id
- where deleted_sign = 0
- <if test="ownerId != null">
- and a.owner_id = #{ownerId,jdbcType=VARCHAR}
- </if>
- <if test="serialNumber != null">
- and a.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="auditStatus != null">
- and a.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and a.name = #{name,jdbcType=VARCHAR}
- </if>
- </select>
- <select id="findAppAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
-
- select
- a.id, a.serial_number as serialNumber, a.data_category as dataCategory, a.boutique,
- a.name, a.keyword, a.category, a.introduction,owner_postal_address as ownerPostalAddress,
- 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,
- 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
- from achievement a
- left join (
- select count(0) as countInterest,achievement_id from achievement_interest group by achievement_id
- )b on a.id = b.achievement_id
- left join field_glossory f on a.field_a=f.id
- left join field_glossory f2 on a.field_b=f2.id
- where deleted_sign = 0
- and audit_status = 3
- <if test="ownerId != null">
- and a.owner_id = #{ownerId,jdbcType=VARCHAR}
- </if>
- <if test="serialNumber != null">
- and a.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="auditStatus != null">
- and a.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and a.name = #{name,jdbcType=VARCHAR}
- </if>
- <if test="keyword != null">
- and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="dataCategory != null and dataCategory != ''">
- and a.data_category = #{dataCategory,jdbcType=INTEGER}
- </if>
- <if test="category != null">
- and a.category = #{category,jdbcType=INTEGER}
- </if>
- <if test="ownerType != null">
- and a.owner_type = #{ownerType,jdbcType=INTEGER}
- </if>
- <if test="fieldA != null">
- and a.field_a = #{fieldA,jdbcType=VARCHAR}
- </if>
- <if test="status != null">
- and a.status = #{status,jdbcType=INTEGER}
- </if>
- <if test="rStart != null">
- and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
- </if>
- <if test="rEnd != null">
- and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="releaseStatus != null">
- and a.release_status = #{releaseStatus,jdbcType=INTEGER}
- </if>
-
- order by a.boutique desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findAppAchievementCount" parameterType="String" resultType="java.lang.Integer">
- select
- count(1)
- from achievement a
- left join field_glossory f on a.field_a=f.id
- left join field_glossory f2 on a.field_b=f2.id
- where deleted_sign = 0
- and audit_status = 3
- <if test="ownerId != null">
- and a.owner_id = #{ownerId,jdbcType=VARCHAR}
- </if>
- <if test="serialNumber != null">
- and a.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="auditStatus != null">
- and a.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and a.name = #{name,jdbcType=VARCHAR}
- </if>
- <if test="keyword != null">
- and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="dataCategory != null and dataCategory != ''">
- and a.data_category = #{dataCategory,jdbcType=INTEGER}
- </if>
- <if test="category != null">
- and a.category = #{category,jdbcType=INTEGER}
- </if>
- <if test="ownerType != null">
- and a.owner_type = #{ownerType,jdbcType=INTEGER}
- </if>
- <if test="fieldA != null">
- and a.field_a = #{fieldA,jdbcType=VARCHAR}
- </if>
- <if test="status != null">
- and a.status = #{status,jdbcType=INTEGER}
- </if>
- <if test="rStart != null">
- and a.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
- </if>
- <if test="rEnd != null">
- and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="releaseStatus != null">
- and a.release_status = #{releaseStatus,jdbcType=INTEGER}
- </if>
- </select>
-
- <select id="selectUserOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementUserOwnerDetailBo">
- select
- a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
- a.name, a.keyword, a.category,
- a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl,
- a.field_a as fieldA, a.field_b as fieldB, a.field_c as fieldC,
- a.maturity, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl,
- a.maturity_video_url as maturityVideoUrl, a.innovation, a.owner_id as ownerId,
- a.owner_name as ownerName, a.owner_type as ownerType, a.owner_id_number as ownerIdNumber,
- a.owner_mobile as ownerMobile, a.owner_email as ownerEmail, a.owner_postal_address as ownerPostalAddress,
- a.cooperation_mode as cooperationMode, a.transfer_mode as transferMode, a.bargaining_mode as bargainingMode,
- a.transfer_price as transferPrice, a.technical_scene as technicalScene, a.breakthrough,
- a.patent_case as patentCase, a.awards, a.team_des as teamDes,
- a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl,
- a.contacts, a.manager_id as managerId, a.salesman_id as salesmanId,
- a.create_time as createTime, a.release_status as releaseStatus,
- a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
- ui.username as iOwnerName, ui.province, ui.city, ui.area, u.email as iOwnerEmail,
- ui.id_number as iOwnerIdNumber, u.mobile as iOwnerMobile,j.easemob_name as easemobName,
- ifnull(t.x,0) as orderIntentionCount ,ifnull(t2.x,0) as orderCount
- from achievement a
- left join user_identity ui on a.owner_id = ui.uid
- left join (select count(0) as x,tl.commodity_id from t_order tr
- left join t_order_detail tl on tl.order_no=tr.order_no
- where order_status != 4
- group by tl.commodity_id ) t on a.id=t.commodity_id
- left join (select count(0) as x,tl.commodity_id from t_order tr
- left join t_order_detail tl on tl.order_no=tr.order_no
- where tr.order_status != 4 and tr.order_status != 0
- group by tl.commodity_id) t2 on a.id=t2.commodity_id
- left join jpush_easemob_account j on a.owner_id=j.uid
- left join user u on u.id = a.owner_id
- where a.id =#{id,jdbcType=VARCHAR}
- </select>
-
- <select id="selectOrgOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementOrgOwnerDetailBo">
- select
- a.id, a.serial_number as serialNumber, a.data_category as dataCategory,
- a.name, a.keyword, a.category,
- a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl,
- a.field_a as fieldA, a.field_b as fieldB, a.field_c as fieldC,
- a.maturity, a.maturity_picture_url as maturityPictureUrl, a.maturity_text_file_url as maturityTextFileUrl,
- a.maturity_video_url as maturityVideoUrl, a.innovation, a.owner_id as ownerId,
- a.owner_name as ownerName, a.owner_type as ownerType, a.owner_id_number as ownerIdNumber,
- a.owner_mobile as ownerMobile, a.owner_email as ownerEmail, a.owner_postal_address as ownerPostalAddress,
- a.cooperation_mode as cooperationMode, a.transfer_mode as transferMode, a.bargaining_mode as bargainingMode,
- a.transfer_price as transferPrice, a.technical_scene as technicalScene, a.breakthrough,
- a.patent_case as patentCase, a.awards, a.team_des as teamDes,
- a.parameter, a.tech_plan_url as techPlanUrl, a.business_plan_url as businessPlanUrl,
- a.contacts, a.manager_id as managerId, a.salesman_id as salesmanId, a.international_flag as internationalFlag,
- a.create_time as createTime, a.release_status as releaseStatus,
- a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
- oi.unit_name as iOwnerName, oi.postal_address as iOwnerPostalAddress, u.email as iOwnerEmail,
- oi.org_code as iOwnerIdNumber, u.mobile as iOwnerMobile,a.boutique,ifnull(mm.effective,0) hot,mm.cover_img as coverImg,a.remark
- from achievement a
- left join organization_identity oi on a.owner_id = oi.uid
- left join user u on u.id = a.owner_id
- left join marketing_management mm on a.id = mm.product_id
- where a.id = #{id,jdbcType=VARCHAR}
- </select>
-
- <insert id="insertBatch" parameterType="com.goafanti.common.model.Achievement">
- insert into achievement
- (id, deleted_sign, audit_status,
- create_time, release_status, data_category,
- name, keyword, category,
- owner_name, owner_type, owner_id_number,
- owner_mobile, owner_email, owner_postal_address,
- cooperation_mode, introduction, tech_broker_id,international_flag
- )
- values
- <foreach item="item" index="index" collection="list" separator=",">
- (
- #{item.id,jdbcType=VARCHAR}, #{item.deletedSign,jdbcType=INTEGER}, #{item.auditStatus,jdbcType=INTEGER},
- #{item.createTime,jdbcType=TIMESTAMP}, #{item.releaseStatus,jdbcType=INTEGER}, #{item.dataCategory,jdbcType=INTEGER},
- #{item.name,jdbcType=VARCHAR}, #{item.keyword,jdbcType=VARCHAR}, #{item.category,jdbcType=INTEGER},
- #{item.ownerName,jdbcType=VARCHAR}, #{item.ownerType,jdbcType=VARCHAR}, #{item.ownerIdNumber,jdbcType=VARCHAR},
- #{item.ownerMobile,jdbcType=VARCHAR}, #{item.ownerEmail,jdbcType=VARCHAR}, #{item.ownerPostalAddress,jdbcType=VARCHAR},
- #{item.cooperationMode,jdbcType=INTEGER}, #{item.introduction,jdbcType=LONGVARCHAR},#{item.techBrokerId,jdbcType=VARCHAR},
- #{item.internationalFlag,jdbcType=INTEGER}
- )
- </foreach>
- </insert>
-
- <select id="findSearchAchievementListByPage" parameterType="String" resultType="com.goafanti.portal.bo.AchievementSearchListBo">
- select
- a.id, a.name, a.keyword,a.introduction,a.category,
- a.serial_number as serialNumber,
- a.data_category as dataCategory,
- a.owner_type as ownerType,
- a.owner_name as ownerName,
- a.field_a as fieldA,
- a.field_b as fieldB,
- a.transfer_price as transferPrice,
- a.maturity,
- a.introduction,a.boutique,
- a.transfer_mode as transferMode,
- a.technical_picture_url as technicalPictureUrl,
- b.name as fieldAs
- from achievement a
- left join field_glossory b on a.field_a = b.id
- where a.deleted_sign = 0
- <if test="dataCategory != null and dataCategory != ''">
- and a.data_category = #{dataCategory,jdbcType=INTEGER}
- </if>
- <if test="category != null and category != ''">
- and a.category = #{category,jdbcType=INTEGER}
- </if>
- <if test="fieldA != null and fieldA != ''">
- and a.field_a = #{fieldA,jdbcType=INTEGER}
- </if>
- <if test="keyword != null and keyword != ''">
- and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="transferMode != null">
- and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
- </if>
- <if test="upperPrice != null and upperPrice != ''">
- and a.transfer_price < #{upperPrice,jdbcType=VARCHAR}
- </if>
- <if test="lowerPrice != null and lowerPrice != ''">
- and a.transfer_price > #{lowerPrice,jdbcType=VARCHAR}
- </if>
- <if test="internationalFlag != null ">
- and a.international_flag = #{internationalFlag,jdbcType=INTEGER}
- </if>
- and a.release_status = 1
- and a.audit_status = 3
- <if test="dateSort == 0">
- order by a.release_date asc
- </if>
- <if test="dateSort == 1">
- order by a.release_date desc
- </if>
- <if test="page_sql != null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findSearchAchievementCount" parameterType="String" resultType="java.lang.Integer">
- select
- count(1)
- from achievement a
- where a.deleted_sign = 0
- <if test="dataCategory != null and dataCategory != ''">
- and a.data_category = #{dataCategory,jdbcType=INTEGER}
- </if>
- <if test="category != null and category != ''">
- and a.category = #{category,jdbcType=INTEGER}
- </if>
- <if test="fieldA != null and fieldA != ''">
- and a.field_a = #{fieldA,jdbcType=INTEGER}
- </if>
- <if test="keyword != null and keyword != ''">
- and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="transferMode != null">
- and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
- </if>
- <if test="upperPrice != null and upperPrice != ''">
- and a.transfer_price < #{upperPrice,jdbcType=VARCHAR}
- </if>
- <if test="lowerPrice != null and lowerPrice != ''">
- and a.transfer_price > #{lowerPrice,jdbcType=VARCHAR}
- </if>
- <if test="internationalFlag != null ">
- and a.international_flag = #{internationalFlag,jdbcType=INTEGER}
- </if>
-
- and a.release_status = 1
- and a.audit_status = 3
- <if test="dateSort == 0">
- order by a.release_date asc
- </if>
- <if test="dateSort == 1">
- order by a.release_date desc
- </if>
- </select>
-
- <select id="selectAchievementSearchDetail" resultType="com.goafanti.portal.bo.AchievementDetailBo">
- select
- a.id,
- a.owner_name as ownerName,
- a.serial_number as serialNumber,
- a.keyword,
- a.name,
- a.data_category as dataCategory,
- a.category,
- ui.username,
- oi.unit_name as unitName,
- a.release_date as releaseDate,
- a.owner_type as ownerType,
- a.field_a as fieldA,
- a.field_b as fieldB,
- a.transfer_price as transferPrice,
- a.maturity,
- a.transfer_mode as transferMode,
- a.bargaining_mode as bargainingMode,
- a.summary,
- a.introduction,
- a.technical_picture_url as technicalPictureUrl,
- a.maturity_picture_url as maturityPictureUrl,
- a.maturity_text_file_url as maturityTextFileUrl,
- a.maturity_video_url as maturityVideoUrl,
- a.innovation,
- a.cooperation_mode as cooperationMode,
- a.bargaining_mode as bargainingMode,
- a.technical_scene as technicalScene,
- a.breakthrough,
- a.patent_case as patentCase,
- a.awards,
- a.team_des as teamDes,
- a.parameter,
- a.tech_plan_url as techPlanUrl,
- a.business_plan_url as businessPlanUrl,
- ai.id as achievementInterestId,
- ao.id as achievementOrderId,
- ao.status as orderStatus
- from achievement a
- left join user_identity ui on ui.uid = a.owner_id
- left join organization_identity oi on oi.uid = a.owner_id
- left join achievement_interest ai on ai.achievement_id = a.id and ai.uid = #{0}
- left join achievement_order ao on ao.achievement_id = a.id and ao.uid = #{0} and ao.status <![CDATA[ <> ]]> 6
- where a.id = #{1}
- </select>
-
- <select id="findAchievementNumByUid" parameterType="java.lang.String" resultType="java.lang.Integer">
- select
- count(1)
- from achievement
- where
- deleted_sign = 0
- and release_status = 1
- and audit_status = 3
- and owner_id = #{uid,jdbcType=VARCHAR}
- </select>
-
- <select id="findPartnerAchievementListByPage" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementPartnerListBo">
- SELECT
- id,
- serial_number AS serialNumber,
- data_category AS dataCategory,
- NAME,
- keyword,
- category,
- owner_type as ownerType,
- release_date AS releaseDate,
- field_a as fieldA,
- maturity,
- introduction,
- technical_picture_url as technicalPictureUrl,
- bargaining_mode as bargainingMode,
- transfer_price as transferPrice
- FROM
- achievement
- WHERE
- audit_status = 3
- AND release_status = 1
- AND deleted_sign = 0
- AND owner_id = #{ownerId,jdbcType=VARCHAR}
- </select>
-
- <select id="findPartnerAchievementCount" parameterType="java.lang.String" resultType="java.lang.Integer">
- SELECT
- count(1)
- FROM
- achievement
- WHERE
- audit_status = 3
- AND release_status = 1
- AND deleted_sign = 0
- AND owner_id = #{ownerId,jdbcType=VARCHAR}
- </select>
-
- <select id="findUserPortalAchievementDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.AchievementPortalDetailBo">
- SELECT
- a.id,
- a.name,
- a.keyword,
- a.category,
- a.introduction,
- a.maturity,
- a.transfer_price AS transferPrice,
- a.patent_case AS patentCase,
- a.field_a as fieldA,
- fg.name AS fieldAS,
- fgg.name AS fieldBS,
- a.release_date AS releaseDate,
- dg.name as province,
- dgg.name as city,
- a.technical_picture_url AS technicalPictureUrl,
- a.transfer_mode as transferMode,
- interest.id as interestId,
- u.lvl as level,
- a.owner_name as ownerName,
- a.owner_mobile as ownerMobile,
- a.bargaining_mode as bargainingMode,
- ui.city as location
- FROM
- achievement a
- LEFT JOIN <![CDATA[ user ]]> u on u.id = a.owner_id
- LEFT JOIN user_identity ui on ui.uid = a.owner_id
- LEFT JOIN district_glossory dg on dg.id = ui.province
- LEFT JOIN district_glossory dgg on dgg.id = ui.city
- LEFT JOIN field_glossory fg on fg.id = a.field_a
- LEFT JOIN field_glossory fgg on fgg.id = a.field_b
- LEFT JOIN achievement_interest interest on interest.achievement_id = a.id and interest.uid = #{uid,jdbcType=VARCHAR}
- WHERE
- a.id = #{id,jdbcType=VARCHAR}
- </select>
-
- <select id="findOrgPortalAchievementDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.AchievementPortalDetailBo">
- SELECT
- a.id,
- a.name,
- a.keyword,
- a.category,
- a.introduction,
- a.maturity,
- a.transfer_price AS transferPrice,
- a.patent_case AS patentCase,
- a.field_a as fieldA,
- fg.name AS fieldAS,
- fgg.name AS fieldBS,
- a.release_date AS releaseDate,
- dg.name as province,
- dgg.name as city,
- a.technical_picture_url AS technicalPictureUrl,
- a.transfer_mode as transferMode,
- interest.id as interestId,
- u.lvl as level,
- a.owner_name as ownerName,
- a.bargaining_mode as bargainingMode
- FROM
- achievement a
- LEFT JOIN <![CDATA[ user ]]> u on u.id = a.owner_id
- LEFT JOIN organization_identity oi on oi.uid = a.owner_id
- LEFT JOIN district_glossory dg on dg.id = oi.licence_province
- LEFT JOIN district_glossory dgg on dgg.id = oi.licence_city
- LEFT JOIN field_glossory fg on fg.id = a.field_a
- LEFT JOIN field_glossory fgg on fgg.id = a.field_b
- LEFT JOIN achievement_interest interest on interest.achievement_id = a.id and interest.uid = #{uid,jdbcType=VARCHAR}
- WHERE
- a.id = #{id,jdbcType=VARCHAR}
- </select>
-
- <select id="findUserPortalSimilarByFieldA" resultType="com.goafanti.portal.bo.AchievementPortalSimilarListBo">
- SELECT
- a.id,
- a.name,
- a.maturity,
- dg.name as uprovince,
- dgg.name as ucity,
- dggg.name as oprovince,
- dgggg.name as ocity,
- a.transfer_price as transferPrice,
- a.bargaining_mode as bargainingMode
- FROM
- achievement a
- LEFT JOIN user_identity ui ON ui.uid = a.owner_id
- LEFT JOIN organization_identity oi on oi.uid = a.owner_id
- LEFT JOIN district_glossory dg on dg.id = ui.province
- LEFT JOIN district_glossory dgg on dgg.id = ui.city
- LEFT JOIN district_glossory dggg on dggg.id = oi.licence_province
- LEFT JOIN district_glossory dgggg on dgggg.id = oi.licence_city
- WHERE
- a.audit_status = 3
- AND a.deleted_sign = 0
- AND a.release_status = 1
- AND a.field_a = #{fieldA,jdbcType=INTEGER}
- AND a.id <![CDATA[ <> ]]> #{id,jdbcType=VARCHAR}
- order by a.serial_number desc
- limit 5
- </select>
-
- <select id="findOrgPortalSimilarByFieldA" resultType="com.goafanti.portal.bo.AchievementPortalSimilarListBo">
- SELECT
- a.id,
- a.name,
- a.maturity,
- dg.name as oprovince,
- dgg.name as ocity,
- dggg.name as uprovince,
- dgggg.name as ucity,
- a.transfer_price as transferPrice,
- a.bargaining_mode as bargainingMode
- FROM
- achievement a
- LEFT JOIN organization_identity oi ON oi.uid = a.owner_id
- LEFT JOIN user_identity ui ON ui.uid = a.owner_id
- LEFT JOIN district_glossory dg on dg.id = oi.licence_province
- LEFT JOIN district_glossory dgg on dgg.id = oi.licence_city
- LEFT JOIN district_glossory dggg on dggg.id = ui.province
- LEFT JOIN district_glossory dgggg on dgggg.id = ui.city
- WHERE
- a.audit_status = 3
- AND a.deleted_sign = 0
- AND a.release_status = 1
- AND a.field_a = #{fieldA,jdbcType=INTEGER}
- AND a.id <![CDATA[ <> ]]> #{id,jdbcType=VARCHAR}
- order by a.serial_number desc
- limit 5
- </select>
-
- <update id="updateOwnerId" parameterType="java.lang.String" >
- update achievement
- set owner_id = null
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <select id="selectInternationalAchievement" resultType="com.goafanti.portal.bo.InternationalListBo">
- select
- a.id as id,
- a.name as techName,
- a.introduction,
- a.owner_name as ownerName,
- a.owner_type as ownerType,
- a.technical_picture_url as technicalPictureUrl,
- a.country_name_zh as countryNameZh
- from
- achievement a
- where
- a.deleted_sign = 0 and a.data_category = 1
- <!-- and a.release_status = 1 and nternational_flag = 1 -->
- order by
- a.release_date desc
- limit 0,5
- </select>
- <select id="findBoutiqueListByPage" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.BoutiqueListBo">
- select
- a.id ,
- a.name,
- a.transfer_price as price,
- a.summary as sketch,
- a.technical_picture_url as pictureUrl,
- a.owner_type as ownerType,
- b.name as industryCatalog,
- a.owner_name as personName
- from
- achievement a
- left join
- field_glossory b
- on
- a.field_a = b.id
- where
- a.boutique = 1 and a.audit_status = 3 and a.deleted_sign=0
- <if test="fieldA != null and fieldA != ''">
- and a.field_a = #{fieldA,jdbcType=INTEGER}
- </if>
- <if test="dataCategory != null and dataCategory != ''">
- and data_category = #{dataCategory,jdbcType=INTEGER}
- </if>
- <if test="category != null and category != ''">
- and category = #{category,jdbcType=INTEGER}
- </if>
- order by a.create_time desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="findBoutiqueCount" parameterType="java.lang.String" resultType="java.lang.Integer">
- select
- count(0)
- from
- achievement a
- left join
- field_glossory b
- on
- a.field_a = b.id
- where
- a.boutique = 1 and a.audit_status = 3 and a.deleted_sign=0
- <if test="fieldA != null and fieldA != ''">
- and a.field_a = #{fieldA,jdbcType=INTEGER}
- </if>
- <if test="dataCategory != null and dataCategory != ''">
- and data_category = #{dataCategory,jdbcType=INTEGER}
- </if>
- <if test="category != null and category != ''">
- and category = #{category,jdbcType=INTEGER}
- </if>
- </select>
-
- <select id="listAchievement" resultType="com.goafanti.achievement.bo.AchievementListBo">
- select
- a.id, a.name, a.keyword,a.introduction,a.category,
- a.serial_number as serialNumber,
- a.data_category as dataCategory,
- a.owner_type as ownerType,
- a.owner_name as ownerName,
- a.field_a as fieldA,
- a.transfer_price as transferPrice,
- a.transfer_mode as transfermode,
- a.maturity,
- a.technical_picture_url as technicalpictureurl
- from achievement a
- where
- a.deleted_sign = 0
- and a.category = 0
- and a.release_status = 1
- and a.audit_status = 3
- order by a.release_date desc limit 0,12
- </select>
-
- <!-- 查询猜你喜欢 -->
- <select id="selectCsutomerLike" resultType="com.goafanti.achievement.bo.AchievementListBo">
- select
- a.id, a.name, a.keyword,a.introduction,a.category,
- a.serial_number as serialNumber,
- a.data_category as dataCategory,
- a.owner_type as ownerType,
- a.owner_name as ownerName,
- a.field_a as fieldA,
- a.field_b as fieldB,
- a.transfer_price as transferPrice,
- a.technical_picture_url as technicalpictureurl
- from achievement a
- LEFT JOIN aft.achievement_interest b on a.id = b.achievement_id
- where
- a.deleted_sign = 0
- and category = 0
- and a.release_status = 1
- and a.audit_status = 3
- <if test="boutique != null">
- and a.boutique= #{boutique,jdbcType=INTEGER}
- </if>
- order by a.release_date desc limit 0,4
- </select>
-
- <select id="countInterest" resultType="Integer">
- select count(0)
- from achievement_interest
- where achievement_id=#{achievementId,jdbcType=VARCHAR}
- </select>
-
- <select id="achievementInterest" resultType="com.goafanti.achievement.bo.AchievementInterestBo">
- select
- a.id,a.name,a.create_time as createTime
- from achievement_interest ai
- LEFT join achievement a on ai.achievement_id=a.id
- where uid=#{uid,jdbcType=VARCHAR}
- </select>
-
- <select id="findMyAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
- select
- a.id, a.boutique,a.name,a.category, a.audit_status as auditStatus,ifnull(t.x,0) as buyIntention,
- a.release_date as releaseDate,ifnull(i.y,0) as countInterest
- from achievement a
- left join (select count(0) as x,commodity_id from t_order
- where order_status != 4
- group by commodity_id ) t on a.id=t.commodity_id
- left join (select count(0) as y,achievement_id from achievement_interest
- group by achievement_id ) i on a.id=i.achievement_id
- where a.deleted_sign = 0
- <if test="ownerId != null">
- and a.owner_id = #{ownerId,jdbcType=VARCHAR}
- </if>
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findMyAchievementCount" parameterType="String" resultType="java.lang.Integer">
- select
- count(1)
- from achievement a
- where a.deleted_sign = 0
- <if test="ownerId != null">
- and a.owner_id = #{ownerId,jdbcType=VARCHAR}
- </if>
- </select>
-
-
- </mapper>
|