#
luxiaotao1123
2024-02-04 979984ca491fd2299607d24f9da1cc945fb020d5
#
4个文件已修改
34 ■■■■ 已修改文件
zy-asrs-flow/src/pages/Admin.jsx 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/security/JwtAuthenticationFilter.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/security/SecurityConfig.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/resources/mapper/sys/UserRoleMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/Admin.jsx
@@ -85,6 +85,29 @@
                    },
                ],
            },
            {
                name: '列表页',
                path: '/list',
                component: './ListTableList',
                routes: [
                    {
                        path: '/list/sub-page',
                        name: '列表页面',
                        routes: [
                            {
                                path: '/list/sub-page/sub-sub-page1',
                                name: '一级列表页面',
                                component: './G6',
                            },
                            {
                                path: '/list/sub-page/hello',
                                name: '你好世界',
                                component: './Hello',
                            },
                        ],
                    },
                ],
            },
        ]
    },
}
@@ -241,7 +264,7 @@
                        </Routes>
                        {/* <SettingDrawer
                        <SettingDrawer
                            pathname={pathname}
                            enableDarkTheme
                            getContainer={(e) => {
@@ -253,7 +276,7 @@
                                setSetting(changeSetting);
                            }}
                            disableUrlParams={false}
                        /> */}
                        />
                    </ProLayout>
                </ConfigProvider>
            </ProConfigProvider>
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/security/JwtAuthenticationFilter.java
@@ -65,7 +65,7 @@
                User user;
                // 白名单
                if (WHITE_LIST.contains(access_token)) {
                    user = userService.getByUsername("super", null);
                    user = userService.getByUsername("root", 1L);
                    if (user == null) {
                        throw new UsernameNotFoundException("Username not found");
                    }
@@ -97,10 +97,12 @@
                    }
                }
            } catch (ExpiredJwtException e) {
                e.printStackTrace();
                HttpUtils.responseError(response, Constants.TOKEN_EXPIRED_CODE, Constants.TOKEN_EXPIRED_MSG,
                        e.getMessage());
                return;
            } catch (Exception e) {
                e.printStackTrace();
                HttpUtils.responseError(response, Constants.BAD_CREDENTIALS_CODE, Constants.BAD_CREDENTIALS_MSG,
                        e.toString());
                return;
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/common/security/SecurityConfig.java
@@ -32,7 +32,6 @@
public class SecurityConfig extends WebSecurityConfigurerAdapter {
    public static final String[] FILTER_PATH = new String[]{
            "/api/**",
            "/test/**",
            "/api/login",
            "/druid/**",
zy-asrs-wcs/src/main/resources/mapper/sys/UserRoleMapper.xml
@@ -6,7 +6,7 @@
        select *
        from sys_role
        where 1=1
        and role_id in (
        and id in (
            select role_id
            from sys_user_role
            where user_id = #{userId}