Package net.mingsoft.basic.action
Class ModelAction
java.lang.Object
net.mingsoft.base.action.BaseAction
net.mingsoft.basic.action.BaseAction
net.mingsoft.basic.action.ModelAction
@Controller
@RequestMapping("/${ms.manager.path}/basic/model")
public class ModelAction
extends BaseAction
模块控制层
- Version:
- 版本号:200-000-000
创建日期:2014-6-29
历史修订: 新增 getModelListByManagerSession方法, 修改方法中所有ManagerSession.getRoleId()为getModelListByManagerSession 修改日期: 2022-1-5 2022-1-12 菜单结构调整,使用菜单策略,更改为超级管理员始终拥有所有菜单 2022-1-14 添加菜单排序功能 2023-1-08 优化权限标识及菜单标题校验规则,当菜单为导航链接时不允许标题重复,菜单为功能权限时不允许权限标识重复 - Author:
- 铭飞开发团队
-
Field Summary
Fields inherited from class net.mingsoft.base.action.BaseAction
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.mingsoft.base.entity.ResultDatachildList(ModelEntity modelEntity, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) net.mingsoft.base.entity.ResultDatadelete(jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) net.mingsoft.base.entity.ResultDataget(ModelEntity modelEntity, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.ModelMap model) 获取模块表net.mingsoft.base.entity.ResultDataimportMenu(String menuStr, int modelId) index(jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.ModelMap mode) 返回主界面indexnet.mingsoft.base.entity.ResultDatalist(ModelEntity modelEntity, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.ModelMap model) 查询模块表列表net.mingsoft.base.entity.ResultDatamodelList(ModelEntity modelEntity, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.ModelMap model) 查询模块表列表net.mingsoft.base.entity.ResultDataqueryModelByRoleId(int managerId, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) 根据管理员ID查询模块集合net.mingsoft.base.entity.ResultDatasave(ModelEntity model, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) 保存模块表实体net.mingsoft.base.entity.ResultDataupdate(ModelEntity model, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) 更新模块表信息模块表Methods inherited from class net.mingsoft.basic.action.BaseAction
checkRandCode, checkRandCode, decryptByAES, encryptByAES, getRandCode, getResString, redirectBack, removeUrlParams, validated, validatedMethods inherited from class net.mingsoft.base.action.BaseAction
getDomain, getHost, getHostIp, getLocaleString, getMapByProperties, getMapByProperties, getResString, getResString, getResString, getUrl, isMobileDevice
-
Constructor Details
-
ModelAction
public ModelAction()
-
-
Method Details
-
index
@GetMapping("/index") @RequiresPermissions("basic:model:view") public String index(jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.ModelMap mode) 返回主界面index -
list
@GetMapping("/list") @ResponseBody public net.mingsoft.base.entity.ResultData list(@ModelAttribute ModelEntity modelEntity, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.ModelMap model) 查询模块表列表- Parameters:
model- 模块表实体 model参数包含字段信息参考:
id 模块自增长id
modelTitle 模块标题
modelCode 模块编码
modelId 模块的父模块id
modelUrl 模块连接地址
modelDatetime
modelIcon 模块图标
modelSort 模块的排序
modelIsmenu 模块是否是菜单
- 返回
- [
{
id: 模块自增长id
modelTitle: 模块标题
modelCode: 模块编码
modelId: 模块的父模块id
modelUrl: 模块连接地址
modelDatetime:
modelIcon: 模块图标
modelSort: 模块的排序
modelIsmenu: 模块是否是菜单
}
]
-
childList
@GetMapping("/childList") @RequiresPermissions("basic:model:view") @ResponseBody public net.mingsoft.base.entity.ResultData childList(@ModelAttribute ModelEntity modelEntity, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) -
importMenu
@LogAnn(title="\u5bfc\u5165\u83dc\u5355", businessType=INSERT) @PostMapping("/import") @ResponseBody @RequiresPermissions("basic:model:save") public net.mingsoft.base.entity.ResultData importMenu(String menuStr, int modelId) -
get
@GetMapping("/get") @RequiresPermissions("basic:model:view") @ResponseBody public net.mingsoft.base.entity.ResultData get(@ModelAttribute ModelEntity modelEntity, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.ModelMap model) 获取模块表- Parameters:
model- 模块表实体 model参数包含字段信息参考:
id 模块自增长id
modelTitle 模块标题
modelCode 模块编码
modelId 模块的父模块id
modelUrl 模块连接地址
modelDatetime
modelIcon 模块图标
modelSort 模块的排序
modelIsmenu 模块是否是菜单
- 返回
- {
id: 模块自增长id
modelTitle: 模块标题
modelCode: 模块编码
modelId: 模块的父模块id
modelUrl: 模块连接地址
modelDatetime:
modelIcon: 模块图标
modelSort: 模块的排序
modelIsmenu: 模块是否是菜单
}
-
save
@LogAnn(title="\u4fdd\u5b58\u6a21\u5757\u8868\u5b9e\u4f53", businessType=INSERT) @PostMapping("/save") @ResponseBody @RequiresPermissions("basic:model:save") public net.mingsoft.base.entity.ResultData save(@ModelAttribute ModelEntity model, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) 保存模块表实体- Parameters:
model- 模块表实体 model参数包含字段信息参考:
id 模块自增长id
modelTitle 模块标题
modelCode 模块编码
modelId 模块的父模块id
modelUrl 模块连接地址
modelDatetime
modelIcon 模块图标
modelSort 模块的排序
modelIsmenu 模块是否是菜单
- 返回
- {
id: 模块自增长id
modelTitle: 模块标题
modelCode: 模块编码
modelId: 模块的父模块id
modelUrl: 模块连接地址
modelDatetime:
modelIcon: 模块图标
modelSort: 模块的排序
modelIsmenu: 模块是否是菜单
}
-
delete
@LogAnn(title="\u6279\u91cf\u5220\u9664\u6a21\u5757\u8868", businessType=DELETE) @PostMapping("/delete") @ResponseBody @RequiresPermissions("basic:model:del") public net.mingsoft.base.entity.ResultData delete(jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) -
update
@LogAnn(title="\u66f4\u65b0\u6a21\u5757\u8868\u4fe1\u606f\u6a21\u5757\u8868", businessType=UPDATE) @PostMapping("/update") @RequiresPermissions("basic:model:update") @ResponseBody public net.mingsoft.base.entity.ResultData update(@ModelAttribute ModelEntity model, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) 更新模块表信息模块表- Parameters:
model- 模块表实体 model参数包含字段信息参考:
id 模块自增长id
modelTitle 模块标题
modelCode 模块编码
modelId 模块的父模块id
modelUrl 模块连接地址
modelDatetime
modelIcon 模块图标
modelSort 模块的排序
modelIsmenu 模块是否是菜单
- 返回
- {
id: 模块自增长id
modelTitle: 模块标题
modelCode: 模块编码
modelId: 模块的父模块id
modelUrl: 模块连接地址
modelDatetime:
modelIcon: 模块图标
modelSort: 模块的排序
modelIsmenu: 模块是否是菜单
}
-
queryModelByRoleId
@GetMapping("/{managerId}/queryModelByRoleId") @ResponseBody public net.mingsoft.base.entity.ResultData queryModelByRoleId(@PathVariable int managerId, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) 根据管理员ID查询模块集合- Parameters:
managerId- 管理员idrequest- 请求对象response- 响应对象
-
modelList
@GetMapping("/modelList") @ResponseBody public net.mingsoft.base.entity.ResultData modelList(@ModelAttribute ModelEntity modelEntity, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.ModelMap model) 查询模块表列表- Parameters:
model- 模块表实体 model参数包含字段信息参考:
id 模块自增长id
modelTitle 模块标题
modelCode 模块编码
modelId 模块的父模块id
modelUrl 模块连接地址
modelDatetime
modelIcon 模块图标
modelSort 模块的排序
modelIsmenu 模块是否是菜单
- 返回
- [
{
id: 模块自增长id
modelTitle: 模块标题
modelCode: 模块编码
modelId: 模块的父模块id
modelUrl: 模块连接地址
modelDatetime:
modelIcon: 模块图标
modelSort: 模块的排序
modelIsmenu: 模块是否是菜单
}
]
-