package com.yh.saas.plugin.yiliangyiyun.controller;

import com.baomidou.mybatisplus.plugins.Page;
import com.winsea.svc.notice.command.NoticeCommand.NoticeBusinessTypeNumber;
import com.winsea.svc.notice.entity.NoticeTaskInfo;

import java.util.List;

import com.yh.saas.plugin.yiliangyiyun.service.INewNoticeTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping({"/newNoticeTask"})
public class NewNoticeTaskController {
    @Autowired
    private INewNoticeTaskService noticeTaskService;

    public NewNoticeTaskController() {
    }

    @GetMapping({"/query/noticeTasks"})
    public Page<NoticeTaskInfo> findPageNoticeTask(NoticeTaskInfo noticeTask) {
        return this.noticeTaskService.findPageNoticeTasks(noticeTask);
    }

    @GetMapping({"/query/businessTypeAmount"})
    public List<NoticeBusinessTypeNumber> findBusinessTypeAmount() {
        return this.noticeTaskService.findBusinessTypeCount();
    }
}
