package com.ym.mec.web.controller;

import com.ym.mec.auth.api.client.SysUserFeignService;
import com.ym.mec.auth.api.entity.SysUser;
import com.ym.mec.biz.dal.dao.EmployeeDao;
import com.ym.mec.biz.dal.dao.TeacherDao;
import com.ym.mec.biz.dal.entity.Employee;
import com.ym.mec.biz.dal.entity.ResourceRespository;
import com.ym.mec.biz.dal.entity.School;
import com.ym.mec.biz.dal.entity.Teacher;
import com.ym.mec.biz.dal.page.SchoolQueryInfo;
import com.ym.mec.biz.service.ResourceRespositoryService;
import com.ym.mec.biz.service.SchoolService;
import com.ym.mec.common.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.Date;
import java.util.List;

@RequestMapping("resourceRepository")
@Api(tags = "资源服务")
@RestController
public class ResourceRepositoryController extends BaseController {

    @Autowired
    private ResourceRespositoryService resourceRepositoryService;

    @ApiOperation(value = "新增")
    @PostMapping("/add")
    @PreAuthorize("@pcs.hasPermissions('resourceRepository/add')")
    public Object add(ResourceRespository resourceRepository){
        resourceRepositoryService.insert(resourceRepository);
        return succeed();
    }
}
