package com.yida.data.user.controller.in;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.user.EduFaceGroupStrategy;
import com.yida.data.user.dto.StrategySaveDTO;
import com.yida.data.user.service.EduFaceGroupStrategyService;
import com.yida.data.user.vo.StrategyInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * 人脸组-策略Controller(不鉴权)
 *
 * @author ZYJ
 * @date 2022-12-12 11:04:39
 */
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("in/eduFaceGroupStrategy")
@Api(tags = "人脸组-策略api(不鉴权)")
public class InEduFaceGroupStrategyController {

    private final EduFaceGroupStrategyService eduFaceGroupStrategyService;

    @GetMapping(value = "getStrategyInfo")
    @ApiOperation(value = "获取人脸组策略信息")
    public ResultBean<EduFaceGroupStrategy> getStrategyInfo(@RequestParam Long faceGroupId) {
        return ResultBean.buildSuccess(eduFaceGroupStrategyService.getOne(Wrappers.lambdaQuery(new EduFaceGroupStrategy())
                .eq(EduFaceGroupStrategy::getFaceGroupId, faceGroupId)));
    }
}
