HotRecommendController.java 1.44 KB
Newer Older
1 2 3
package com.tanpu.community.controller;

import com.tanpu.common.api.CommonResp;
胡定国's avatar
胡定国 committed
4
import com.tanpu.community.api.beans.qo.FollowQo;
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
import com.tanpu.community.api.beans.qo.feign.fatools.UserInfoCorpReq;
import com.tanpu.community.api.beans.req.page.Page;
import com.tanpu.community.api.beans.resp.HotRecommendResp;
import com.tanpu.community.service.HotRecommendService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@Slf4j
@Api(tags = "首页热门推荐")
public class HotRecommendController {

    @Resource
    private HotRecommendService hotRecommendService;

    @GetMapping(value = "/hotRecommend")
29
    @ApiOperation("首页热门推荐列表v2.2.10")
30 31 32 33
    public CommonResp<List<HotRecommendResp>> hotRecommend() {
        return CommonResp.success(hotRecommendService.hotRecommendList());
    }

34 35
    @PostMapping(value = "/hotRecommend/list")
    @ApiOperation("首页热门推荐详情列表v2.2.10")
胡定国's avatar
胡定国 committed
36
    public CommonResp<Page<FollowQo>> hotRecommendList(@RequestBody UserInfoCorpReq req) {
37 38 39 40
        return CommonResp.success(hotRecommendService.hotRecommendDetailList(req));
    }

}