package cn.iocoder.yudao.module.jx.controller.app;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
import cn.iocoder.yudao.module.jx.core.controller.BaseController;
import cn.iocoder.yudao.module.jx.domain.DriveSchoolGuide;
import cn.iocoder.yudao.module.jx.service.DriveSchoolGuideService;
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;
import javax.annotation.security.PermitAll;
import java.util.List;

@Tag(name = "小程序 - 业务办理指南")
@RestController
@RequestMapping("/jx/driveSchool/smallProgram/guide")
@Validated
public class AppDriveSchoolGuideController  extends BaseController  {

    @Resource
    private DriveSchoolGuideService driveSchoolGuideService;

    @GetMapping("/list")
    @Operation(summary = "根据字段值查询业务办理指南")
    @PermitAll
    @TenantIgnore
    public CommonResult<List<DriveSchoolGuide>> listByField(
            @RequestParam(required = false) String tenantId
    ) {
        return success(driveSchoolGuideService.listByTenantId(tenantId));
    }
}
