fix:删除用户时调错agent接口bug

This commit is contained in:
hrz
2025-04-05 21:22:54 +08:00
parent fe86e1fb0f
commit d2e8d1c261
5 changed files with 9 additions and 7 deletions
@@ -25,7 +25,8 @@ public interface AgentService extends BaseService<AgentEntity> {
/**
* 删除这个用户的所有
*
* @param userId
*/
void deleteAgentByUserId(String userId);
void deleteAgentByUserId(Long userId);
}
@@ -65,7 +65,7 @@ public class AgentServiceImpl extends BaseServiceImpl<AgentDao, AgentEntity> imp
}
@Override
public void deleteAgentByUserId(String userId) {
public void deleteAgentByUserId(Long userId) {
UpdateWrapper<AgentEntity> wrapper = new UpdateWrapper<>();
wrapper.eq("user_id", userId);
baseDao.delete(wrapper);
@@ -98,7 +98,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
// 删除设备
deviceService.deleteByUserId(id);
// 删除智能体
agentService.deleteById(id);
agentService.deleteAgentByUserId(id);
}
@Override
@@ -55,8 +55,7 @@
<button v-for="page in visiblePages" :key="page" class="pagination-btn"
:class="{ active: page === currentPage }" @click="goToPage(page)">
{{ page }}
</button>getUserList <button class="pagination-btn" :disabled="currentPage === pageCount"
@click="goNext">
</button> <button class="pagination-btn" :disabled="currentPage === pageCount" @click="goNext">
下一页
</button>
<span class="total-text">{{ total }}条记录</span>
+4 -2
View File
@@ -5,10 +5,12 @@
<el-header>
<div style="display: flex;align-items: center;margin-top: 15px;margin-left: 10px;gap: 10px;">
<img loading="lazy" alt="" src="@/assets/xiaozhi-logo.png" style="width: 45px;height: 45px;" />
<img loading="lazy" alt="" src="@/assets/xiaozhi-ai.png" style="width: 70px;height: 13px;" />
<img loading="lazy" alt="" src="@/assets/xiaozhi-ai.png" style="height: 18px;" />
</div>
</el-header>
<div class="login-person">
<img loading="lazy" alt="" src="@/assets/login/login-person.png" style="width: 100%;" />
</div>
<el-main style="position: relative;">
<div class="login-box">
<!-- 修改标题部分 -->