package com.cool.store.controller.webc;

import com.cool.store.dto.InvoicingDTO;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.InvoicingService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
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 suzhuhong
 * @Date 2024/12/31 14:13
 * @Version 1.0
 */
@RestController
@RequestMapping("/mini/invoicing")
@Api("小程序发票")
public class MiniInvoicingController {

    @Resource
    InvoicingService invoicingService;



    @ApiOperation("小程序查询发票详情")
    @GetMapping("/getInvoicingByShopId")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shopId", value = "门店shopId", required = true)

    })
    public ResponseResult<InvoicingDTO> getInvoicingByShopId(@RequestParam("shopId")Long shopId) {
        return ResponseResult.success(invoicingService.getInvoicingByShopId(shopId));
    }

}
