package com.template.api;

import com.template.model.request.*;
import com.template.model.result.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;


@RequestMapping("/api/alumniClubApply")
@Api(tags = {"AlumniClubApplyController"}, value = "部门")
public interface AlumniClubApplyControllerAPI {

    /**
     * 加入组织
     *
     * @param userId 用户ID
     * @param id     数据ID
     * @return
     */
    @GetMapping("/joinClubApply")
    @ApiOperation(value = "加入组织", httpMethod = "GET")
    CommonResult joinClubApply(@RequestAttribute Integer userId, @RequestParam Integer id);

    /**
     * @param currentPage
     * @param pageCount
     * @param name        组织名称
     * @param userName    申请人（创建人）
     * @param startTime
     * @param endTime
     * @param categoryId
     * @return
     * @Param isPass       审核状态  待审核：1 通过：2 拒绝：3
     */
    @GetMapping(value = "/queryClubProcessPage")
    @ApiOperation(value = "获取校友组织审核列表分页数据", notes = "获取校友组织审核列表分页数据", httpMethod = "GET")
    CommonResult queryClubProcessPage(@RequestAttribute Integer userId, @RequestParam int currentPage, @RequestParam int pageCount, String name, String userName, Integer isPass, Integer collegeId, Integer periodId, Integer majorId, Integer classId, String startTime, String endTime, Integer categoryId);


    /**
     * 审核入会数据
     *
     * @param userId 用户ID
     * @param id     数据ID
     * @param isPass 是否通过
     *               通过：2
     *               拒绝：3
     * @return
     */
    @GetMapping("/toExamineClub")
    @ApiOperation(value = "审核入会数据", httpMethod = "GET")
    CommonResult toExamineClub(@RequestAttribute Integer userId, @RequestParam Integer id,@RequestParam Integer isPass,String passValue) throws Exception;

    @PostMapping(value = "/queryClubProcessExcel")
    @ApiOperation(value = "导出校友组织审核数据", httpMethod = "POST")
    CommonResult queryClubProcessExcel(@RequestAttribute Integer userId, alumniClubApplyExcelRequest acer, HttpServletResponse response, BindingResult bindingResult);
}
