package com.cool.store.controller.webc;

import com.cool.store.response.ResponseResult;
import com.cool.store.service.AssessmentTemplateService;
import com.cool.store.vo.AssessmentTemplateVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
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 java.util.List;

/**
 * @Author suzhuhong
 * @Date 2024/4/28 16:29
 * @Version 1.0
 */
@RestController
@RequestMapping("/mini/template")
@Api(tags = "小程序检查项模板")
@Slf4j
public class MiniAssessmentTemplateController {

    @Resource
    AssessmentTemplateService assessmentTemplateService;

    @ApiOperation("检查项模板列表type 0 1 2 3")
    @GetMapping("/listByType")
    public ResponseResult<List<AssessmentTemplateVO>> intendPendingList(@RequestParam(value = "type",required = true)Integer type) {
        return ResponseResult.success(assessmentTemplateService.listByType(type));
    }

}
