|
|
@@ -61,14 +61,15 @@
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<select id="selectAppByPrimaryKey" resultType="com.goafanti.demand.bo.AppDemandBo" parameterType="java.lang.String" >
|
|
|
- select
|
|
|
+ select
|
|
|
d.id, d.serial_number AS serialNumber, d.data_category AS dataCategory, d.name, d.keyword,d.budget_cost as budgetCost,
|
|
|
- d.info_sources AS infoSources, d.industry_category_a AS fieldA,d.industry_category_b AS fieldB,
|
|
|
- f.name as field1,f2.name as field2,d.is_hot as isHot,d.release_date as releaseDate,d.demand_type as demandType,
|
|
|
- d.name,d.problem_des as problemDes,d.picture_url as pictureUrl,d.release_status as releaseStatus,
|
|
|
- d.audit_status as auditStatus,d.fixed_budget as fixedBudget,d.crowd_cost as crowdCost,
|
|
|
- ifnull(i.y,0) as interestCount,if(isnull(a.demand_id),0,1) as interest,ifnull(t.count,0) as orderCount,d.picture_url_min as pictureUrlMin
|
|
|
+ d.info_sources AS infoSources, d.industry_category_a AS fieldA,d.industry_category_b AS fieldB,f.name as field1,
|
|
|
+ f2.name as field2,d.is_hot as isHot,d.release_date as releaseDate,d.demand_type as demandType,d.name,
|
|
|
+ d.problem_des as problemDes,d.picture_url as pictureUrl,d.release_status as releaseStatus,d.audit_status as auditStatus,
|
|
|
+ d.fixed_budget as fixedBudget,d.crowd_cost as crowdCost,ifnull(i.y,0) as interestCount,if(isnull(a.demand_id),0,1) as interest,ifnull(t.count,0) as orderCount,
|
|
|
+ d.picture_url_min as pictureUrlMin,us.nickname as ownerName,us.mobile as ownerMobile
|
|
|
from demand d
|
|
|
+ left join `user` us on d.employer_id=us.id
|
|
|
left join (select b.commodity_id as id,count(*) as count from jt_order a left join jt_order_detail b on a.order_no=b.order_no
|
|
|
GROUP by b.commodity_id) t on d.id=t.id
|
|
|
left join (select count(0) as y,demand_id from demand_interest
|