package com.yonge.cooleshow.student.controller;

import com.yonge.cooleshow.biz.dal.service.ExposureRecordService;
import com.yonge.cooleshow.biz.dal.wrapper.ExposureRecordWrapper;
import com.yonge.cooleshow.common.controller.BaseController;
import com.yonge.cooleshow.common.entity.HttpResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

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

@Api(tags = "曝光记录")
@RestController
@RequestMapping("${app-config.url.student:}/exposure")
public class ExposureRecordController extends BaseController {

    @Resource
    private ExposureRecordService exposureRecordService;


    @ApiOperation(value = "记录曝光信息")
    @PostMapping("/record")
    public HttpResponseResult record(@RequestBody List<ExposureRecordWrapper.SaveExposureRecordDto> exposureReportDto) {
        exposureRecordService.record(exposureReportDto);
        return succeed();
    }

}
