Open psy-choi opened 1 year ago
CafeCount - > count로 field 명 변경
GroupOperation groupOperation = Aggregation.group("cafeId").count().as("count");
SortOperation sortByCountDesc = Aggregation.sort(Sort.Direction.DESC, "count");
SkipOperation skipOperation = Aggregation.skip(pageable.getOffset());
LimitOperation limitOperation = Aggregation.limit(pageable.getPageSize());
Aggregation aggregation = Aggregation.newAggregation(groupOperation, sortByCountDesc, skipOperation, limitOperation);
AggregationResults<CafeCount> results = mongoTemplate.aggregate(aggregation, "matching", CafeCount.class);
List<String> cafeList = new ArrayList<>();
@Autowired
private MatchingService matchingService;
의존성 주입 이후 해결
✏️ Description
postAPI 테스트 진행
🛠 Features
[x] GET /api/home/reserve
[x] GET /api/home/best
[x] GET /api/matching
[x] GET /api/cafe/best
[x] GET/api/cafe/{cafeId}
[x] GET /api/cafe/{cafeId}/aftersearch
[x] GET /api/notification
[x] GET /api/profiles
[x] PUT /api/profiles
[x] PUT /api/profiles/alarm
[x] GET /api/reserved
[x] POST /api/reserved
[x] DEL /api/reserved
[x] POST /api/cafe