소스 검색

修复之前菜单、角色去掉状态字段导致业务权限失败

xusl 1 년 전
부모
커밋
6d11f7ddb6
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 2
      backend/src/main/resources/mapper/system/SysMenuMapper.xml
  2. 2 2
      ui/src/views/bizManager/nwp/index.vue

+ 2 - 2
backend/src/main/resources/mapper/system/SysMenuMapper.xml

@@ -117,14 +117,14 @@
 			 left join sys_role_menu rm on m.menu_id = rm.menu_id
 			 left join sys_user_role ur on rm.role_id = ur.role_id
 			 left join sys_role r on r.role_id = ur.role_id
-		where m.status = '0' and r.status = '0' and ur.user_id = #{userId} and m.del_flag=0 and ur.del_flag=0 and rm.del_flag=0
+		where ur.user_id = #{userId} and m.del_flag=0 and ur.del_flag=0 and rm.del_flag=0
 	</select>
 
 	<select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String">
 		select distinct m.perms
 		from sys_menu m
 			 left join sys_role_menu rm on m.menu_id = rm.menu_id
-		where m.status = '0' and rm.role_id = #{roleId} and m.del_flag=0 and rm.del_flag=0
+		where rm.role_id = #{roleId} and m.del_flag=0 and rm.del_flag=0
 	</select>
 
 	<select id="selectMenuById" parameterType="Long" resultMap="SysMenuResult">

+ 2 - 2
ui/src/views/bizManager/nwp/index.vue

@@ -136,7 +136,7 @@ export default {
         sysTime: sysTime,
         lk: lk
       }
-      this.$axios.get('/nwpController/getDraw',{params: searchParams}).then((res) => {
+      await this.$axios.get('/nwpController/getDraw',{params: searchParams}).then((res) => {
         this.drawData = res.data
       }).catch((error) => {
         this.$message.error('查询实时Nwp echarts出错' + error)
@@ -158,7 +158,7 @@ export default {
         sysTime: sysTime,
         lk: lk
       }
-      this.$axios.get('/nwpController/getAll',
+      await this.$axios.get('/nwpController/getAll',
         {params: searchParams}).then((res) => {
         this.tableData = res.data.records
         this.total = res.data.total