package co.yixiang.yshop.module.shop.controller.app.canvas;

import co.yixiang.yshop.framework.common.pojo.CommonResult;
import co.yixiang.yshop.module.shop.controller.admin.canvasdetail.vo.CanvasDetailRespVO;
import co.yixiang.yshop.module.shop.controller.admin.shop.vo.ShopRespVO;
import co.yixiang.yshop.module.shop.controller.app.canvas.vo.CanvasEnableReqVO;
import co.yixiang.yshop.module.shop.controller.app.vo.ShopDTO;
import co.yixiang.yshop.module.shop.service.canvasdetail.CanvasDetailService;
import co.yixiang.yshop.module.shop.service.shop.ShopService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

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

/**
 * @author moxiangrong
 * @apiNote
 **/
@Tag(name = "用户 APP - 画布")
@RestController
@RequestMapping("/shop/canvas")
@Validated
public class AppCanvasController {
    @Resource
    private CanvasDetailService canvasDetailService;

    /**
     * 获取启用画布信息
     */
    @GetMapping("canvas-json")
    @Operation(summary = "获取启用画布信息")
    public CommonResult<CanvasDetailRespVO> getCanvasJson(@Valid CanvasEnableReqVO reqVO) {
        return CommonResult.success(canvasDetailService.getCanvasJson(reqVO));
    }

}
