+"from res_video_Library b inner join res_video_library_diy_type c on b.id = c.vlid"
+"from res_video_library b inner join res_video_library_diy_type c on b.id = c.vlid"
+" where b.status = 1 and b.salesType = 1 "
+"<if test='form.ids != null and form.ids.size > 0' >"
+"and b.id not in "
...
...
@@ -248,8 +248,9 @@ public interface FgCourseLibraryMapper extends BaseMapper<CourseLibrary> {
//查询课程推荐资源
@Select("<script>"
+"select li.id , li.salesType,li.name resName,li.resourceType resourceType, li.img resImg,ifnull(li.price,0) price,li.realPrice,li.clickNum,li.priceOption,li.uploadTime,li.browseNum,(select count(*) from res_courseorvideo_study where resourceId =li.id and resourceType =li.resourceType) studyNum,"
+" (SELECT COUNT(*) FROM `szsy-order`.ord_orderinfo a LEFT JOIN `szsy-order`.ord_order b ON a.orderId = b.id WHERE b.status = 6 AND a.goodsid = li.id) salesTolume from "
+"(select count(*) from res_courseorvideo_study where resourceId =li.id and resourceType =li.resourceType) studyNum,"
+" (SELECT COUNT(*) FROM `szsyxy-order`.ord_orderinfo a LEFT JOIN `szsyxy-order`.ord_order b ON a.orderId = b.id WHERE b.status = 6 AND a.goodsid = li.id) salesTolume from "
+"res_video_library li "
+" LEFT JOIN res_video_library_diy_type bdt ON li.id = bdt.vlid"
+" where 1 = 1 and li.status = 1 and salesType =1"
...
...
@@ -258,8 +259,9 @@ public interface FgCourseLibraryMapper extends BaseMapper<CourseLibrary> {
+" like(name,keywords)"
+" eq(li.salesType,salesType)"
+" union "
+" select li.id , null salesType,li.name resName,li.resourceType , li.img resImg,ifnull(li.price,0) price,li.realPrice,li.clickNum,li.priceOption,li.uploadTime,li.browseNum,(select count(*) from res_courseorvideo_study where resourceId =li.id and resourceType =li.resourceType) studyNum,"
+" (SELECT COUNT(*) FROM `szsy-order`.ord_orderinfo a LEFT JOIN `szsy-order`.ord_order b ON a.orderId = b.id WHERE b.status = 6 AND a.goodsid = li.id) salesTolume from "
+"(select count(*) from res_courseorvideo_study where resourceId =li.id and resourceType =li.resourceType) studyNum,"
+" (SELECT COUNT(*) FROM `szsyxy-order`.ord_orderinfo a LEFT JOIN `szsyxy-order`.ord_order b ON a.orderId = b.id WHERE b.status = 6 AND a.goodsid = li.id) salesTolume from "
+" res_course_library li "
+" LEFT JOIN res_course_library_diy_type bdt ON li.id = bdt.courseLibraryId"
@@ -29,8 +29,11 @@ public interface FgEbookMapper extends BaseMapper<Ebook>{
* @date 2018年12月20日 下午2:33:32
*/
@Select("<script>"
+"select DISTINCT bb.id, bb.name, bb.authorId, bb.author, bb.translatorId, bb.translator,(SELECT COUNT(*) FROM `szsyxy-order`.ord_orderinfo a LEFT JOIN `szsyxy-order`.ord_order b ON a.orderId = b.id WHERE b.status = 6 AND a.goodsid = bb.id) salesTolume, "
+" (SELECT COUNT(*) FROM `szsyxy-order`.ord_orderinfo a LEFT JOIN `szsyxy-order`.ord_order b ON a.orderId = b.id WHERE b.status = 6 AND a.goodsid = bb.id) salesTolume from "