lxw
2022-09-02 54ddd9e7502bc090ffea51ef19cd30308390b4ba
src/main/java/com/whyc/controller/MaterialCodeDictionaryController.java
@@ -1,5 +1,7 @@
package com.whyc.controller;
import com.github.pagehelper.PageInfo;
import com.whyc.dto.Response;
import com.whyc.pojo.MaterialCodeDictionary;
import com.whyc.service.MaterialCodeDictionaryService;
import io.swagger.annotations.Api;
@@ -9,8 +11,10 @@
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.io.File;
import java.io.IOException;
import java.util.LinkedList;
@@ -24,6 +28,13 @@
    @Autowired
    private MaterialCodeDictionaryService service;
    @GetMapping("codeList")
    @ApiOperation(value = "查询编码列表分页",notes = "level:0(查询所有),1(一级编码),2(二级编码)")
    public Response<PageInfo<MaterialCodeDictionary>> getCodeList(@RequestParam int pageNum,@RequestParam int pageSize,@RequestParam int level){
        PageInfo<MaterialCodeDictionary> codeList = service.getCodeList(pageNum, pageSize, level);
        return new Response<PageInfo<MaterialCodeDictionary>>().set(1,codeList);
    }
    //解析导入数据,只使用一次
    @Deprecated
    @GetMapping("importData")