kimi
2020-03-13 8033eea1502d4cb0a91aa4b86c848ccb00ba8dc0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.highdatas.mdm.controller;
 
 
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.highdatas.mdm.entity.SysDatacategory;
import com.highdatas.mdm.pojo.Result;
import com.highdatas.mdm.service.ISysDatacategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
 
/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author kimi
 * @since 2019-12-17
 */
@RestController
@RequestMapping("/datacategory")
public class SysDatacategoryController {
 
    @Autowired
    ISysDatacategoryService sysDatacategoryService;
 
    @RequestMapping(value = "/all", method = RequestMethod.GET)
    public Result<List<SysDatacategory>> getAll() {
        EntityWrapper<SysDatacategory> sysMenuEntityWrapper = new EntityWrapper<>();
        sysMenuEntityWrapper.orderBy(" parent_id");
        return Result.success(sysDatacategoryService.selectList(sysMenuEntityWrapper)) ;
    }
 
}