Search in sources :

Example 1 with EventVO

use of com.gwc.workday.vo.EventVO in project workday by peer44.

the class HolidayController method init.

@ApiOperation(value = "加载节假日")
@GetMapping(value = "holiday/init")
@ResponseBody
public List<EventVO> init() {
    List<WorkDay> workDays = workDayService.findAllHolidays();
    List<EventVO> events = new ArrayList<>();
    if (!CollectionUtils.isEmpty(workDays)) {
        workDays.forEach(workDay -> {
            EventVO event = new EventVO(workDay.getDate());
            events.add(event);
        });
    }
    return events;
}
Also used : ArrayList(java.util.ArrayList) WorkDay(com.gwc.workday.entity.WorkDay) EventVO(com.gwc.workday.vo.EventVO) GetMapping(org.springframework.web.bind.annotation.GetMapping) ApiOperation(io.swagger.annotations.ApiOperation) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

WorkDay (com.gwc.workday.entity.WorkDay)1 EventVO (com.gwc.workday.vo.EventVO)1 ApiOperation (io.swagger.annotations.ApiOperation)1 ArrayList (java.util.ArrayList)1 GetMapping (org.springframework.web.bind.annotation.GetMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1