Commit 94c04a94 authored by gary's avatar gary

1、sql debug

2、admin入口校验是否有webadmin权限
parent 54c83dc7
...@@ -121,9 +121,6 @@ public class MenuServiceImpl { ...@@ -121,9 +121,6 @@ public class MenuServiceImpl {
permissionExample.createCriteria().andIdIn(permissionIds); permissionExample.createCriteria().andIdIn(permissionIds);
List<String> menuIds = permissionMapper.selectByExample(permissionExample) List<String> menuIds = permissionMapper.selectByExample(permissionExample)
.stream().map(Permission::getMenuId).collect(Collectors.toList()); .stream().map(Permission::getMenuId).collect(Collectors.toList());
// 数据问题,,暂时用这种蠢办法
menuIds.add("91223c21-c15a-4882-89cc-42f3807ec9e3");
menuIds.add("9bf855fb-6b44-49cd-b95b-41a6a9a8c098");
// List<MenuDto> menus = getMenus(moduleId).stream().filter(x -> permissionNames.contains(x.getName())).collect(Collectors.toList()); // List<MenuDto> menus = getMenus(moduleId).stream().filter(x -> permissionNames.contains(x.getName())).collect(Collectors.toList());
return menuIds; return menuIds;
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<insert id="batchInsert2"> <insert id="batchInsert2">
INSERT INTO cell_template (id,report_template_id,row_index,row_name,column_index,column_name,comment,create_time,update_time,copy_from_id,data_type,is_read_only,create_by,update_by) INSERT INTO cell_template (id,report_template_id,row_index,row_name,column_index,column_name,comment,create_time,update_time,copy_from_id,data_type,is_read_only,create_by,update_by)
VALUES <foreach collection="list" item="item" index="index" separator=","> VALUES <foreach collection="list" item="item" index="index" separator=",">
(#{item.id,jdbcType=INTEGER}, (#{item.id,jdbcType=BIGINT},
#{item.reportTemplateId,jdbcType=INTEGER}, #{item.reportTemplateId,jdbcType=BIGINT},
#{item.rowIndex,jdbcType=INTEGER}, #{item.rowIndex,jdbcType=INTEGER},
#{item.rowName,jdbcType=VARCHAR}, #{item.rowName,jdbcType=VARCHAR},
#{item.columnIndex,jdbcType=INTEGER}, #{item.columnIndex,jdbcType=INTEGER},
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
#{item.comment,jdbcType=VARCHAR}, #{item.comment,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.createTime,jdbcType=TIMESTAMP},
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP},
#{item.copyFromId,jdbcType=INTEGER}, #{item.copyFromId,jdbcType=BIGINT},
#{item.dataType,jdbcType=INTEGER}, #{item.dataType,jdbcType=INTEGER},
#{item.isReadOnly,jdbcType=SMALLINT}, #{item.isReadOnly,jdbcType=BIT},
#{item.createBy,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR},
#{item.updateBy,jdbcType=VARCHAR}) #{item.updateBy,jdbcType=VARCHAR})
</foreach>; </foreach>;
......
...@@ -546,6 +546,9 @@ constant.vatPermission = { ...@@ -546,6 +546,9 @@ constant.vatPermission = {
// 权限代码 // 权限代码
constant.adminPermission = { constant.adminPermission = {
WebAdmin:'01',
basicData: { basicData: {
// 企业账套 // 企业账套
......
...@@ -16,8 +16,8 @@ frameworkModule.controller('AppNavController', ['$rootScope', '$scope', '$log', ...@@ -16,8 +16,8 @@ frameworkModule.controller('AppNavController', ['$rootScope', '$scope', '$log',
$scope.msgNum = 0; $scope.msgNum = 0;
$scope.showSubMenu = true; $scope.showSubMenu = true;
$scope.linkAdmin = false; $scope.linkAdmin = false;
$scope.showAdminSetting = false;
$scope.specialUser = $scope.loginUserName.toLowerCase(); $scope.specialUser = $scope.loginUserName.toLowerCase();
$scope.hasQuerySummaryDashboardCode = false; $scope.hasQuerySummaryDashboardCode = false;
var interval = $interval(function () { var interval = $interval(function () {
...@@ -112,7 +112,13 @@ frameworkModule.controller('AppNavController', ['$rootScope', '$scope', '$log', ...@@ -112,7 +112,13 @@ frameworkModule.controller('AppNavController', ['$rootScope', '$scope', '$log',
$('.nav-sub-container').hide(); $('.nav-sub-container').hide();
}); });
// 是否显示admin齿轮,校验是否有WebAdmin权限,不是校验is_admin字段
// todo 增值税申报和报表审批菜单没有做权限管理,可以在这里一起加上
var list = [];
list.push(constant.adminPermission.WebAdmin);
$scope.$root.checkUserPermissionList(list).success(function (data) {
$scope.adminSettingShow = data[constant.adminPermission.WebAdmin];
});
}; };
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<!--</a>--> <!--</a>-->
<!--</div>--> <!--</div>-->
<!--齿轮 进入管理入口--> <!--齿轮 进入管理入口-->
<div class="nav-element-right"> <div class="nav-element-right" ng-show="adminSettingShow">
<a title="{{'settings'|translate}}" href="/admin" target="_blank"> <a title="{{'settings'|translate}}" href="/admin" target="_blank">
<i class="fa fa-cog nav-icon-color"></i> <i class="fa fa-cog nav-icon-color"></i>
</a> </a>
......
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