package com.zcloud.controller.hiddenDangerCheckStandard;

import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.PageData;
import com.zcloud.service.hiddenDangerCheckStandard.CustomTermLibraryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/customLabelFactory")
public class CustomTermLibraryController extends BaseController {

    @Autowired
    private CustomTermLibraryService customTermLibraryService;

    @RequestMapping(value = "/termList")
    @ResponseBody
    public Object list() throws Exception {
        Map<String, Object> map = new HashMap<String, Object>();
        String errInfo = "success";
        PageData pd = new PageData();
        pd = this.getPageData();
        List<PageData> varList = customTermLibraryService.listAll(pd);    //列出LabelFacory列表
        map.put("varList", varList);
        map.put("result", errInfo);
        return map;
    }
}
