package com.cool.store.controller.webc;

import com.cool.store.request.privatesphere.PrivateSphereBindRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.privatesphere.PrivateSphereQrService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * Mini门店私域二维码
 * </p>
 *
 * @author wangff
 * @since 2026/4/2
 */
@RestController
@Api(tags = "Mini门店私域二维码")
@RequestMapping({"/mini/sp"})
@RequiredArgsConstructor
public class MiniPrivateSphereQrController {
    private final PrivateSphereQrService privateSphereQrService;

    @ApiOperation("门店绑定设备sn")
    @PostMapping("/bind")
    public ResponseResult<Boolean> bindStoreSn(@RequestBody @Validated PrivateSphereBindRequest request) {
        return ResponseResult.success(privateSphereQrService.bindStoreSn(request));
    }
}
