+"(SELECT COUNT(*) FROM `szsy-order`.ord_orderinfo c LEFT JOIN `szsy-order`.ord_order b ON c.orderId = b.id WHERE b.status = 6 AND c.goodsid = a.id) tradeNum, "
+" (SELECT COUNT(*) FROM `szsy-resource`.res_record WHERE goodsId = a.id) readersNum, "
+"(SELECT COUNT(*) FROM `szsyxy-order`.ord_orderinfo c LEFT JOIN `szsyxy-order`.ord_order b ON c.orderId = b.id WHERE b.status = 6 AND c.goodsid = a.id) tradeNum, "
+" (SELECT COUNT(*) FROM `szsyxy-resource`.res_record WHERE goodsId = a.id) readersNum, "
//+ "IFNULL((SELECT sum(clickNum) FROM `szsy-resource`.res_video_library WHERE courseId = a.id),0) readersNum, "
+"IFNULL((SELECT count(*) FROM `szsy-resource`.res_video_library WHERE courseId = a.id),0) relatedNum "
+"from `szsy-resource`.res_course_library a left join `szsy-resource`.res_course_library_Diy_Type ad "
+"IFNULL((SELECT count(*) FROM `szsyxy-resource`.res_video_library WHERE courseId = a.id),0) relatedNum "
+"from `szsxy-resource`.res_course_library a left join `szsyxy-resource`.res_course_library_diy_type ad "
+"(SELECT COUNT(*) FROM `szsy-order`.ord_orderinfo c LEFT JOIN `szsy-order`.ord_order b ON c.orderId = b.id WHERE b.status = 6 AND c.goodsid = a.id) tradeNum, "
+" (SELECT COUNT(*) FROM `szsy-resource`.res_record WHERE goodsId = a.id) readersNum ,"
+"(SELECT COUNT(*) FROM `szsyxy-order`.ord_orderinfo c LEFT JOIN `szsyxy-order`.ord_order b ON c.orderId = b.id WHERE b.status = 6 AND c.goodsid = a.id) tradeNum, "
+" (SELECT COUNT(*) FROM `szsyxy-resource`.res_record WHERE goodsId = a.id) readersNum ,"
+" 0 relatedNum "
+"from `szsy-resource`.res_Video_Library a left join `szsy-resource`.res_Video_Library_Diy_Type ad "
+"from `szsyxy-resource`.res_video_library a left join `szsyxy-resource`.res_video_library_diy_type ad "
+"on a.id = ad.vlId "
+"where 1=1 "
+"<if test='"+NOTBLANK+"(form.diyTypeName)'>"
...
...
@@ -107,7 +107,7 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {