package com.yida.data.school.userLeave.controller.in;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.vdurmont.emoji.EmojiManager;
import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.userLeave.EduLeaveRequestUser;
import com.yida.data.school.dto.userLeave.AuditRequestDTO;
import com.yida.data.school.dto.userLeave.ListUserRequestDTO;
import com.yida.data.school.userLeave.service.EduLeaveRequestUserService;
import com.yida.data.school.vo.userLeave.EduLeaveRequestUserVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * Controller
 *
 * @author wjm
 * @date 2022-12-01 10:51:19
 */
@Slf4j
@Validated
@RestController
@RequestMapping("in/eduLeaveRequestUser")
@RequiredArgsConstructor
@Api(tags = "请假管理")
public class InEduLeaveRequestUserController {

    private final EduLeaveRequestUserService eduLeaveRequestUserService;

    @ApiOperation("查询用户是否请假")
    @PostMapping("findList")
    public ResultBean<List<EduLeaveRequestUserVO>> findUserRequestList(@RequestBody ListUserRequestDTO dto) {
        return ResultBean
            .buildSuccess(
                eduLeaveRequestUserService.findUserRequestList(dto));
    }
}
