Skip to content

Commit

Permalink
Merge pull request #104 from CSID-DGU/newalgorithm
Browse files Browse the repository at this point in the history
fix : 복구
  • Loading branch information
dailyrunner committed Dec 18, 2023
2 parents c01fbf6 + b600d10 commit 9a615ab
Show file tree
Hide file tree
Showing 5 changed files with 633 additions and 594 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.example.demo.controller.userRecommendCalc;

import com.example.demo.response.CommonResponse;
import com.example.demo.service.recommendCalc.Recommend;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
Expand All @@ -9,14 +10,35 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;

@AllArgsConstructor
@RestController
public class UserRecommendController {

@GetMapping("/user/project/manage/recommend")
public void recommendUser(@RequestBody Long project_id, String stackName) {
public List<Long> recommendUser(@RequestBody Long project_id, String stackName) {
int proj_id=(int)project_id.longValue();

List<Integer> result= Recommend.projectBaseSearch(proj_id,stackName);

List<Long> resultAsLong = result.stream()
.map(Long::valueOf)
.collect(Collectors.toList());

return resultAsLong;
}
}

public List<Long> recommendTeam(@RequestBody Long user_id, String stackName) {
int userId=(int)user_id.longValue();

List<Integer> result= Recommend.userBaseSearch(userId,stackName);

List<Long> resultAsLong = result.stream()
.map(Long::valueOf)
.collect(Collectors.toList());

return resultAsLong;
}

}
Loading

0 comments on commit 9a615ab

Please sign in to comment.