package org.shunt.contorller;

import java.util.ArrayList;
import java.util.List;

import org.shunt.contorller.request.XmoseRequest;
import org.shunt.contorller.request.XmoseResponse;
import org.shunt.contorller.response.BannerVO;
import org.shunt.contorller.response.ScheduleVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@RestController
@Api("学生端首页")
@RequestMapping("/index")
public class IndexController {

    @GetMapping("/banner")
    @ApiOperation(value = "首页Banner接口", notes="首页Banner接口")
    public XmoseResponse<List<BannerVO>> bannerList(XmoseRequest<?> request) {
        List<BannerVO> bannerVOList = new ArrayList<BannerVO>();
        bannerVOList.add(BannerVO.builder().bannerTitle("默认学院图").bannerImageUrl("https://tenfei04.cfp.cn/creative/vcg/nowater800/new/VCG41N1282498891.jpg?x-oss-process=image/format,webp").jumUrl("").jumType(0).build());
        bannerVOList.add(BannerVO.builder().bannerTitle("特别申请").bannerImageUrl("https://tenfei04.cfp.cn/creative/vcg/nowater800/new/VCG41N1282498891.jpg?x-oss-process=image/format,webp").jumUrl("https://lanhuapp.com/web/#/item/project/stage?tid=b324be1d-148e-4b89-8ac4-62e7e4db2bc5&pid=bc5ad6c1-3c5e-4c3a-b176-1659377fe375").jumType(2).build());
        bannerVOList.add(BannerVO.builder().bannerTitle("特别申请查询").bannerImageUrl("https://tenfei04.cfp.cn/creative/vcg/nowater800/new/VCG41N1282498891.jpg?x-oss-process=image/format,webp").jumUrl("https://lanhuapp.com/web/#/item/project/stage?tid=b324be1d-148e-4b89-8ac4-62e7e4db2bc5&pid=bc5ad6c1-3c5e-4c3a-b176-1659377fe375").build());
    	
        return XmoseResponse.success(bannerVOList);
    }

    @GetMapping("/schedule")
    @ApiOperation(value = "日程安排列表", notes="日程安排列表")
    public XmoseResponse<List<ScheduleVO>> scheduleList(XmoseRequest<?> request) {
    	List<ScheduleVO> scheduleVOList = new ArrayList<ScheduleVO>();
    	scheduleVOList.add(ScheduleVO.builder().labelTitle("特别申请").labelStartDate("2022-02-01").labelEndDate("2022-02-28").labelStatus(-1).labeltatusName("已结束").build());
    	scheduleVOList.add(ScheduleVO.builder().labelTitle("特别申请结果查询").labelStartDate("2022-03-01").labelEndDate("2022-03-31").labelStatus(1).labeltatusName("进行中").build());
    	scheduleVOList.add(ScheduleVO.builder().labelTitle("志愿填报").labelStartDate("2022-04-01").labelEndDate("2022-04-15").labelStatus(0).labeltatusName("未开始").build());
    	scheduleVOList.add(ScheduleVO.builder().labelTitle("专业分流结果查询").labelStartDate("2022-04-16").labelEndDate("2022-04-31").labelStatus(0).labeltatusName("未开始").build());
    	
       return XmoseResponse.success(scheduleVOList);
    }
}
