package com.wzj.soopin.order.controller;

import com.wzj.soopin.order.domain.dto.CodeVerificationDto;
import com.wzj.soopin.order.service.VerificationCodeService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.dromara.common.core.domain.R;
import org.springframework.web.bind.annotation.*;

/**
 * 核销码相关接口
 * @author fxh
 */
@Tag(name = "核销码接口")
@RestController
@RequestMapping("/oms/verification")
@RequiredArgsConstructor
@Slf4j
public class VerificationCodeController {


    private final VerificationCodeService verificationCodeService;


    /**
     * 生成核销码
     */
    @GetMapping("/generate/{orderId}")
    @Tag(name = "生成核销码")
    public R generateCode(@PathVariable Long orderId) {
        return verificationCodeService.generateVerificationCode(orderId);
    }



}
