This commit is contained in:
parent
2bafddcaa2
commit
f255a0144c
|
|
@ -1,8 +1,18 @@
|
|||
package com.securitycontrol.entity.system.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 菜单查询
|
||||
* @author HeiZi
|
||||
*/
|
||||
@Data
|
||||
public class MenuDto {
|
||||
|
||||
@ApiModelProperty(value = "菜单ID")
|
||||
private Integer menuId;
|
||||
|
||||
@ApiModelProperty(value = "菜单名称")
|
||||
private String menuName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
package com.securitycontrol.entity.system.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-02-26-17:58
|
||||
* @version:1.0
|
||||
* @description:菜单-vo
|
||||
*/
|
||||
@Data
|
||||
public class MenuVo {
|
||||
|
||||
@ApiModelProperty(value = "菜单ID")
|
||||
private Integer menuId;
|
||||
|
||||
@ApiModelProperty(value = "菜单名称")
|
||||
private String menuName;
|
||||
|
||||
@ApiModelProperty(value = "菜单路径")
|
||||
private String menuUrl;
|
||||
|
||||
@ApiModelProperty(value = "菜单类型")
|
||||
private Integer menuType;
|
||||
|
||||
@ApiModelProperty(value = "权限")
|
||||
private Integer menuAuth;
|
||||
|
||||
@ApiModelProperty(value = "父ID")
|
||||
private Integer parentId;
|
||||
|
||||
@ApiModelProperty(value = "菜单排序")
|
||||
private Integer menuSort;
|
||||
|
||||
@ApiModelProperty(value = "图标")
|
||||
private Integer menuLogo;
|
||||
|
||||
@ApiModelProperty(value = "子节点")
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private List<MenuVo> children;
|
||||
}
|
||||
|
|
@ -1,13 +1,21 @@
|
|||
package com.securitycontrol.system.controller;
|
||||
|
||||
import com.securitycontrol.common.core.web.controller.BaseController;
|
||||
import com.securitycontrol.system.service.MenuService;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 菜单管理层
|
||||
* @author HeiZi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sys/menu/")
|
||||
public class MenuController {
|
||||
public class MenuController extends BaseController {
|
||||
|
||||
@Resource(name = "MenuService")
|
||||
private MenuService service;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
package com.securitycontrol.system.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-02-26-18:07
|
||||
* @version:1.0
|
||||
* @description:菜单管理-数据库访问层
|
||||
*/
|
||||
@Repository(value = "IMenuMapper")
|
||||
public interface IMenuMapper {
|
||||
}
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
package com.securitycontrol.system.service;
|
||||
|
||||
/**
|
||||
* @author 10488
|
||||
*/
|
||||
public interface MenuService {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,18 @@
|
|||
package com.securitycontrol.system.service;
|
||||
|
||||
public class MenuServiceImpl {
|
||||
import com.securitycontrol.system.mapper.IMenuMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author 10488
|
||||
*/
|
||||
@Service(value = "MenuService")
|
||||
@Slf4j
|
||||
public class MenuServiceImpl implements MenuService{
|
||||
|
||||
@Resource(name = "IMenuMapper")
|
||||
private IMenuMapper mapper;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.securitycontrol.system.mapper.IMenuMapper">
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
SELECT menu_id AS id,
|
||||
p_id AS parentId,
|
||||
menu_name AS label,
|
||||
menu_url AS level
|
||||
menu_type AS level
|
||||
FROM sys_menu
|
||||
WHERE del_flag = 0
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue