New file |
| | |
| | | package com.ruoyi.web.controller.zhang; |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.domain.ZDict; |
| | | import com.ruoyi.service.ZDictService; |
| | | import io.swagger.v3.oas.models.security.SecurityScheme; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.naming.ldap.PagedResultsControl; |
| | | import javax.websocket.server.PathParam; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 字典表 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author ojq |
| | | * @since 2023-03-14 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/zDict") |
| | | public class ZDictController { |
| | | |
| | | @Resource |
| | | private ZDictService zDictService; |
| | | |
| | | @GetMapping("/all") |
| | | public AjaxResult getAllDict(){ |
| | | return zDictService.listAllDict(); |
| | | } |
| | | |
| | | @GetMapping("/byId") |
| | | public AjaxResult getDictById(@PathParam("id")Integer id){ |
| | | ZDict result = zDictService.getById(id); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | } |
| | | |