feat: 新增根据权限标识获取用户列表功能
- 新增SysUserController.listUsersByPermission接口 - 新增SysUserService.selectUserListByPermission方法 - 支持多租户和权限关联查询 - 更新变更记录文档
This commit is contained in:
1 parent
90b13a6e0c
commit
661a513f57
86 files changed
+22988
-199
No files matched your search
@@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>字典数据调试</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; margin: 20px; }
|
||||
.container { max-width: 800px; margin: 0 auto; }
|
||||
.test-section { margin: 20px 0; padding: 15px; border: 1px solid #ddd; border-radius: 5px; }
|
||||
.success { color: green; }
|
||||
.error { color: red; }
|
||||
.warning { color: orange; }
|
||||
pre { background: #f5f5f5; padding: 10px; border-radius: 3px; overflow-x: auto; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>字典数据调试页面</h1>
|
||||
|
||||
<div class="test-section">
|
||||
<h3>测试说明</h3>
|
||||
<p>此页面用于调试学生信息管理页面的字典数据问题</p>
|
||||
<p>请确保:</p>
|
||||
<ul>
|
||||
<li>后端服务正在运行在 http://localhost:8080</li>
|
||||
<li>已经登录管理后台</li>
|
||||
<li>打开浏览器开发者工具查看详细日志</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="test-section">
|
||||
<h3>测试结果</h3>
|
||||
<div id="results"></div>
|
||||
</div>
|
||||
|
||||
<div class="test-section">
|
||||
<h3>字典数据详情</h3>
|
||||
<div id="dictDetails"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const results = document.getElementById('results');
|
||||
const dictDetails = document.getElementById('dictDetails');
|
||||
|
||||
function log(message, type = 'info') {
|
||||
const div = document.createElement('div');
|
||||
div.className = type;
|
||||
div.textContent = `[${new Date().toLocaleTimeString()}] ${message}`;
|
||||
results.appendChild(div);
|
||||
console.log(`[DICT-DEBUG] ${message}`);
|
||||
}
|
||||
|
||||
function showDictData(dictType, data) {
|
||||
const section = document.createElement('div');
|
||||
section.innerHTML = `
|
||||
<h4>${dictType} (${data.length} 条记录)</h4>
|
||||
<pre>${JSON.stringify(data, null, 2)}</pre>
|
||||
`;
|
||||
dictDetails.appendChild(section);
|
||||
}
|
||||
|
||||
async function testDictAPI() {
|
||||
log('开始测试字典API...');
|
||||
|
||||
const dictTypes = ['xg_gender', 'xg_student_status', 'xg_info_status'];
|
||||
|
||||
for (const dictType of dictTypes) {
|
||||
try {
|
||||
log(`正在测试字典类型: ${dictType}`);
|
||||
|
||||
const response = await fetch(`http://localhost:8080/system/dict/data/type/${dictType}`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
credentials: 'include' // 包含cookies
|
||||
});
|
||||
|
||||
const result = await response.json();
|
||||
|
||||
if (result.code === 200) {
|
||||
log(`✅ ${dictType}: 成功获取 ${result.data.length} 条数据`, 'success');
|
||||
showDictData(dictType, result.data);
|
||||
} else if (result.code === 401) {
|
||||
log(`❌ ${dictType}: 认证失败,请先登录管理后台`, 'error');
|
||||
} else {
|
||||
log(`❌ ${dictType}: ${result.msg}`, 'error');
|
||||
}
|
||||
} catch (error) {
|
||||
log(`❌ ${dictType}: 网络错误 - ${error.message}`, 'error');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 页面加载完成后执行测试
|
||||
window.addEventListener('load', () => {
|
||||
log('页面加载完成,开始测试...');
|
||||
testDictAPI();
|
||||
});
|
||||
|
||||
// 添加手动重试按钮
|
||||
const retryButton = document.createElement('button');
|
||||
retryButton.textContent = '重新测试';
|
||||
retryButton.onclick = () => {
|
||||
results.innerHTML = '';
|
||||
dictDetails.innerHTML = '';
|
||||
testDictAPI();
|
||||
};
|
||||
document.querySelector('.container').appendChild(retryButton);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user