Commit eab1b450 authored by RuoYi's avatar RuoYi

优化代码

parent 98fc3078
...@@ -259,7 +259,7 @@ public class SysMenuServiceImpl implements ISysMenuService ...@@ -259,7 +259,7 @@ public class SysMenuServiceImpl implements ISysMenuService
public boolean hasChildByMenuId(Long menuId) public boolean hasChildByMenuId(Long menuId)
{ {
int result = menuMapper.hasChildByMenuId(menuId); int result = menuMapper.hasChildByMenuId(menuId);
return result > 0 ? true : false; return result > 0;
} }
/** /**
...@@ -272,7 +272,7 @@ public class SysMenuServiceImpl implements ISysMenuService ...@@ -272,7 +272,7 @@ public class SysMenuServiceImpl implements ISysMenuService
public boolean checkMenuExistRole(Long menuId) public boolean checkMenuExistRole(Long menuId)
{ {
int result = roleMenuMapper.checkMenuExistRole(menuId); int result = roleMenuMapper.checkMenuExistRole(menuId);
return result > 0 ? true : false; return result > 0;
} }
/** /**
......
...@@ -381,7 +381,7 @@ public class SysUserServiceImpl implements ISysUserService ...@@ -381,7 +381,7 @@ public class SysUserServiceImpl implements ISysUserService
*/ */
public void insertUserRole(SysUser user) public void insertUserRole(SysUser user)
{ {
this.insertUserRole(user.getUserId, user.getRoleIds()); this.insertUserRole(user.getUserId(), user.getRoleIds());
} }
/** /**
......
...@@ -4,7 +4,7 @@ module.exports = { ...@@ -4,7 +4,7 @@ module.exports = {
'@vue/cli-plugin-babel/preset' '@vue/cli-plugin-babel/preset'
], ],
'env': { 'env': {
'development': { 'production': {
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require(). // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages. // This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
'plugins': ['dynamic-import-node'] 'plugins': ['dynamic-import-node']
......
...@@ -210,7 +210,7 @@ export function tansParams(params) { ...@@ -210,7 +210,7 @@ export function tansParams(params) {
if (value !== null && value !== "" && typeof (value) !== "undefined") { if (value !== null && value !== "" && typeof (value) !== "undefined") {
if (typeof value === 'object') { if (typeof value === 'object') {
for (const key of Object.keys(value)) { for (const key of Object.keys(value)) {
if (value[key] !== null && value !== "" && typeof (value[key]) !== 'undefined') { if (value[key] !== null && value[key] !== "" && typeof (value[key]) !== 'undefined') {
let params = propName + '[' + key + ']'; let params = propName + '[' + key + ']';
var subPart = encodeURIComponent(params) + "="; var subPart = encodeURIComponent(params) + "=";
result += subPart + encodeURIComponent(value[key]) + "&"; result += subPart + encodeURIComponent(value[key]) + "&";
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment