package com.template.api;

import com.sun.tracing.dtrace.Attributes;
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;
import java.text.ParseException;


@RequestMapping("/api/alumniActivity")
@Api(tags = {"AlumniActivityControllerAPI"}, value = "活动照片管理员")
public interface AlumniActivityControllerAPI {

    //获取报名范围下拉列表数据
    @GetMapping("/queryScopeTypes")
    @ApiOperation(value = "获取报名范围下拉列表数据", httpMethod = "GET")
    CommonResult queryScopeTypes();

    //获取活动相册是否启用下拉列表数据
    @GetMapping("/queryIsImage")
    @ApiOperation(value = "获取是否开启相册下拉列表数据", httpMethod = "GET")
    CommonResult queryIsImage();

    //新增活动
    @PostMapping("/insertActivity")
    @ApiOperation(value = "新增活动", httpMethod = "POST")
    CommonResult insertActivity(@RequestAttribute Integer userId, @Validated @RequestBody insertActivityRequest iar, BindingResult bindingResult) throws Exception;

    //编辑活动 审核过后不允许编辑
    @PostMapping("/updateActivity")
    @ApiOperation(value = "编辑活动", httpMethod = "POST")
    CommonResult updateActivity(@Validated @RequestBody updateActivityRequest uar, BindingResult bindingResult) throws Exception;

    //删除活动 允许有重新发起功能
    @GetMapping("/deleteActivityById")
    @ApiOperation(value = "删除活动", httpMethod = "GET")
    CommonResult deleteActivityById(@RequestParam int id);

    //重新发起
    @GetMapping("/reloadActivityById")
    @ApiOperation(value = "重新发起", httpMethod = "GET")
    CommonResult reloadActivityById(@RequestParam int id);

    //获取状态下拉列表
    @GetMapping("/queryStatus")
    @ApiOperation(value = "获取状态下拉列表数据", httpMethod = "GET")
    CommonResult queryStatus();

    //活动分页数据 获取的是审批通过的
    @GetMapping("/queryActivityPages")
    @ApiOperation(value = "活动分页数据", httpMethod = "GET")
    CommonResult queryActivityPages(@RequestParam int currentPage, @RequestParam int pageCount, String userName, Integer collegeId, Integer periodId, Integer majorId, Integer classId, String orgName, String theme, Integer statuId, String createStartTime, String createEndTime, String startTime, String endTime, String signsTime, String signeTime) throws ParseException;

    //活动导出 要导出两个sheet
    @PostMapping(value = "/getAlumniActivityExcel")
    @ApiOperation(value = "导出活动数据", httpMethod = "POST")
    CommonResult getAlumniActivityExcel(@Validated @RequestBody alumniActivityExcelRequest aaer, HttpServletResponse response, BindingResult bindingResult) throws ParseException;

    //根据ID获取详情  如果把详情相关数据带到分页中查询会很慢
    @GetMapping("/queryDetailInfoById")
    @ApiOperation(value = "根据ID获取详情", httpMethod = "GET")
    CommonResult queryDetailInfoById(@RequestParam int id);

    //获取活动审核分页数据
    @GetMapping("/queryActivityApplyPages")
    @ApiOperation(value = "活动审核分页数据", httpMethod = "GET")
    CommonResult queryActivityApplyPages(@RequestParam int currentPage, @RequestParam int pageCount, @RequestAttribute Integer userId, String userName, Integer collegeId, Integer periodId, Integer majorId, Integer classId, String orgName, String theme, Integer isPass, String createStartTime, String createEndTime, String startTime, String endTime, String signsTime, String signeTime) throws ParseException;

    //审核操作
    @GetMapping("/toExamineActivity")
    @ApiOperation(value = "审核活动数据", httpMethod = "GET")
    CommonResult toExamineActivity(@RequestAttribute Integer userId, @RequestParam Integer id, @RequestParam Integer isPass, String passValue) throws Exception;

    //活动审核导出
    @PostMapping("/getActivityApplyExcel")
    @ApiOperation(value = "导出活动审核数据", httpMethod = "POST")
    CommonResult getActivityApplyExcel(@RequestAttribute Integer userId, @Validated @RequestBody activityApplyExcelRequest aaer,HttpServletResponse response,BindingResult bindingResult) throws ParseException;

    //region 移动端
    //发起活动
    @PostMapping("/initiateActivity")
    @ApiOperation(value = "发起活动", httpMethod = "POST")
    CommonResult initiateActivity(@RequestAttribute Integer userId, @Validated @RequestBody insertActivityRequest iar, BindingResult bindingResult) throws Exception;

    //活动报名 报名表 审核通过才能报名
    @GetMapping("/activityReportById")
    @ApiOperation(value = "活动报名", httpMethod = "GET")
    CommonResult activityReportById(@RequestAttribute Integer userId, @RequestParam int id) throws ParseException;

    //活动签到 签到表 审核通过且报名了才能签到
    @GetMapping("/activitySigninById")
    @ApiOperation(value = "活动签到", httpMethod = "GET")
    CommonResult activitySigninById(@RequestAttribute Integer userId, @RequestParam int id) throws ParseException;

    //我发起的活动 根据审核状态
    @GetMapping("/queryMyActivityPages")
    @ApiOperation(value = "移动端活动分页数据", httpMethod = "GET")
    CommonResult queryMyActivityPages(@RequestParam int currentPage, @RequestParam int pageCount, @RequestAttribute Integer userId, Integer isPass);

    //我参加的活动
    @GetMapping("/queryMyJoinActivityPages")
    @ApiOperation(value = "移动端活动分页数据", httpMethod = "GET")
    CommonResult queryMyJoinActivityPages(@RequestParam int currentPage, @RequestParam int pageCount, @RequestAttribute Integer userId) throws ParseException;

    //上传照片确认发布
    @PostMapping("/confirmReleaseImage")
    @ApiOperation(value = "确认发布", httpMethod = "POST")
    CommonResult confirmReleaseImage(@RequestAttribute Integer userId, @Validated @RequestBody confirmReleaseRequest crr, BindingResult bindingResult) throws Exception;

    //我上传的
    @GetMapping("/queryMyUploadPage")
    @ApiOperation(value = "我上传的", httpMethod = "GET")
    CommonResult queryMyUploadPage(@RequestParam int currentPage, @RequestParam int pageCount, @RequestAttribute Integer userId, @RequestParam int isPass);

    //活动照片审核分页数据
    @PostMapping("/queryUploadApplyPage")
    @ApiOperation(value = "活动照片审核分页数据", httpMethod = "GET")
    CommonResult queryUploadApplyPage(@RequestParam int currentPage, @RequestParam int pageCount, @RequestAttribute Integer userId);

    //活动照片审核操作
    @GetMapping("/toExamineActivityImage")
    @ApiOperation(value = "审核活动照片数据", httpMethod = "GET")
    CommonResult toExamineActivityImage(@RequestAttribute Integer userId, @RequestParam Integer id,@RequestParam Integer isPass,String passValue) throws Exception;

    //移动端获取活动详情
    @GetMapping("/queryMobileDetailInfoById")
    @ApiOperation(value = "根据ID获取详情", httpMethod = "GET")
    CommonResult queryMobileDetailInfoById(@RequestParam int id);

    //endregion
}
