New file |
| | |
| | | package com.dg.core.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.controller.BaseController; |
| | | import com.dg.core.db.gen.entity.ClassifyAdministration; |
| | | import com.dg.core.service.IClassifyAdministrationService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.Assert; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 分类管理 |
| | | */ |
| | | @Api(tags = {"分类管理小程序接口"}) |
| | | @RestController |
| | | @RequestMapping("/applets/classify") |
| | | public class ClassifyAdministrationAppletsController extends BaseController |
| | | { |
| | | |
| | | @Autowired(required = true) |
| | | IClassifyAdministrationService iClassifyAdministrationService; |
| | | |
| | | |
| | | /** |
| | | * 获取管理菜单列表(无分页已分级) |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = " 获取管理菜单列表(无分页已分级))",response = ClassifyAdministration.class) |
| | | @GetMapping("/selectListByParentId") |
| | | public TableDataInfo selectListByParentId(@RequestParam(value = "parentId",required = false) String parentId, |
| | | @RequestParam(value = "departmentId",required = false) Integer departmentId){ |
| | | int num=iClassifyAdministrationService.countNum("",null); |
| | | if (parentId==null) |
| | | parentId="0"; |
| | | return getDataTable(iClassifyAdministrationService.selectConfigListByParentId(parentId, departmentId),num); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取分类根据id 如果是二级id则获取的是办事指南 |
| | | * @return |
| | | */ |
| | | @ApiOperation("获取分类根据id 如果是二级id则获取的是办事指南,不传参默认是0") |
| | | @GetMapping("/queryListById") |
| | | ResultData queryListById(@RequestParam(value = "id",required = false) Integer id){ |
| | | if(id==null) |
| | | id=0; |
| | | return iClassifyAdministrationService.queryListById(id); |
| | | } |
| | | } |