package com.education.api.controller.student;

import com.education.business.service.education.StepModelService;
import com.education.common.base.BaseController;
import com.education.common.model.PageInfo;
import com.education.common.utils.Result;
import com.education.model.entity.StepModel;
import com.education.model.request.PageParam;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;

/**
 * 模版管理
 */
@RequestMapping("/student/stepModel")
@RestController
public class XStepModelController extends BaseController {

    @Resource
    private StepModelService stepModelService;

    /**
     * 模版分页列表
     * @param  subjectName
     * @return
     */
    @GetMapping("selectBySubject")
    //@RequiresPermissions("system:stepModel:list")
    public Result selectBySubject(String subjectName) {
        PageParam pageParam = new PageParam(0,100);
        StepModel model = new StepModel();
        model.setSubjectName(subjectName);
        PageInfo<StepModel> list = stepModelService.selectPageList(pageParam,  model);
        return Result.success( list);
    }

}
