diff --git a/CREATE_OPTIMIZATION_INDEXES.sql b/CREATE_OPTIMIZATION_INDEXES.sql
deleted file mode 100644
index 7251b99..0000000
--- a/CREATE_OPTIMIZATION_INDEXES.sql
+++ /dev/null
@@ -1,81 +0,0 @@
--- 数据库索引创建脚本
--- 此脚本用于优化应用性能,为常用查询字段创建索引
-
--- ============================================
--- 用户相关表索引
--- ============================================
-
--- users表索引
-CREATE INDEX IF NOT EXISTS idx_users_userId ON users(userId);
-CREATE INDEX IF NOT EXISTS idx_users_phoneNumber ON users(phoneNumber);
-CREATE INDEX IF NOT EXISTS idx_users_type ON users(type);
-CREATE INDEX IF NOT EXISTS idx_users_level ON users(level);
-CREATE INDEX IF NOT EXISTS idx_users_created_at ON users(created_at);
-
--- ============================================
--- 管理员相关表索引
--- ============================================
-
--- managers表索引
-CREATE INDEX IF NOT EXISTS idx_managers_id ON managers(id);
-CREATE INDEX IF NOT EXISTS idx_managers_userName ON managers(userName);
-CREATE INDEX IF NOT EXISTS idx_managers_managerId ON managers(managerId);
-CREATE INDEX IF NOT EXISTS idx_managers_organization ON managers(organization);
-CREATE INDEX IF NOT EXISTS idx_managers_managerdepartment ON managers(managerdepartment);
-
--- ============================================
--- 用户管理相关表索引
--- ============================================
-
--- usermanagements表索引
-CREATE INDEX IF NOT EXISTS idx_usermanagements_userId ON usermanagements(userId);
-CREATE INDEX IF NOT EXISTS idx_usermanagements_managerId ON usermanagements(managerId);
-CREATE INDEX IF NOT EXISTS idx_usermanagements_userName ON usermanagements(userName);
-CREATE INDEX IF NOT EXISTS idx_usermanagements_organization ON usermanagements(organization);
-CREATE INDEX IF NOT EXISTS idx_usermanagements_managerdepartment ON usermanagements(managerdepartment);
-
--- ============================================
--- 产品相关表索引
--- ============================================
-
--- products表索引
-CREATE INDEX IF NOT EXISTS idx_products_sellerId ON products(sellerId);
-CREATE INDEX IF NOT EXISTS idx_products_created_at ON products(created_at);
-
--- ============================================
--- 购物车相关表索引
--- ============================================
-
--- cart_items表索引
-CREATE INDEX IF NOT EXISTS idx_cart_items_userId ON cart_items(userId);
-CREATE INDEX IF NOT EXISTS idx_cart_items_productId ON cart_items(productId);
-
--- ============================================
--- 企业相关表索引
--- ============================================
-
--- enterprise表索引 (假设存在)
-CREATE INDEX IF NOT EXISTS idx_enterprise_id ON enterprise(id);
-CREATE INDEX IF NOT EXISTS idx_enterprise_name ON enterprise(name);
-
--- ============================================
--- 联系方式相关表索引
--- ============================================
-
--- contacts表索引
-CREATE INDEX IF NOT EXISTS idx_contacts_userId ON contacts(userId);
-
--- ============================================
--- 注意事项
--- ============================================
--- 1. 此脚本使用IF NOT EXISTS语法,可重复执行而不会报错
--- 2. 索引创建会占用额外的磁盘空间,提高写操作开销,但显著提升查询性能
--- 3. 建议在低峰期执行此脚本
--- 4. 执行后建议监控应用性能,确认优化效果
--- 5. 对于MySQL数据库,索引创建命令可能略有不同
--- ============================================
-
--- MySQL版本的部分索引创建语法示例(仅供参考)
--- ALTER TABLE users ADD INDEX idx_users_userId (userId);
--- ALTER TABLE users ADD INDEX idx_users_phoneNumber (phoneNumber);
--- 以此类推...
\ No newline at end of file
diff --git a/DEPLOYMENT_GUIDE.md b/DEPLOYMENT_GUIDE.md
deleted file mode 100644
index 18a210a..0000000
--- a/DEPLOYMENT_GUIDE.md
+++ /dev/null
@@ -1,224 +0,0 @@
-# Spring Boot应用部署到Tomcat 10.1.48指南(含性能优化)
-
-## 准备工作
-
-1. **确认构建产物**:
- - 已生成WAR文件:`web-0.0.1-SNAPSHOT.war`,位于`target`目录下
- - 确认包含最新性能优化:SQL查询优化、分页功能、二级缓存配置
-
-2. **Tomcat环境要求**:
- - Tomcat版本:10.1.48(Jakarta EE 10兼容)
- - JDK版本:17或更高(与项目`pom.xml`中配置的Java版本一致)
- - 数据库:需创建优化索引(详见数据库索引优化部分)
-
-## 部署步骤
-
-### 1. 准备部署文件
-
-```bash
-# 将WAR文件重命名为DL.war(与context-path一致)
-# 注意:在Windows命令提示符中使用
-copy target\web-0.0.1-SNAPSHOT.war target\DL.war
-
-# 或者在PowerShell中使用
-# Copy-Item -Path "target\web-0.0.1-SNAPSHOT.war" -Destination "target\DL.war"
-
-# 在Linux/Mac终端中使用(注意转义括号)
-# cp d:\java\project\web\(8)\web\target\web-0.0.1-SNAPSHOT.war d:\java\project\web\(8)\web\target\DL.war
-# 或者使用相对路径避免路径转义问题
-# cd d:\java\project\web(8)\web && cp target\web-0.0.1-SNAPSHOT.war target\DL.war
-```
-
-### 2. 上传WAR文件到服务器
-
-使用SFTP或SCP工具将`DL.war`文件上传到服务器的Tomcat目录:
-
-```bash
-# 示例:使用scp上传(注意处理路径中的括号)
-# 方法1:转义括号
-scp d:\java\project\web\(8)\web\target\DL.war user@your-server:/opt/tomcat/webapps/
-
-# 方法2:使用相对路径(推荐)
-cd d:\java\project\web(8)\web
-scp target\DL.war user@your-server:/opt/tomcat/webapps/
-
-# 方法3:使用引号包裹路径(在某些终端中有效)
-scp "d:\java\project\web(8)\web\target\DL.war" user@your-server:/opt/tomcat/webapps/
-```
-
-### 3. 确保Tomcat目录权限正确
-
-```bash
-# 登录服务器后执行
-cd /opt/tomcat
-# 确保tomcat用户对webapps目录有写权限
-chown -R tomcat:tomcat webapps/
-chmod -R 755 webapps/
-```
-
-### 4. 配置Tomcat(可选但推荐)
-
-#### 4.1 配置context.xml(解决可能的内存泄漏问题)
-
-编辑`/opt/tomcat/conf/context.xml`文件,添加以下配置:
-
-```xml
-
-
- WEB-INF/web.xml
- ${catalina.base}/conf/web.xml
-
-```
-
-#### 4.2 调整Tomcat内存配置
-
-编辑`/opt/tomcat/bin/setenv.sh`(如果不存在则创建):
-
-```bash
-#!/bin/bash
-# 为Tomcat设置适当的内存
-JAVA_OPTS="-Xms512m -Xmx1024m -XX:MaxPermSize=256m"
-# 添加Tomcat 10兼容性参数
-JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang=ALL-UNNAMED"
-```
-
-给脚本添加执行权限:
-```bash
-chmod +x /opt/tomcat/bin/setenv.sh
-```
-
-### 5. 启动或重启Tomcat
-
-```bash
-# 切换到Tomcat的bin目录
-cd /opt/tomcat/bin
-
-# 停止Tomcat(如果正在运行)
-./shutdown.sh
-
-# 等待Tomcat完全停止(约30秒)
-
-# 启动Tomcat
-./startup.sh
-```
-
-### 6. 验证部署
-
-1. **检查Tomcat日志**:
- ```bash
- tail -f /opt/tomcat/logs/catalina.out
- ```
-
-2. **访问应用**:
- - 应用应该可以通过以下URL访问:`http://your-server-ip:8080/DL`
- - 登录页面:`http://your-server-ip:8080/DL/loginmm.html`
-
-## 常见问题排查
-
-### 1. 端口冲突
-
-如果Tomcat的8080端口已被占用,修改`/opt/tomcat/conf/server.xml`中的端口配置:
-
-```xml
-
-```
-
-### 2. 数据库连接问题
-
-确保数据库服务器允许来自Tomcat服务器IP的连接。检查应用配置中的数据库连接URL是否正确。
-
-### 3. 类加载问题(Tomcat 10特有)
-
-Tomcat 10使用Jakarta EE,所有`javax.*`包已改为`jakarta.*`。如果出现类找不到的错误:
-
-- 检查是否有冲突的JAR包在WEB-INF/lib中
-- 确保使用的是支持Jakarta EE的依赖版本
-
-### 4. 内存溢出
-
-如果出现内存溢出错误,增加Tomcat的内存分配,修改`setenv.sh`文件:
-
-```bash
-JAVA_OPTS="-Xms1024m -Xmx2048m -XX:MaxPermSize=512m"
-```
-
-## 数据库索引优化(重要)
-
-在部署新版本前,请在数据库服务器上执行以下索引创建脚本,以提升查询性能:
-
-```sql
--- 执行CREATE_OPTIMIZATION_INDEXES.sql文件中的脚本
--- 在服务器上执行:
-source /path/to/CREATE_OPTIMIZATION_INDEXES.sql
-
--- 或直接复制脚本内容执行
-
--- 1. 为managers表创建索引
-CREATE INDEX idx_managers_enterprise_id ON managers(enterprise_id);
-CREATE INDEX idx_managers_user_name ON managers(user_name);
-
--- 2. 为users表创建索引
-CREATE INDEX idx_users_user_id ON users(user_id);
-CREATE INDEX idx_users_user_name ON users(user_name);
-CREATE INDEX idx_users_status ON users(status);
-
--- 3. 为usermanagements表创建索引
-CREATE INDEX idx_usermanagements_user_id ON usermanagements(user_id);
-CREATE INDEX idx_usermanagements_role_id ON usermanagements(role_id);
-CREATE INDEX idx_usermanagements_permission_level ON usermanagements(permission_level);
-```
-
-## 应用更新流程
-
-1. **执行数据库索引优化**:按照上方数据库索引优化部分执行索引创建脚本
-2. **停止Tomcat**:`./shutdown.sh`
-3. **备份旧数据**:`cp -r /opt/tomcat/webapps/DL /path/to/backup/`
-4. **删除旧的WAR文件和解压目录**:`rm -rf /opt/tomcat/webapps/DL*`
-5. **上传新的WAR文件**
-6. **启动Tomcat**:`./startup.sh`
-7. **监控日志确认部署成功**:`tail -f /opt/tomcat/logs/catalina.out`
-
-## 性能优化验证
-
-部署完成后,请执行以下验证步骤确认性能优化效果:
-
-1. **验证分页功能**:
- - 访问负责人管理页面,确认列表显示已启用分页
- - 验证翻页功能正常,数据加载速度提升
-
-2. **验证SQL查询性能**:
- - 执行常用查询操作,确认响应时间明显改善
- - 监控数据库慢查询日志,检查是否有新的慢查询
-
-3. **验证缓存效果**:
- - 连续访问相同数据页面,确认第二次访问速度更快
-
-## 回滚方案
-
-如遇部署问题,请按以下步骤回滚:
-
-1. 停止Tomcat:`./shutdown.sh`
-2. 删除新部署文件:`rm -rf /opt/tomcat/webapps/DL*`
-3. 恢复备份:`cp -r /path/to/backup/DL /opt/tomcat/webapps/`
-4. 恢复数据库索引(如需要)
-5. 启动Tomcat:`./startup.sh`
-
-## 注意事项
-
-1. **备份**:部署前请备份现有应用数据和配置
-2. **维护窗口**:选择低流量时段进行部署
-3. **监控**:部署后密切监控应用性能和日志
-4. **权限**:确保Tomcat用户对所有必要目录有正确权限
-5. **性能监控**:部署后持续监控系统性能指标,必要时进行进一步优化
-6. **索引维护**:定期检查数据库索引使用情况和碎片
-
----
-
-部署时间:2024
-版本:2.0(包含性能优化)
-
----
-
-> 详细性能优化说明请参考:PERFORMANCE_OPTIMIZATION_GUIDE.md
\ No newline at end of file
diff --git a/DL.war b/DL.war
deleted file mode 100644
index 8086386..0000000
Binary files a/DL.war and /dev/null differ
diff --git a/INFORMATION_TRACKING_SCHEME.md b/INFORMATION_TRACKING_SCHEME.md
deleted file mode 100644
index 4cfa50e..0000000
--- a/INFORMATION_TRACKING_SCHEME.md
+++ /dev/null
@@ -1,377 +0,0 @@
-# 客户信息跟踪系统解决方案
-
-## 1. 需求分析
-
-### 1.1 功能需求
-- 前端记录业务员操作事件(查看详情、编辑、跟进)
-- 获取当前账号信息(公司、部门、组织、角色、姓名)
-- 根据电话号码在两个数据源中查询客户
-- 将操作记录写入`informationtra`表
-
-### 1.2 数据源要求
-- `wechat`数据源:`users`表和`informationtra`表
-- `primary`数据源:`contacts`表
-
-### 1.3 数据流程
-1. 前端传递操作事件、电话号码、事件类型
-2. 后端获取当前用户认证信息
-3. 根据电话号码查询两个数据源
-4. 将查询结果与认证信息结合写入`informationtra`表
-
-## 2. 数据库设计
-
-### 2.1 现有表结构
-```sql
-CREATE TABLE `informationtra` (
- `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
- `tracompany` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改者公司',
- `tradepartment` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改者部门',
- `traorganization` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改者组织',
- `trarole` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改者角色',
- `trauserName` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改者名字',
- `traassistant` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '修改协助人',
- `userId` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '客户ID',
- `operationEvent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '操作事件',
- `operationTime` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
- `created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`id`),
- KEY `idx_userId` (`userId`),
- KEY `idx_operationTime` (`operationTime`),
- KEY `idx_trauserName` (`trauserName`),
- CONSTRAINT `fk_informationtra_userId` FOREIGN KEY (`userId`) REFERENCES `users` (`userId`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='信息跟踪表';
-```
-
-## 3. 代码设计
-
-### 3.1 实体类设计
-
-#### InformationTra.java
-```java
-package com.example.web.entity;
-
-import java.time.LocalDateTime;
-
-public class InformationTra {
- private Integer id;
- private String tracompany;
- private String tradepartment;
- private String traorganization;
- private String trarole;
- private String trauserName;
- private String traassistant;
- private String userId;
- private String operationEvent;
- private LocalDateTime operationTime;
- private LocalDateTime createdAt;
- private LocalDateTime updatedAt;
-
- // Getters and Setters
- // ...
-}
-```
-
-### 3.2 Mapper设计
-
-#### InformationTraMapper.java
-```java
-package com.example.web.mapper;
-
-import com.example.web.entity.InformationTra;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-@Mapper
-public interface InformationTraMapper {
- /**
- * 插入操作记录
- */
- int insertInformationTra(InformationTra informationTra);
-
- /**
- * 根据userId查询操作记录
- */
- InformationTra selectByUserId(@Param("userId") String userId);
-}
-```
-
-#### InformationTraMapper.xml
-```xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- INSERT INTO informationtra (
- tracompany, tradepartment, traorganization, trarole,
- trauserName, traassistant, userId, operationEvent,
- operationTime, created_at, updated_at
- ) VALUES (
- #{tracompany}, #{tradepartment}, #{traorganization}, #{trarole},
- #{trauserName}, #{traassistant}, #{userId}, #{operationEvent},
- #{operationTime}, #{createdAt}, #{updatedAt}
- )
-
-
-
-
-```
-
-### 3.3 Service设计
-
-#### InformationTraService.java
-```java
-package com.example.web.service;
-
-import com.example.web.dto.ManagerAuthInfo;
-import com.example.web.entity.InformationTra;
-import com.example.web.mapper.*;
-import com.example.web.config.DynamicDataSource;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.time.LocalDateTime;
-
-@Service
-public class InformationTraService {
-
- @Autowired
- private InformationTraMapper informationTraMapper;
-
- @Autowired
- private UsersMapper usersMapper;
-
- @Autowired
- private ContactsMapper contactsMapper;
-
- /**
- * 记录操作事件
- */
- public boolean recordOperationEvent(String phoneNumber, String operationEvent, ManagerAuthInfo authInfo) {
- try {
- // 1. 从两个数据源查询客户信息
- String userId = null;
-
- // 查询wechat数据源的users表
- DynamicDataSource.setDataSourceKey("wechat");
- com.example.web.entity.Users wechatUser = usersMapper.selectByPhoneNumber(phoneNumber);
-
- if (wechatUser != null) {
- userId = wechatUser.getUserId();
- } else {
- // 查询primary数据源的contacts表
- DynamicDataSource.setDataSourceKey("primary");
- com.example.web.entity.Contacts contact = contactsMapper.selectByPhoneNumber(phoneNumber);
-
- if (contact != null) {
- userId = contact.getId();
- }
- }
-
- // 如果都没找到,返回失败
- if (userId == null) {
- return false;
- }
-
- // 2. 构造操作记录
- InformationTra informationTra = new InformationTra();
- informationTra.setTracompany(authInfo.getManagercompany());
- informationTra.setTradepartment(authInfo.getManagerdepartment());
- informationTra.setTraorganization(authInfo.getOrganization());
- informationTra.setTrarole(authInfo.getRole());
- informationTra.setTrauserName(authInfo.getUserName());
- informationTra.setTraassistant(authInfo.getAssistant());
- informationTra.setUserId(userId);
- informationTra.setOperationEvent(operationEvent);
- informationTra.setOperationTime(LocalDateTime.now());
- informationTra.setCreatedAt(LocalDateTime.now());
- informationTra.setUpdatedAt(LocalDateTime.now());
-
- // 3. 写入wechat数据源的informationtra表
- DynamicDataSource.setDataSourceKey("wechat");
- int result = informationTraMapper.insertInformationTra(informationTra);
-
- return result > 0;
- } finally {
- // 清除数据源标识
- DynamicDataSource.clearDataSourceKey();
- }
- }
-}
-```
-
-### 3.4 Controller设计
-
-#### InformationTraController.java
-```java
-package com.example.web.controller;
-
-import com.example.web.dto.ManagerAuthInfo;
-import com.example.web.service.InformationTraService;
-import jakarta.servlet.http.HttpServletRequest;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@RestController
-@RequestMapping("/api/information-tracking")
-public class InformationTraController {
-
- @Autowired
- private InformationTraService informationTraService;
-
- /**
- * 记录操作事件
- */
- @PostMapping("/record")
- public ResponseEntity