package com.liquidnet.service.sweet.controller;


import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.dto.vo.IntegralActivityVo;
import com.liquidnet.service.sweet.service.ISweetIntegralActivityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 积分活动表 前端控制器
 * </p>
 *
 * @author jiangxiulong
 * @since 2021-10-25
 */
@Api(tags = "活动-积分抽奖")
@RestController
@RequestMapping("/integralActivity")
public class SweetIntegralActivityController {
    @Autowired
    private ISweetIntegralActivityService activityService;

    @GetMapping("list")
    @ApiOperation("积分抽奖活动列表")
    public ResponseDto<List<IntegralActivityVo>> getList() {
        return activityService.getList();
    }

    @GetMapping("detail/{integralActivityId}")
    @ApiOperation("积分抽奖活动详情")
    public ResponseDto<IntegralActivityVo> detail(@PathVariable("integralActivityId") String integralActivityId) {
        return activityService.detail(integralActivityId);
    }
}
