|
@@ -27,6 +27,20 @@ public interface StoreOfficialAlbumMapper extends BaseMapper<StoreOfficialAlbum>
|
|
|
"order by b2.img_sort LIMIT 1) where a.delete_flag = '0' and a.store_id = #{storeId}")
|
|
"order by b2.img_sort LIMIT 1) where a.delete_flag = '0' and a.store_id = #{storeId}")
|
|
|
List<StoreOfficialAlbumVo> getStoreOfficialAlbumList(@Param("storeId") Integer storeId);
|
|
List<StoreOfficialAlbumVo> getStoreOfficialAlbumList(@Param("storeId") Integer storeId);
|
|
|
|
|
|
|
|
- @Select("select si.business_id as id ,count(*) as img_count from store_img si where si.delete_flag = '0' and si.store_id = #{storeId} group by si.business_id ")
|
|
|
|
|
|
|
+ @Select("select " +
|
|
|
|
|
+ " soa.id," +
|
|
|
|
|
+ " (" +
|
|
|
|
|
+ " SELECT COUNT(*) " +
|
|
|
|
|
+ " FROM store_img b2 " +
|
|
|
|
|
+ " WHERE b2.business_id = soa.id " +
|
|
|
|
|
+ " AND b2.img_type IN ('2', '4') " +
|
|
|
|
|
+ " AND b2.delete_flag = 0 " +
|
|
|
|
|
+ " AND b2.store_id = #{storeId} " +
|
|
|
|
|
+ " ) as imgCount " +
|
|
|
|
|
+ " from" +
|
|
|
|
|
+ " store_official_album soa\n" +
|
|
|
|
|
+ " where " +
|
|
|
|
|
+ " soa.store_id = #{storeId} " +
|
|
|
|
|
+ " and soa.delete_flag = 0")
|
|
|
List<StoreOfficialAlbum> getStoreOfficialAlbumImgCount(@Param("storeId") Integer storeId);
|
|
List<StoreOfficialAlbum> getStoreOfficialAlbumImgCount(@Param("storeId") Integer storeId);
|
|
|
}
|
|
}
|