package com.liquidnet.service.goblin.controller.Inner;

import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.service.impl.inner.GoblinQueBizArtworkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotBlank;

@Slf4j
@Api(tags = "@API:QUE")
@RestController
@Validated
@RequestMapping("que/artwork")
public class GoblinQueBizArtworkController {
    @Autowired
    private GoblinQueBizArtworkService goblinQueBizArtworkService;

    @PostMapping("upl")
    @ApiOperation("藏品上传声明")
    @ApiImplicitParams({
            @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "skuId", value = "藏品ID", example = "1"),
    })
    public ResponseDto<String> orderDetails(@NotBlank(message = "藏品ID不能为空") @RequestParam String skuId) {
        return goblinQueBizArtworkService.bizArtworkUplProcessing(skuId);
    }
}
