package com.ym.mec.web.controller;

import com.ym.mec.biz.service.OrganizationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

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.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

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.entity.Employee;
import com.ym.mec.biz.dal.page.StudentApplyrefundsQueryInfo;
import com.ym.mec.biz.service.StudentApplyRefundsService;
import com.ym.mec.common.controller.BaseController;

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

@RequestMapping("studentRefunds")
@Api(tags = "退费服务")
@RestController
public class StudentApplyRefundsController extends BaseController {
	
	@Autowired
	private StudentApplyRefundsService studentApplyRefundsService;

	@Autowired
	private SysUserFeignService sysUserFeignService;

	@Autowired
	private OrganizationService organizationService;

	@ApiOperation(value = "查询退费列表")
    @GetMapping("/queryPage")
    @PreAuthorize("@pcs.hasPermissions('studentRefunds/queryPage')")
    public Object queryPage(StudentApplyrefundsQueryInfo queryInfo){
		queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
		return succeed(studentApplyRefundsService.queryPage(queryInfo));
    }
}
