@@ -152,6 +152,9 @@ public class TenantGroupAlbumServiceImpl extends ServiceImpl<TenantGroupAlbumMap
List<Long> studentTenantAlbumNum = userOrderDao.getStudentTenantAlbumNum(userId, tenantGroupAlbumIds);
for (TenantGroupAlbumWrapper.BuyTenantAlbum item : buyAlbumInfo) {
item.setBuyedTimes((int) studentTenantAlbumNum.stream().filter(x -> x.equals(item.getTenantGroupAlbumId())).count());
+ if (item.getBuyedTimes() > item.getBuyTimes()) {
+ item.setBuyedTimes(item.getBuyTimes());
+ }
}
@@ -385,7 +385,7 @@
</select>
<select id="getStudentTenantAlbumNum" resultType="java.lang.Long">
- select d.biz_id_
+ select d.tenant_group_album_id_
from user_order t
left join user_order_detail d on t.order_no_ = d.order_no_
where t.status_ in ('WAIT_PAY','PAYING','PAID') and t.order_type_ = 'TENANT_ALBUM' and d.good_type_ = 'TENANT_ALBUM'