| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261 |
- <?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.DemandMapper" >
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.Demand" >
- <id column="id" property="id" jdbcType="VARCHAR" />
- <result column="serial_number" property="serialNumber" jdbcType="INTEGER" />
- <result column="data_category" property="dataCategory" jdbcType="INTEGER" />
- <result column="name" property="name" jdbcType="VARCHAR" />
- <result column="keyword" property="keyword" jdbcType="VARCHAR" />
- <result column="info_sources" property="infoSources" jdbcType="INTEGER" />
- <result column="industry_category_a" property="industryCategoryA" jdbcType="INTEGER" />
- <result column="industry_category_b" property="industryCategoryB" jdbcType="INTEGER" />
- <result column="industry_category_c" property="industryCategoryC" jdbcType="INTEGER" />
- <result column="demand_type" property="demandType" jdbcType="INTEGER" />
- <result column="problem_des" property="problemDes" jdbcType="LONGVARCHAR" />
- <result column="technical_requirements" property="technicalRequirements" jdbcType="VARCHAR" />
- <result column="picture_url" property="pictureUrl" jdbcType="LONGVARCHAR" />
- <result column="text_file_url" property="textFileUrl" jdbcType="VARCHAR" />
- <result column="video_url" property="videoUrl" jdbcType="VARCHAR" />
- <result column="fixed_budget" property="fixedBudget" jdbcType="DECIMAL" />
- <result column="fixed_cycle" property="fixedCycle" jdbcType="VARCHAR" />
- <result column="people_number" property="peopleNumber" jdbcType="INTEGER" />
- <result column="fixed_scheme" property="fixedScheme" jdbcType="VARCHAR" />
- <result column="cost_escrow" property="costEscrow" jdbcType="DECIMAL" />
- <result column="budget_cost" property="budgetCost" jdbcType="DECIMAL" />
- <result column="validity_period" property="validityPeriod" jdbcType="TIMESTAMP" />
- <result column="employer_id" property="employerId" jdbcType="VARCHAR" />
- <result column="employer_name" property="employerName" jdbcType="VARCHAR" />
- <result column="employer_address" property="employerAddress" jdbcType="VARCHAR" />
- <result column="employer_contacts" property="employerContacts" jdbcType="VARCHAR" />
- <result column="employer_contacts_mobile" property="employerContactsMobile" jdbcType="VARCHAR" />
- <result column="employer_contacts_mailbox" property="employerContactsMailbox" jdbcType="VARCHAR" />
- <result column="contacts" property="contacts" jdbcType="INTEGER" />
- <result column="status" property="status" jdbcType="INTEGER" />
- <result column="release_status" property="releaseStatus" jdbcType="INTEGER" />
- <result column="release_date" property="releaseDate" jdbcType="TIMESTAMP" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- <result column="principal_id" property="principalId" jdbcType="VARCHAR" />
- <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
- <result column="audit_status" property="auditStatus" jdbcType="INTEGER" />
- <result column="tech_broker_id" property="techBrokerId" jdbcType="VARCHAR" />
- <result column="boutique" property="boutique" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- id, serial_number, data_category, name, keyword, info_sources, industry_category_a,
- industry_category_b, industry_category_c, demand_type, problem_des, technical_requirements,
- picture_url, text_file_url, video_url, fixed_budget, fixed_cycle, people_number,
- fixed_scheme, cost_escrow, budget_cost, validity_period, employer_id, employer_name,
- employer_address, employer_contacts, employer_contacts_mobile, employer_contacts_mailbox,
- contacts, status, release_status, release_date, create_time, principal_id, deleted_sign,
- audit_status, tech_broker_id,boutique
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from demand
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
- delete from demand
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.Demand" >
- insert into demand (id, serial_number, data_category,
- name, keyword, info_sources,
- industry_category_a, industry_category_b, industry_category_c,
- demand_type, problem_des, technical_requirements,
- picture_url, text_file_url, video_url,
- fixed_budget, fixed_cycle, people_number,
- fixed_scheme, cost_escrow, budget_cost,
- validity_period, employer_id, employer_name,
- employer_address, employer_contacts, employer_contacts_mobile,
- employer_contacts_mailbox, contacts, status,
- release_status, release_date, create_time,
- principal_id, deleted_sign, audit_status, tech_broker_id,boutique)
- values (#{id,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, #{dataCategory,jdbcType=INTEGER},
- #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{infoSources,jdbcType=INTEGER},
- #{industryCategoryA,jdbcType=INTEGER}, #{industryCategoryB,jdbcType=INTEGER}, #{industryCategoryC,jdbcType=INTEGER},
- #{demandType,jdbcType=INTEGER}, #{problemDes,jdbcType=VARCHAR}, #{technicalRequirements,jdbcType=VARCHAR},
- #{pictureUrl,jdbcType=LONGVARCHAR}, #{textFileUrl,jdbcType=VARCHAR}, #{videoUrl,jdbcType=VARCHAR},
- #{fixedBudget,jdbcType=DECIMAL}, #{fixedCycle,jdbcType=VARCHAR}, #{peopleNumber,jdbcType=INTEGER},
- #{fixedScheme,jdbcType=VARCHAR}, #{costEscrow,jdbcType=DECIMAL}, #{budgetCost,jdbcType=DECIMAL},
- #{validityPeriod,jdbcType=TIMESTAMP}, #{employerId,jdbcType=VARCHAR}, #{employerName,jdbcType=VARCHAR},
- #{employerAddress,jdbcType=VARCHAR}, #{employerContacts,jdbcType=VARCHAR}, #{employerContactsMobile,jdbcType=VARCHAR},
- #{employerContactsMailbox,jdbcType=VARCHAR}, #{contacts,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
- #{releaseStatus,jdbcType=INTEGER}, #{releaseDate,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
- #{principalId,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER},
- #{techBrokerId,jdbcType=VARCHAR},#{boutique,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.Demand" >
- insert into demand
- <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="infoSources != null" >
- info_sources,
- </if>
- <if test="industryCategoryA != null" >
- industry_category_a,
- </if>
- <if test="industryCategoryB != null" >
- industry_category_b,
- </if>
- <if test="industryCategoryC != null" >
- industry_category_c,
- </if>
- <if test="demandType != null" >
- demand_type,
- </if>
- <if test="problemDes != null" >
- problem_des,
- </if>
- <if test="technicalRequirements != null" >
- technical_requirements,
- </if>
- <if test="pictureUrl != null" >
- picture_url,
- </if>
- <if test="textFileUrl != null" >
- text_file_url,
- </if>
- <if test="videoUrl != null" >
- video_url,
- </if>
- <if test="fixedBudget != null" >
- fixed_budget,
- </if>
- <if test="fixedCycle != null" >
- fixed_cycle,
- </if>
- <if test="peopleNumber != null" >
- people_number,
- </if>
- <if test="fixedScheme != null" >
- fixed_scheme,
- </if>
- <if test="costEscrow != null" >
- cost_escrow,
- </if>
- <if test="budgetCost != null" >
- budget_cost,
- </if>
- <if test="validityPeriod != null" >
- validity_period,
- </if>
- <if test="employerId != null" >
- employer_id,
- </if>
- <if test="employerName != null" >
- employer_name,
- </if>
- <if test="employerAddress != null" >
- employer_address,
- </if>
- <if test="employerContacts != null" >
- employer_contacts,
- </if>
- <if test="employerContactsMobile != null" >
- employer_contacts_mobile,
- </if>
- <if test="employerContactsMailbox != null" >
- employer_contacts_mailbox,
- </if>
- <if test="contacts != null" >
- contacts,
- </if>
- <if test="status != null" >
- status,
- </if>
- <if test="releaseStatus != null" >
- release_status,
- </if>
- <if test="releaseDate != null" >
- release_date,
- </if>
- <if test="createTime != null" >
- create_time,
- </if>
- <if test="principalId != null" >
- principal_id,
- </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="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="infoSources != null" >
- #{infoSources,jdbcType=INTEGER},
- </if>
- <if test="industryCategoryA != null" >
- #{industryCategoryA,jdbcType=INTEGER},
- </if>
- <if test="industryCategoryB != null" >
- #{industryCategoryB,jdbcType=INTEGER},
- </if>
- <if test="industryCategoryC != null" >
- #{industryCategoryC,jdbcType=INTEGER},
- </if>
- <if test="demandType != null" >
- #{demandType,jdbcType=INTEGER},
- </if>
- <if test="problemDes != null" >
- #{problemDes,jdbcType=VARCHAR},
- </if>
- <if test="technicalRequirements != null" >
- #{technicalRequirements,jdbcType=VARCHAR},
- </if>
- <if test="pictureUrl != null" >
- #{pictureUrl,jdbcType=LONGVARCHAR},
- </if>
- <if test="textFileUrl != null" >
- #{textFileUrl,jdbcType=VARCHAR},
- </if>
- <if test="videoUrl != null" >
- #{videoUrl,jdbcType=VARCHAR},
- </if>
- <if test="fixedBudget != null" >
- #{fixedBudget,jdbcType=DECIMAL},
- </if>
- <if test="fixedCycle != null" >
- #{fixedCycle,jdbcType=VARCHAR},
- </if>
- <if test="peopleNumber != null" >
- #{peopleNumber,jdbcType=INTEGER},
- </if>
- <if test="fixedScheme != null" >
- #{fixedScheme,jdbcType=VARCHAR},
- </if>
- <if test="costEscrow != null" >
- #{costEscrow,jdbcType=DECIMAL},
- </if>
- <if test="budgetCost != null" >
- #{budgetCost,jdbcType=DECIMAL},
- </if>
- <if test="validityPeriod != null" >
- #{validityPeriod,jdbcType=TIMESTAMP},
- </if>
- <if test="employerId != null" >
- #{employerId,jdbcType=VARCHAR},
- </if>
- <if test="employerName != null" >
- #{employerName,jdbcType=VARCHAR},
- </if>
- <if test="employerAddress != null" >
- #{employerAddress,jdbcType=VARCHAR},
- </if>
- <if test="employerContacts != null" >
- #{employerContacts,jdbcType=VARCHAR},
- </if>
- <if test="employerContactsMobile != null" >
- #{employerContactsMobile,jdbcType=VARCHAR},
- </if>
- <if test="employerContactsMailbox != null" >
- #{employerContactsMailbox,jdbcType=VARCHAR},
- </if>
- <if test="contacts != null" >
- #{contacts,jdbcType=INTEGER},
- </if>
- <if test="status != null" >
- #{status,jdbcType=INTEGER},
- </if>
- <if test="releaseStatus != null" >
- #{releaseStatus,jdbcType=INTEGER},
- </if>
- <if test="releaseDate != null" >
- #{releaseDate,jdbcType=TIMESTAMP},
- </if>
- <if test="createTime != null" >
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="principalId != null" >
- #{principalId,jdbcType=VARCHAR},
- </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="boutique != null" >
- #{boutique,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Demand" >
- update demand
- <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="infoSources != null" >
- info_sources = #{infoSources,jdbcType=INTEGER},
- </if>
- <if test="industryCategoryA != null" >
- industry_category_a = #{industryCategoryA,jdbcType=INTEGER},
- </if>
- <if test="industryCategoryB != null" >
- industry_category_b = #{industryCategoryB,jdbcType=INTEGER},
- </if>
- <if test="industryCategoryC != null" >
- industry_category_c = #{industryCategoryC,jdbcType=INTEGER},
- </if>
- <if test="demandType != null" >
- demand_type = #{demandType,jdbcType=INTEGER},
- </if>
- <if test="problemDes != null" >
- problem_des = #{problemDes,jdbcType=VARCHAR},
- </if>
- <if test="technicalRequirements != null" >
- technical_requirements = #{technicalRequirements,jdbcType=VARCHAR},
- </if>
- <if test="pictureUrl != null" >
- picture_url = #{pictureUrl,jdbcType=LONGVARCHAR},
- </if>
- <if test="textFileUrl != null" >
- text_file_url = #{textFileUrl,jdbcType=VARCHAR},
- </if>
- <if test="videoUrl != null" >
- video_url = #{videoUrl,jdbcType=VARCHAR},
- </if>
- <if test="fixedBudget != null" >
- fixed_budget = #{fixedBudget,jdbcType=DECIMAL},
- </if>
- <if test="fixedCycle != null" >
- fixed_cycle = #{fixedCycle,jdbcType=VARCHAR},
- </if>
- <if test="peopleNumber != null" >
- people_number = #{peopleNumber,jdbcType=INTEGER},
- </if>
- <if test="fixedScheme != null" >
- fixed_scheme = #{fixedScheme,jdbcType=VARCHAR},
- </if>
- <if test="costEscrow != null" >
- cost_escrow = #{costEscrow,jdbcType=DECIMAL},
- </if>
- <if test="budgetCost != null" >
- budget_cost = #{budgetCost,jdbcType=DECIMAL},
- </if>
- <if test="validityPeriod != null" >
- validity_period = #{validityPeriod,jdbcType=TIMESTAMP},
- </if>
- <if test="employerId != null" >
- employer_id = #{employerId,jdbcType=VARCHAR},
- </if>
- <if test="employerName != null" >
- employer_name = #{employerName,jdbcType=VARCHAR},
- </if>
- <if test="employerAddress != null" >
- employer_address = #{employerAddress,jdbcType=VARCHAR},
- </if>
- <if test="employerContacts != null" >
- employer_contacts = #{employerContacts,jdbcType=VARCHAR},
- </if>
- <if test="employerContactsMobile != null" >
- employer_contacts_mobile = #{employerContactsMobile,jdbcType=VARCHAR},
- </if>
- <if test="employerContactsMailbox != null" >
- employer_contacts_mailbox = #{employerContactsMailbox,jdbcType=VARCHAR},
- </if>
- <if test="contacts != null" >
- contacts = #{contacts,jdbcType=INTEGER},
- </if>
- <if test="status != null" >
- status = #{status,jdbcType=INTEGER},
- </if>
- <if test="releaseStatus != null" >
- release_status = #{releaseStatus,jdbcType=INTEGER},
- </if>
- <if test="releaseDate != null" >
- release_date = #{releaseDate,jdbcType=TIMESTAMP},
- </if>
- <if test="createTime != null" >
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="principalId != null" >
- principal_id = #{principalId,jdbcType=VARCHAR},
- </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="boutique != null">
- boutique = #{boutique,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Demand" >
- update demand
- set serial_number = #{serialNumber,jdbcType=INTEGER},
- data_category = #{dataCategory,jdbcType=INTEGER},
- name = #{name,jdbcType=VARCHAR},
- keyword = #{keyword,jdbcType=VARCHAR},
- info_sources = #{infoSources,jdbcType=INTEGER},
- industry_category_a = #{industryCategoryA,jdbcType=INTEGER},
- industry_category_b = #{industryCategoryB,jdbcType=INTEGER},
- industry_category_c = #{industryCategoryC,jdbcType=INTEGER},
- demand_type = #{demandType,jdbcType=INTEGER},
- problem_des = #{problemDes,jdbcType=VARCHAR},
- technical_requirements = #{technicalRequirements,jdbcType=VARCHAR},
- picture_url = #{pictureUrl,jdbcType=LONGVARCHAR},
- text_file_url = #{textFileUrl,jdbcType=VARCHAR},
- video_url = #{videoUrl,jdbcType=VARCHAR},
- fixed_budget = #{fixedBudget,jdbcType=DECIMAL},
- fixed_cycle = #{fixedCycle,jdbcType=VARCHAR},
- people_number = #{peopleNumber,jdbcType=INTEGER},
- fixed_scheme = #{fixedScheme,jdbcType=VARCHAR},
- cost_escrow = #{costEscrow,jdbcType=DECIMAL},
- budget_cost = #{budgetCost,jdbcType=DECIMAL},
- validity_period = #{validityPeriod,jdbcType=TIMESTAMP},
- employer_id = #{employerId,jdbcType=VARCHAR},
- employer_name = #{employerName,jdbcType=VARCHAR},
- employer_address = #{employerAddress,jdbcType=VARCHAR},
- employer_contacts = #{employerContacts,jdbcType=VARCHAR},
- employer_contacts_mobile = #{employerContactsMobile,jdbcType=VARCHAR},
- employer_contacts_mailbox = #{employerContactsMailbox,jdbcType=VARCHAR},
- contacts = #{contacts,jdbcType=INTEGER},
- status = #{status,jdbcType=INTEGER},
- release_status = #{releaseStatus,jdbcType=INTEGER},
- release_date = #{releaseDate,jdbcType=TIMESTAMP},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- principal_id = #{principalId,jdbcType=VARCHAR},
- deleted_sign = #{deletedSign,jdbcType=INTEGER},
- audit_status = #{auditStatus,jdbcType=INTEGER},
- tech_broker_id = #{techBrokerId,jdbcType=VARCHAR},
- boutique = #{boutique,jdbcType=INTEGER}
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <select id="findManageUserDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandManageListBo">
- select
- d.id, d.serial_number as serialNumber, d.data_category as dataCategory,
- d.name, d.keyword, d.info_sources as infoSources,
- ui.username, d.demand_type as demandType, d.validity_period as validityPeriod,
- d.employer_name as employerName, ui.province, d.status,
- d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,
- d.employer_id as employerId, d.audit_status as auditStatus
- from demand d
- LEFT JOIN user_identity ui on d.employer_id = ui.uid
- LEFT JOIN admin a on a.id = d.tech_broker_id
- <if test="adminId != null">
- LEFT JOIN user u on d.employer_id = u.id
- </if>
- where d.deleted_sign = 0 and d.data_category = 0
- <if test="adminId != null">
- and (u.mid = #{adminId,jdbcType=VARCHAR}
- or d.principal_id = #{adminId,jdbcType=VARCHAR}
- or d.tech_broker_id = #{adminId,jdbcType=VARCHAR}
- )
- </if>
- <if test="province != null">
- and ui.province = #{province,jdbcType=INTEGER}
- </if>
- <if test="auditStatus != null">
- and d.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="serialNumber != null">
- and d.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and d.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="keyword != null">
- and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="username != null">
- and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
- </if>
- <if test="employerName != null">
- and d.employer_name like CONCAT('%',#{employerName,jdbcType=VARCHAR},'%')
- and (d.employer_id is null or d.employer_id='')
- </if>
- <if test="infoSources != null">
- and d.info_sources = #{infoSources,jdbcType=INTEGER}
- </if>
- <if test="demandType != null">
- and d.demand_type = #{demandType,jdbcType=INTEGER}
- </if>
- <if test="status != null">
- and d.status = #{status,jdbcType=VARCHAR}
- </if>
- <if test="releaseStatus != null">
- and d.release_status = #{releaseStatus,jdbcType=INTEGER}
- </if>
- <if test="vStart != null">
- and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
- </if>
- <if test="vEnd != null">
- and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="rStart != null">
- and d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
- </if>
- <if test="rEnd != null">
- and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
- </if>
- order by d.serial_number desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id ="findManageUserDemandCount" parameterType="String" resultType="java.lang.Integer">
- select
- count(1)
- from demand d
- LEFT JOIN user_identity ui on d.employer_id = ui.uid
- LEFT JOIN admin a on a.id = d.tech_broker_id
- <if test="adminId != null">
- LEFT JOIN user u on d.employer_id = u.id
- </if>
- where d.deleted_sign = 0 and d.data_category = 0
- <if test="adminId != null">
- and (u.mid = #{adminId,jdbcType=VARCHAR}
- or d.principal_id = #{adminId,jdbcType=VARCHAR}
- or d.tech_broker_id = #{adminId,jdbcType=VARCHAR}
- )
- </if>
- <if test="serialNumber != null">
- and d.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="province != null">
- and ui.province = #{province,jdbcType=INTEGER}
- </if>
- <if test="auditStatus != null">
- and d.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and d.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="keyword != null">
- and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="username != null">
- and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
- </if>
- <if test="employerName != null">
- and d.employer_name like CONCAT('%',#{employerName,jdbcType=VARCHAR},'%')
- and (d.employer_id is null or d.employer_id='')
- </if>
- <if test="infoSources != null">
- and d.info_sources = #{infoSources,jdbcType=INTEGER}
- </if>
- <if test="demandType != null">
- and d.demand_type = #{demandType,jdbcType=INTEGER}
- </if>
- <if test="status != null">
- and d.status = #{status,jdbcType=INTEGER}
- </if>
- <if test="releaseStatus != null">
- and d.release_status = #{releaseStatus,jdbcType=INTEGER}
- </if>
- <if test="vStart != null">
- and d.validity_period <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
- </if>
- <if test="vEnd != null">
- and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="rStart != null">
- and d.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
- </if>
- <if test="rEnd != null">
- and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
- </if>
- </select>
-
- <select id="findManageOrgDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandManageListBo">
- select
- d.id, d.serial_number as serialNumber, d.data_category as dataCategory,
- d.name, d.keyword, d.info_sources as infoSources,
- oi.unit_name as username, d.demand_type as demandType, d.validity_period as validityPeriod,
- d.employer_name as employerName, oi.licence_province as province, d.status,
- d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,
- d.employer_id as employerId, d.audit_status as auditStatus,
- d.tech_broker_id as techBrokerId,d.boutique
- from demand d
- LEFT JOIN organization_identity oi on d.employer_id = oi.uid
- LEFT JOIN admin a on a.id = d.tech_broker_id
- <if test="adminId != null">
- LEFT JOIN user u on d.employer_id = u.id
- </if>
- where d.deleted_sign = 0 and d.data_category = 1
- <if test="adminId != null">
- and (u.mid = #{adminId,jdbcType=VARCHAR}
- </if>
- <if test="adminId != null">
- or d.principal_id = #{adminId,jdbcType=VARCHAR}
- </if>
- <if test="adminId != null">
- or d.tech_broker_id = #{adminId,jdbcType=VARCHAR}
- )
- </if>
- <if test="province != null">
- and oi.licence_province = #{province,jdbcType=INTEGER}
- </if>
- <if test="serialNumber != null">
- and d.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="auditStatus != null">
- and d.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and d.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="keyword != null">
- and d.keyword like CONCAT('%',#{keyword,jdbcType=VARCHAR},'%')
- </if>
- <if test="unitName != null">
- and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
- </if>
- <if test="employerName != null">
- and d.employer_name like CONCAT('%',#{employerName,jdbcType=VARCHAR},'%')
- and (d.employer_id is null or d.employer_id='')
- </if>
- <if test="infoSources != null">
- and d.info_sources = #{infoSources,jdbcType=INTEGER}
- </if>
- <if test="demandType != null">
- and d.demand_type = #{demandType,jdbcType=INTEGER}
- </if>
- <if test="status != null">
- and d.status = #{status,jdbcType=INTEGER}
- </if>
- <if test="releaseStatus != null">
- and d.release_status = #{releaseStatus,jdbcType=VARCHAR}
- </if>
- <if test="vStart != null">
- and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
- </if>
- <if test="vEnd != null">
- and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="rStart != null">
- and d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
- </if>
- <if test="rEnd != null">
- and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
- </if>
- order by d.serial_number desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id ="findManageOrgDemandCount" parameterType="String" resultType="java.lang.Integer">
- select
- count(1)
- from demand d
- LEFT JOIN organization_identity oi on d.employer_id = oi.uid
- LEFT JOIN admin a on a.id = d.tech_broker_id
- <if test="adminId != null">
- LEFT JOIN user u on d.employer_id = u.id
- </if>
- where d.deleted_sign = 0 and d.data_category = 1
- <if test="adminId != null">
- and (u.mid = #{adminId,jdbcType=VARCHAR}
- </if>
- <if test="adminId != null">
- or d.principal_id = #{adminId,jdbcType=VARCHAR}
- </if>
- <if test="adminId != null">
- or d.tech_broker_id = #{adminId,jdbcType=VARCHAR}
- )
- </if>
- <if test="serialNumber != null">
- and d.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="auditStatus != null">
- and d.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="province != null">
- and oi.licence_province = #{province,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and d.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="keyword != null">
- and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="unitName != null">
- and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
- </if>
- <if test="employerName != null">
- and d.employer_name like CONCAT('%',#{employerName,jdbcType=VARCHAR},'%')
- and (d.employer_id is null or d.employer_id='')
- </if>
- <if test="infoSources != null">
- and d.info_sources = #{infoSources,jdbcType=INTEGER}
- </if>
- <if test="demandType != null">
- and d.demand_type = #{demandType,jdbcType=INTEGER}
- </if>
- <if test="status != null">
- and d.status = #{status,jdbcType=VARCHAR}
- </if>
- <if test="releaseStatus != null">
- and d.release_status = #{releaseStatus,jdbcType=VARCHAR}
- </if>
- <if test="vStart != null">
- and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
- </if>
- <if test="vEnd != null">
- and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="rStart != null">
- and d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
- </if>
- <if test="rEnd != null">
- and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
- </if>
- </select>
-
- <select id="selectUserDemandDetail" parameterType="java.lang.String" resultType="com.goafanti.demand.bo.DemandManageDetailBo">
- select
- d.id, d.serial_number as serialNumber, d.data_category as dataCategory,
- d.name, d.keyword, d.info_sources as infoSources,
- ui.username, d.demand_type as demandType, d.validity_period as validityPeriod,
- ui.province, d.status, d.release_status as releaseStatus,
- d.release_date as releaseDate, d.principal_id as principalId, d.industry_category_a as industryCategoryA,
- d.industry_category_b as industryCategoryB, d.problem_des as problemDes, d.technical_requirements as technicalRequirements,
- d.picture_url as pictureUrl, d.text_file_url as textFileUrl, d.video_url as videoUrl,
- d.budget_cost as budgetCost, d.fixed_cycle as fixedCycle, d.people_number as peopleNumber,
- d.fixed_scheme as fixedScheme, d.cost_escrow as costEscrow, d.employer_id as employerId,
- info.postal_address as address, u.email as mailbox, u.mobile as mobile, d.audit_status as auditStatus,
- d.employer_address as employerAddress, d.employer_contacts_mobile as employerContactsMobile,
- d.employer_contacts_mailbox as employerContactsMailbox, d.employer_name as employerName,
- d.tech_broker_id as techBrokerId, u.mobile as contactsName
- from demand d
- left join user_identity ui on ui.uid = d.employer_id
- left join user_info info on info.uid = d.employer_id
- left join user u on u.id = d.employer_id
- where d.data_category = 0 and d.id = #{id,jdbcType=VARCHAR}
- </select>
-
-
- <select id="selectOrgDemandDetail" parameterType="java.lang.String" resultType="com.goafanti.demand.bo.DemandManageDetailBo">
- select
- d.id, d.serial_number as serialNumber, d.data_category as dataCategory,
- d.name, d.keyword, d.info_sources as infoSources,
- oi.unit_name as username, d.demand_type as demandType, d.validity_period as validityPeriod,
- oi.licence_province as province, d.status, d.release_status as releaseStatus,
- d.release_date as releaseDate, d.principal_id as principalId, d.industry_category_a as industryCategoryA,
- d.industry_category_b as industryCategoryB, d.problem_des as problemDes, d.technical_requirements as technicalRequirements,
- d.picture_url as pictureUrl, d.text_file_url as textFileUrl, d.video_url as videoUrl,
- d.budget_cost as budgetCost, d.fixed_cycle as fixedCycle, d.people_number as peopleNumber,
- d.fixed_scheme as fixedScheme, d.cost_escrow as costEscrow, d.employer_id as employerId,
- oi.postal_address as address, u.email as mailbox, d.contacts, d.audit_status as auditStatus,
- d.tech_broker_id as techBrokerId,
- d.employer_address as employerAddress, d.employer_contacts_mobile as employerContactsMobile,
- d.employer_contacts_mailbox as employerContactsMailbox, d.employer_name as employerName,d.boutique
- from demand d
- left join organization_identity oi on oi.uid = d.employer_id
- left join user u on u.id = d.employer_id
- where d.data_category = 1 and d.id = #{id,jdbcType=VARCHAR}
- </select>
-
- <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
- update demand set deleted_sign = 1
- where id in
- <foreach item="item" collection="list" open="(" separator="," close=")">
- #{item}
- </foreach>
- </update>
-
- <update id="updateReleaseDate" parameterType="java.lang.String">
- update demand set release_date = null
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <select id="findDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandListBo">
- select
- d.id, d.serial_number as serialNumber, d.data_category as dataCategory,
- d.name, d.keyword, d.demand_type as demandType,
- d.validity_period as validityPeriod, d.status, d.release_status as releaseStatus,
- d.release_date as releaseDate, d.employer_id as employerId, d.audit_status as auditStatus
- from demand d
- where d.deleted_sign = 0
- and d.employer_id = #{employerId, jdbcType=VARCHAR}
- <if test="serialNumber != null">
- and d.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="auditStatus != null">
- and d.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and d.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="keyword != null">
- and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="demandType != null">
- and d.demand_type = #{demandType,jdbcType=INTEGER}
- </if>
- <if test="status != null">
- and d.status = #{status,jdbcType=VARCHAR}
- </if>
- <if test="releaseStatus != null">
- and d.release_status = #{releaseStatus,jdbcType=VARCHAR}
- </if>
- <if test="vStart != null">
- and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
- </if>
- <if test="vEnd != null">
- and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="rStart != null">
- and d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
- </if>
- <if test="rEnd != null">
- and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
- </if>
- order by d.serial_number desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findDemandCount" parameterType="String" resultType="java.lang.Integer">
- select count(1)
- from demand d
- where d.deleted_sign = 0
- and d.employer_id = #{employerId, jdbcType=VARCHAR}
- <if test="serialNumber != null">
- and d.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="auditStatus != null">
- and d.audit_status = #{auditStatus,jdbcType=INTEGER}
- </if>
- <if test="name != null">
- and d.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="keyword != null">
- and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="demandType != null">
- and d.demand_type = #{demandType,jdbcType=INTEGER}
- </if>
- <if test="status != null">
- and d.status = #{status,jdbcType=VARCHAR}
- </if>
- <if test="releaseStatus != null">
- and d.release_status = #{releaseStatus,jdbcType=VARCHAR}
- </if>
- <if test="vStart != null">
- and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
- </if>
- <if test="vEnd != null">
- and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="rStart != null">
- and d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
- </if>
- <if test="rEnd != null">
- and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
- </if>
- </select>
-
- <insert id="insertBatch" parameterType="com.goafanti.common.model.Demand">
- insert into demand
- (id, deleted_sign, audit_status,
- status, release_status, create_time,
- keyword, data_category, name,
- demand_type, problem_des, employer_name,
- employer_contacts, employer_contacts_mobile, employer_contacts_mailbox, info_sources)
- values
- <foreach item="item" index="index" collection="list" separator=",">
- (
- #{item.id,jdbcType=VARCHAR}, #{item.deletedSign,jdbcType=INTEGER}, #{item.auditStatus,jdbcType=INTEGER},
- #{item.status,jdbcType=INTEGER}, #{item.releaseStatus,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP},
- #{item.keyword,jdbcType=VARCHAR}, #{item.dataCategory,jdbcType=INTEGER}, #{item.name,jdbcType=VARCHAR},
- #{item.demandType,jdbcType=INTEGER}, #{item.problemDes,jdbcType=VARCHAR}, #{item.employerName,jdbcType=VARCHAR},
- #{item.employerContacts,jdbcType=VARCHAR}, #{item.employerContactsMobile,jdbcType=VARCHAR}, #{item.employerContactsMailbox,jdbcType=VARCHAR},
- #{item.infoSources,jdbcType=INTEGER}
- )
- </foreach>
- </insert>
-
- <select id="findSearchDemandListByPage" parameterType="String" resultType="com.goafanti.portal.bo.DemandSearchListBo">
- select
- d.id, d.name, d.keyword,d.data_category as dataCategory,d.picture_url as pictureUrl,
- d.serial_number as serialNumber, d.data_category as dataCategory, d.industry_category_a as industryCategoryA,
- d.industry_category_b as industryCategoryB, d.demand_type as demandType, d.budget_cost as budgetCost,
- d.problem_des as problemDes, d.release_date as releaseDate, d.employer_name as employerName,
- u.lvl as level
- from demand d
- left join user u on u.id = d.employer_id
- where d.deleted_sign = 0 and d.status = 0
- <if test="keyword != null">
- and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="industryCategoryA != null">
- and d.industry_category_a = #{industryCategoryA,jdbcType=INTEGER}
- </if>
- <if test="industryCategoryB != null">
- and d.industry_category_b = #{industryCategoryB,jdbcType=INTEGER}
- </if>
- <if test="budgetCostLower != null">
- and d.budget_cost <![CDATA[ >= ]]> #{budgetCostLower,jdbcType=DECIMAL}
- </if>
- <if test="budgetCostUpper != null">
- and d.budget_cost <![CDATA[ <= ]]> #{budgetCostUpper,jdbcType=DECIMAL}
- </if>
- <if test="demandType != null">
- and d.demand_type = #{demandType,jdbcType=INTEGER}
- </if>
- <if test="sign == 1">
- and d.budget_cost is null
- </if>
- and d.deleted_sign = 0
- and d.release_status = 1
- and d.audit_status = 3
- <if test="dateSort == 0">
- order by d.release_date asc
- </if>
- <if test="dateSort == 1">
- order by d.release_date desc
- </if>
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findSearchDemandCount" parameterType="String" resultType="java.lang.Integer">
- select
- count(1)
- from demand d
- where d.deleted_sign = 0 and d.status = 0
- <if test="keyword != null">
- and d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
- </if>
- <if test="industryCategoryA != null">
- and d.industry_category_a = #{industryCategoryA,jdbcType=INTEGER}
- </if>
- <if test="industryCategoryB != null">
- and d.industry_category_b = #{industryCategoryB,jdbcType=INTEGER}
- </if>
- <if test="budgetCostLower != null">
- and d.budget_cost <![CDATA[ >= ]]> #{budgetCostLower,jdbcType=DECIMAL}
- </if>
- <if test="budgetCostUpper != null">
- and d.budget_cost <![CDATA[ <= ]]> #{budgetCostUpper,jdbcType=DECIMAL}
- </if>
- <if test="demandType != null">
- and d.demand_type = #{demandType,jdbcType=INTEGER}
- </if>
- <if test="sign == 1">
- and d.budget_cost is null
- </if>
- and d.deleted_sign = 0
- and d.release_status = 1
- and d.audit_status = 3
- </select>
-
- <select id="selectDemandSearchDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.DemandSearchDetailBo">
- select
- d.id,
- d.employer_name as employerName,
- d.serial_number as serialNumber,
- d.keyword,
- d.data_category as dataCategory,
- d.name,
- d.industry_category_a as industryCategoryA,
- d.industry_category_b as industryCategoryB,
- d.demand_type as demandType,
- d.budget_cost as budgetCost,
- d.problem_des as problemDes,
- d.release_date as releaseDate,
- d.technical_requirements as technicalRequirements,
- d.picture_url as pictureUrl,
- d.text_file_url as textFileUrl,
- d.video_url as videoUrl,
- d.fixed_cycle as fixedCycle,
- d.people_number as peopleNumber,
- d.fixed_scheme as fixedScheme,
- d.cost_escrow as costEscrow,
- d.validity_period as validityPeriod,
- ui.username,
- oi.unit_name as unitName,
- di.id as demandInterestId,
- do.id as demandOrderId,
- do.status as orderStatus
- from demand d
- left join user_identity ui on ui.uid = d.employer_id
- left join organization_identity oi on oi.uid = d.employer_id
- left join demand_interest di on di.demand_id = d.id and di.uid = #{0}
- left join demand_order do on do.demand_id = d.id and do.uid = #{0} and do.status <![CDATA[ <> ]]> 6
- where d.id = #{1}
- </select>
-
- <select id="findDemandNumByUid" parameterType="java.lang.String" resultType="java.lang.Integer">
- select
- count(1)
- from demand
- where
- deleted_sign = 0
- and release_status = 1
- and audit_status = 3
- and employer_id = #{uid,jdbcType=VARCHAR}
- </select>
-
- <select id="findPartnerDemandListByPage" parameterType="java.lang.String" resultType="com.goafanti.demand.bo.DemandPartnerListBo">
- SELECT
- id,
- serial_number AS serialNumber,
- data_category AS dataCategory,
- NAME,
- keyword,
- release_date AS releaseDate,
- demand_type AS demandType,
- validity_period AS validityPeriod,
- problem_des as problemDes,
- industry_category_a as industryCategoryA,
- industry_category_b as industryCategoryB,
- budget_cost as budgetCost
- FROM
- demand
- WHERE
- audit_status = 3
- AND release_status = 1
- AND deleted_sign = 0
- AND employer_id = #{employerId,jdbcType=VARCHAR}
- </select>
-
- <select id="findPartnerDemandCount" parameterType="java.lang.String" resultType="java.lang.Integer">
- SELECT
- count(1)
- FROM
- demand
- WHERE
- audit_status = 3
- AND release_status = 1
- AND deleted_sign = 0
- AND employer_id = #{employerId,jdbcType=VARCHAR}
- </select>
-
- <select id="findUserPortalDemandDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.DemandPortalDetailBo">
- SELECT
- d.id,
- d.name,
- d.keyword,
- d.validity_period as validityPeriod,
- d.industry_category_a AS industryCategoryA,
- d.picture_url as pictureUrl,
- fg.name AS industryCategoryAS,
- fgg.name AS industryCategorBS,
- d.budget_cost AS budgetCost,
- d.problem_des AS problemDes,
- dg.name AS province,
- dgg.name AS city,
- interest.id as interestId,
- d.employer_name as employerName,
- u.lvl as level
- FROM
- demand d
- LEFT JOIN `user` u on u.id = d.employer_id
- LEFT JOIN user_identity ui on ui.uid = d.employer_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 = d.industry_category_a
- LEFT JOIN field_glossory fgg on fgg.id = d.industry_category_b
- LEFT JOIN demand_interest interest on interest.demand_id = d.id and interest.uid = #{uid,jdbcType=VARCHAR}
- WHERE
- d.id = #{id,jdbcType=VARCHAR}
- </select>
-
- <select id="findOrgPortalDemandDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.DemandPortalDetailBo">
- SELECT
- d.id,
- d.name,
- d.keyword,
- d.picture_url as pictureUrl,
- d.validity_period as validityPeriod,
- d.industry_category_a AS industryCategoryA,
- fg.name AS industryCategoryAS,
- fgg.name AS industryCategoryBS,
- d.budget_cost AS budgetCost,
- d.problem_des AS problemDes,
- dg.name AS province,
- dgg.name AS city,
- interest.id as interestId,
- d.employer_name as employerName,
- u.lvl as level
- FROM
- demand d
- LEFT JOIN `user` u on u.id = d.employer_id
- LEFT JOIN organization_identity oi on oi.uid = d.employer_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 = d.industry_category_a
- LEFT JOIN field_glossory fgg on fgg.id = d.industry_category_b
- LEFT JOIN demand_interest interest on interest.demand_id = d.id and interest.uid = #{uid,jdbcType=VARCHAR}
- WHERE
- d.id = #{id,jdbcType=VARCHAR}
- </select>
-
- <select id="findByIndustryCategoryA" resultType="com.goafanti.portal.bo.DemandPortalSimilarListBo">
- select
- d.id,
- d.name,
- fg.name as industryCategoryAS,
- fgg.name as industryCategoryBS,
- d.problem_des as problemDes,
- d.budget_cost as budgetCost,
- u.lvl as level
- from
- demand d
- left join user u on u.id = d.employer_id
- LEFT JOIN field_glossory fg on fg.id = d.industry_category_a
- LEFT JOIN field_glossory fgg on fgg.id = d.industry_category_b
- where
- d.audit_status = 3
- and d.release_status = 1
- and d.deleted_sign = 0
- and d.industry_category_a = #{industryCategoryA,jdbcType=INTEGER}
- and d.id <![CDATA[ <> ]]> #{id,jdbcType=VARCHAR}
- order by d.serial_number desc
- limit 5
- </select>
-
- <update id="updateEmployerId" parameterType="java.lang.String" >
- update demand set employer_id = null
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <select id="findBoutiqueListByPage" parameterType="java.lang.Integer" resultType="com.goafanti.portal.bo.BoutiqueListBo">
- select
- a.id,a.name,
- b.name as industryCategory,
- a.picture_url as pictureUrl,
- a.problem_des as sketch,
- a.data_category as ownerType,
- a.employer_name as personName
- from
- demand a
- left join
- field_glossory b
- on
- a.industry_category_a = b.id
- where
- a.boutique = 1 and a.audit_status =3 and a.industry_category_a = #{industryCategoryA,jdbcType=INTEGER}
- order by
- a.create_time desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="findBoutiqueCount" parameterType="java.lang.Integer" resultType="java.lang.Integer">
- select
- count(1)
- from
- demand a
- left
- join field_glossory b
- on
- a.industry_category_a = b.id
- where
- a.boutique = 1 and a.audit_status =3 and a.industry_category_a = #{industryCategoryA,jdbcType=INTEGER}
- </select>
-
- <!-- 查询需求列表 -->
- <select id="selectDemandList" parameterType="java.lang.Integer"
- resultType="com.goafanti.demand.bo.DemandListBo">
- SELECT
- d.id,
- d.name,
- d.keyword,
- d.data_category as dataCategory,
- d.fixed_budget as fixedbudget,
- d.demand_type as demandType,
- d.picture_url as pictureUrl,
- d.industry_category_a AS industryCategoryA,
- fg.name AS
- industryCategoryAS,
- fgg.name AS industryCategorBS,
- d.budget_cost AS
- budgetCost,
- d.problem_des AS problemDes,
- dg.name AS
- province,
- dgg.name AS
- city,
- interest.id as interestId,
- d.employer_name as
- employerName,
- u.lvl as
- level
- FROM
- demand d
- LEFT JOIN `user` u on u.id = d.employer_id
- LEFT JOIN
- user_identity ui on ui.uid = d.employer_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 = d.industry_category_a
- LEFT JOIN field_glossory fgg on fgg.id = d.industry_category_b
- LEFT
- JOIN demand_interest interest on interest.demand_id = d.id and
- interest.uid = #{uid,jdbcType=VARCHAR}
- WHERE
- <if test="_parameter!= null">
- d.boutique = #{_parameter,jdbcType=INTEGER}
- </if>
- limit 0,30
- </select>
- </mapper>
|