Просмотр исходного кода

成果、需求详情显示BUG修复

anderx лет назад: 8
Родитель
Сommit
b4d19aec0a

+ 8 - 6
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -1228,7 +1228,7 @@
 	</select>
   
   <select id="selectUserOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementUserOwnerDetailBo">
-     select  
+     	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, 
@@ -1249,12 +1249,14 @@
 			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,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 a.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 a.id=t2.commodity_id 
+				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}

+ 8 - 6
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -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" >