package com.gyee.frame.controller.knowledge;

import com.gyee.frame.common.conf.AjaxStatus;
import com.gyee.frame.common.domain.AjaxResult;
import com.gyee.frame.service.knowledge.KnowledgeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping("/knowledge")
@Api(value = "专家知识", tags = "专家知识")
public class KnowledgeController {

    private static final String format = "yyyy-MM-dd HH:mm";
    @Resource
    private KnowledgeService knowledgeService;


    @PostMapping("/getAlertruleAllList")
    @ResponseBody
    @ApiOperation(value = "专家知识统计", notes = "专家知识统计")
    @ApiImplicitParams({})

    public AjaxResult getAlertruleAllList() throws Exception {

        Map<String,Object> map=new HashMap<>();

        map=knowledgeService.getAlertruleAllList();


        if (null != map) {
            return AjaxResult.successData(AjaxStatus.success.code, map);
        } else {
            return AjaxResult.successData(AjaxStatus.success.code, map);
        }

    }
}
