mirror of
https://github.com/iflytek/skillhub.git
synced 2026-08-28 11:25:00 +00:00
fix(subscription): expose subscription count in skill detail API
Include subscriptionCount in SkillDetailDTO and SkillDetailResponse so the frontend SubscribeButton receives the updated count after subscribe/unsubscribe mutations.
This commit is contained in:
parent
62f3c3a0b4
commit
4882abc043
4 changed files with 5 additions and 0 deletions
|
|
@ -86,6 +86,7 @@ public class SkillController extends BaseApiController {
|
|||
detail.status(),
|
||||
detail.downloadCount(),
|
||||
detail.starCount(),
|
||||
detail.subscriptionCount(),
|
||||
detail.ratingAvg(),
|
||||
detail.ratingCount(),
|
||||
detail.hidden(),
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ public record SkillDetailResponse(
|
|||
String status,
|
||||
Long downloadCount,
|
||||
Integer starCount,
|
||||
Integer subscriptionCount,
|
||||
BigDecimal ratingAvg,
|
||||
Integer ratingCount,
|
||||
boolean hidden,
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ public class ReviewSkillDetailAppService {
|
|||
snapshot.skill().getStatus().name(),
|
||||
snapshot.skill().getDownloadCount(),
|
||||
snapshot.skill().getStarCount(),
|
||||
snapshot.skill().getSubscriptionCount(),
|
||||
snapshot.skill().getRatingAvg(),
|
||||
snapshot.skill().getRatingCount(),
|
||||
snapshot.skill().isHidden(),
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ public class SkillQueryService {
|
|||
String status,
|
||||
Long downloadCount,
|
||||
Integer starCount,
|
||||
Integer subscriptionCount,
|
||||
java.math.BigDecimal ratingAvg,
|
||||
Integer ratingCount,
|
||||
boolean hidden,
|
||||
|
|
@ -184,6 +185,7 @@ public class SkillQueryService {
|
|||
skill.getStatus().name(),
|
||||
skill.getDownloadCount(),
|
||||
skill.getStarCount(),
|
||||
skill.getSubscriptionCount(),
|
||||
skill.getRatingAvg(),
|
||||
skill.getRatingCount(),
|
||||
skill.isHidden(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue