package com.ym.mec.web.controller;

import com.ym.mec.biz.dal.entity.TeacherSalaryComplaints;
import com.ym.mec.biz.dal.entity.TeacherSalaryModifyLog;
import com.ym.mec.biz.dal.page.TeacherSalaryModifyQueryInfo;
import com.ym.mec.biz.service.TeacherSalaryComplaintsService;
import com.ym.mec.biz.service.TeacherSalaryModifyLogService;
import com.ym.mec.common.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RequestMapping("teacherSalaryComplaints")
@Api(tags = "老师课酬申诉")
@RestController
public class TeacherSalaryComplaintsController extends BaseController {

    @Autowired
    private TeacherSalaryComplaintsService teacherSalaryComplaintsService;

    @ApiOperation(value = "分页获取")
    @RequestMapping("/queryPage")
    @PreAuthorize("@pcs.hasPermissions('teacherSalaryComplaints/queryPage')")
    public Object queryPage(TeacherSalaryModifyQueryInfo queryInfo){
        return succeed(teacherSalaryComplaintsService.queryPage(queryInfo));
    }

    @ApiOperation(value = "获取")
    @RequestMapping("/get")
    @PreAuthorize("@pcs.hasPermissions('teacherSalaryComplaints/get')")
    public Object get(Long id){
        return succeed(teacherSalaryComplaintsService.get(id));
    }

    @ApiOperation(value = "投诉处理")
    @RequestMapping("/complaintsDispose")
    @PreAuthorize("@pcs.hasPermissions('teacherSalaryComplaints/complaintsDispose')")
    public Object complaintsDispose(TeacherSalaryComplaints complaints){
        teacherSalaryComplaintsService.complaintsDispose(complaints);
        return succeed();
    }
}
