|
|
@@ -698,7 +698,7 @@
|
|
|
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, a.name as principalId, d.industry_category_a as industryCategoryA,
|
|
|
+ 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,
|
|
|
@@ -706,7 +706,6 @@
|
|
|
info.postal_address as address, u.email as mailbox, u.mobile as mobile
|
|
|
from demand d
|
|
|
left join user_identity ui on ui.uid = d.employer_id
|
|
|
- left join admin a on a.id = d.principal_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}
|
|
|
@@ -719,15 +718,14 @@
|
|
|
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, a.name as principalId, d.industry_category_a as industryCategoryA,
|
|
|
+ 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, oi.contacts
|
|
|
+ oi.postal_address as address, u.email as mailbox, d.contacts
|
|
|
from demand d
|
|
|
left join organization_identity oi on oi.uid = d.employer_id
|
|
|
- left join admin a on a.id = d.principal_id
|
|
|
left join user u on u.id = d.employer_id
|
|
|
where d.data_category = 1 and d.id = #{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
@@ -745,4 +743,82 @@
|
|
|
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
|
|
|
+ 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="name != null">
|
|
|
+ and d.name = #{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_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="vEnd != null">
|
|
|
+ and d.validity_veriod <![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
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findDemandCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
+ select count(1)
|
|
|
+ from demand d
|
|
|
+ where d.deleted_sign = 0 and d.data_category = 1
|
|
|
+ <if test="serialNumber != null">
|
|
|
+ and d.serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ and d.name = #{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_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="vEnd != null">
|
|
|
+ and d.validity_veriod <![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>
|
|
|
+
|
|
|
</mapper>
|