package com.diagbot.web;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.diagbot.annotation.SysLogger;
import com.diagbot.dto.ConceptDTO;
import com.diagbot.dto.LibraryInfoDTO;
import com.diagbot.dto.RespDTO;
import com.diagbot.dto.TypeDTO;
import com.diagbot.facade.ConceptFacade;
import com.diagbot.facade.TypeFacade;
import com.diagbot.vo.AmendTermVo;
import com.diagbot.vo.ConceptVo;
import com.diagbot.vo.TermVo;
import com.diagbot.vo.TypeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.Valid;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Weixuan Huang
 * @since 2019-03-18
 */
@RestController
@RequestMapping("/type")
@Api(value = "医学术语类型API", tags = { "医学术语类型API" })

public class TypeController {
    @Autowired
    private TypeFacade typeFacade;


    @ApiOperation(value = "查询所有类型")
    @PostMapping("getAllType")
    @SysLogger("getAllType")
    public RespDTO<IPage<TypeDTO>> getAllType(@RequestBody TypeVo typeVo) {
        IPage<TypeDTO> data = typeFacade.getTypes(typeVo);

        return RespDTO.onSuc(data);
    }

}
