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

import co.yixiang.yshop.framework.common.pojo.CommonResult;
import co.yixiang.yshop.module.shop.controller.app.popup.vo.PopupInfoRespVO;
import co.yixiang.yshop.module.shop.service.popup.PopupService;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author moxiangrong
 * @apiNote
 **/
@Tag(name = "用户 APP - 弹窗")
@RestController
@RequestMapping("/shop/popup")
@Validated
public class AppPopupController {
    @Resource
    private PopupService popupService;

    /**
     * 获取弹窗信息
     */
    @GetMapping("get")
    @Operation(summary = "获取弹窗信息")
    public CommonResult<PopupInfoRespVO> getPopupInfo() {
        return CommonResult.success(popupService.getPopupInfo());
    }

}
