| 123456789101112131415161718192021222324252627282930 |
- package com.seecoder.dataanalysis.controller;
- import com.seecoder.dataanalysis.analysis.RecommendService;
- import com.seecoder.dataanalysis.vo.ResponseVO;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.RestController;
- /**
- * @author Peng Yiyan
- * @since 2022/04/19
- */
- @RestController
- @RequestMapping("/recommend")
- public class RecommendController {
- private final RecommendService recommendService;
- @Autowired
- public RecommendController(RecommendService recommendService){
- this.recommendService = recommendService;
- }
- @GetMapping("/getRecommendById")
- public ResponseVO getRecommendById(@RequestParam(value = "user_id") int user_id){
- return ResponseVO.buildSuccess(recommendService.getRecommendById(user_id));
- }
- }
|