|
|
@@ -60,7 +60,7 @@
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<select id="selectAppByPrimaryKey" resultType="com.goafanti.demand.bo.DemandListBo" parameterType="java.lang.String" >
|
|
|
- select
|
|
|
+ select
|
|
|
d.id, d.serial_number AS serialNumber, d.data_category AS dataCategory, d.name, d.keyword, d.info_sources AS infoSources, d.industry_category_a AS industryCategoryA,
|
|
|
d.industry_category_b AS industryCategoryB, d.industry_category_c AS industryCategoryC, d.demand_type AS demandType, 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.fixed_budget AS fixedBudget, d.fixed_cycle AS fixedCycle, d.people_number AS peopleNumber,
|
|
|
@@ -71,12 +71,14 @@
|
|
|
,ifnull(t.x,0) as orderIntentionCount,ifnull(t2.x,0) as orderCount,j.easemob_name as easemobName
|
|
|
from demand d
|
|
|
left join jpush_easemob_account j on d.employer_id=j.uid
|
|
|
- left join (select count(0) as x,commodity_id from t_order
|
|
|
+ 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 commodity_id ) t on d.id=t.commodity_id
|
|
|
- left join (select count(0) as x,commodity_id from t_order
|
|
|
- where order_status != 4 and order_status != 0
|
|
|
- group by commodity_id ) t2 on d.id=t2.commodity_id
|
|
|
+ group by tl.commodity_id) t on d.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 d.id=t2.commodity_id
|
|
|
where d.id = #{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|