update 重命名 菜单字段 query -> query_param 解决系统关键字问题

2.X
疯狂的狮子li 3 years ago
parent ae376e121d
commit e418c2efe4

@ -242,8 +242,6 @@ mybatis-plus:
insertStrategy: NOT_NULL
updateStrategy: NOT_NULL
where-strategy: NOT_NULL
# 对 mysql 的字段做格式化 防止出现系统关键字
column-format: "`%s`"
# swagger配置
swagger:

@ -1,6 +1,5 @@
package com.ruoyi.system.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
@ -68,7 +67,7 @@ public class SysMenu extends TreeEntity {
*
*/
@ApiModelProperty(value = "路由参数")
private String query;
private String queryParam;
/**
* 0 1

@ -141,7 +141,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
router.setName(getRouteName(menu));
router.setPath(getRouterPath(menu));
router.setComponent(getComponent(menu));
router.setQuery(menu.getQuery());
router.setQuery(menu.getQueryParam());
router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath()));
List<SysMenu> cMenus = (List<SysMenu>) menu.getChildren();
if (!cMenus.isEmpty() && cMenus.size() > 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType())) {
@ -156,7 +156,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
children.setComponent(menu.getComponent());
children.setName(StringUtils.capitalize(menu.getPath()));
children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath()));
children.setQuery(menu.getQuery());
children.setQuery(menu.getQueryParam());
childrenList.add(children);
router.setChildren(childrenList);
} else if (menu.getParentId().intValue() == 0 && isInnerLink(menu)) {

@ -12,7 +12,7 @@
<result property="orderNum" column="order_num" />
<result property="path" column="path" />
<result property="component" column="component" />
<result property="query" column="query" />
<result property="queryParam" column="query_param" />
<result property="isFrame" column="is_frame" />
<result property="isCache" column="is_cache" />
<result property="menuType" column="menu_type" />
@ -28,7 +28,7 @@
</resultMap>
<select id="selectMenuListByUserId" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.visible, m.status,
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query_param, m.visible, m.status,
m.perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
@ -43,7 +43,7 @@
m.menu_name,
m.path,
m.component,
m.query,
m.query_param,
m.visible,
m.status,
m.perms,

@ -208,7 +208,7 @@
</el-col>
<el-col :span="12" v-if="form.menuType == 'C'">
<el-form-item>
<el-input v-model="form.query" placeholder="请输入路由参数" maxlength="255" />
<el-input v-model="form.queryParam" placeholder="请输入路由参数" maxlength="255" />
<span slot="label">
<el-tooltip content='访问路由的默认传递参数,如:`{"id": 1, "name": "ry"}`' placement="top">
<i class="el-icon-question"></i>

@ -139,7 +139,7 @@ create table sys_menu (
order_num int(4) default 0 comment '显示顺序',
path varchar(200) default '' comment '路由地址',
component varchar(255) default null comment '组件路径',
query varchar(255) default null comment '路由参数',
query_param varchar(255) default null comment '路由参数',
is_frame int(1) default 1 comment '是否为外链0是 1否',
is_cache int(1) default 0 comment '是否缓存0缓存 1不缓存',
menu_type char(1) default '' comment '菜单类型M目录 C菜单 F按钮',

Loading…
Cancel
Save