package com.sysu.admin.controller.crop.class_item;

import com.xiesx.fastboot.base.result.BaseResult;
import com.xiesx.fastboot.base.result.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RequestMapping("/crop_item")
@RestController
public class CropItemController {
    @Autowired
    CropClassItemRepository cropClassItemRepository;

    @RequestMapping("/list")
    public BaseResult list(Integer classId){
        return R.succ(cropClassItemRepository.findAllByClassId(classId));
    }
}
