package shop.alien.second.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiSort;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import shop.alien.entity.result.R;
import shop.alien.entity.second.vo.SecondReportingVo;
import shop.alien.second.service.SecondGoodsReportingService;

@Slf4j
@Api(tags = {"二手平台-举报详情"})
@ApiSort(9)
@CrossOrigin
@RestController
@RequestMapping("/second/reporting")
@RequiredArgsConstructor
public class SecondGoodsReportingController {

    private final SecondGoodsReportingService service;

    @ApiOperation("举报详情")
    @PostMapping("/queryReportingDetail")
    public R<SecondReportingVo> queryReportingDetail(@RequestParam(value = "id", required = false) Integer id) {
        log.info("SecondGoodsReportingController.reportingDetail?id={}", id);
        return R.data(service.queryReportingDetail(id), "查询成功");
    }

}
