From db64ed63a55f63c7f5f1209639f33fa49dd2bb72 Mon Sep 17 00:00:00 2001 From: zhonghua1 Date: Fri, 19 Dec 2025 08:48:05 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9F=B3=E9=A2=91=E5=88=86=E6=AE=B5=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E7=9A=84=E4=BB=A3=E7=A0=81=E6=9E=B6=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rj/controller/AudioFileController.java | 23 +- .../AudioManagementSegmentsController.java | 305 ++++++++++++++++++ .../rj/entity/AudioManagementSegments.java | 153 +++++++++ .../java/com/rj/entity/DeviceManagement.java | 4 + .../mapper/AudioManagementSegmentsMapper.java | 16 + .../IAudioManagementSegmentsService.java | 16 + .../AudioManagementSegmentsServiceImpl.java | 22 ++ src/main/resources/application.yml | 2 +- .../mapper/AudioManagementSegmentsMapper.xml | 74 +++++ src/main/sql/多租户技术方案.md | 5 + 10 files changed, 602 insertions(+), 18 deletions(-) create mode 100644 src/main/java/com/rj/controller/AudioManagementSegmentsController.java create mode 100644 src/main/java/com/rj/entity/AudioManagementSegments.java create mode 100644 src/main/java/com/rj/mapper/AudioManagementSegmentsMapper.java create mode 100644 src/main/java/com/rj/service/IAudioManagementSegmentsService.java create mode 100644 src/main/java/com/rj/service/impl/AudioManagementSegmentsServiceImpl.java create mode 100644 src/main/resources/mapper/AudioManagementSegmentsMapper.xml diff --git a/src/main/java/com/rj/controller/AudioFileController.java b/src/main/java/com/rj/controller/AudioFileController.java index 9c7b3a7..61b44bf 100644 --- a/src/main/java/com/rj/controller/AudioFileController.java +++ b/src/main/java/com/rj/controller/AudioFileController.java @@ -111,7 +111,6 @@ public class AudioFileController { } String headersJson = objectMapper.writeValueAsString(headers); log.info("headers: {}", headersJson); - System.out.println("headers: " + headersJson); // 参考C#的Console.WriteLine // 解析请求数据 Map requestBody = null; @@ -121,11 +120,8 @@ public class AudioFileController { if (contentType != null && contentType.contains(MediaType.MULTIPART_FORM_DATA_VALUE)) { // multipart/form-data格式 log.info("检测到multipart/form-data格式请求"); - // 检查并获取文件参数 log.info("检查文件参数,file是否为null: {}", file == null); - System.out.println("检查文件参数,file是否为null: " + (file == null)); - // 无论file是否为空,都尝试从request中获取文件(确保能获取到) if (request instanceof org.springframework.web.multipart.MultipartHttpServletRequest) { System.out.println("request是MultipartHttpServletRequest类型"); @@ -139,7 +135,6 @@ public class AudioFileController { fileParamNames.add(fileNames.next()); } log.info("multipart请求中的文件参数名列表: {}", fileParamNames); - System.out.println("multipart请求中的文件参数名列表: " + fileParamNames); // 如果file为空,尝试从request中获取第一个文件 if (file == null || file.isEmpty()) { @@ -150,23 +145,15 @@ public class AudioFileController { log.info("从multipart请求中获取到文件,参数名: {}, 文件名: {}, 大小: {} bytes", paramName, file != null ? file.getOriginalFilename() : "null", file != null ? file.getSize() : 0); - System.out.println("从multipart请求中获取到文件,参数名: " + paramName + - ", 文件名: " + (file != null ? file.getOriginalFilename() : "null") + - ", 大小: " + (file != null ? file.getSize() : 0) + " bytes"); } else { log.warn("multipart请求中未找到任何文件参数"); - System.out.println("multipart请求中未找到任何文件参数"); } } else { log.info("通过@RequestParam获取到文件,文件名: {}, 大小: {} bytes", file.getOriginalFilename(), file.getSize()); - System.out.println("通过@RequestParam获取到文件,文件名: " + file.getOriginalFilename() + - ", 大小: " + file.getSize() + " bytes"); } } else { - log.warn("request不是MultipartHttpServletRequest类型,实际类型: {}", - request.getClass().getName()); - System.out.println("request不是MultipartHttpServletRequest类型,实际类型: " + request.getClass().getName()); + log.warn("request不是MultipartHttpServletRequest类型,实际类型: {}", request.getClass().getName()); if (file != null && !file.isEmpty()) { log.info("通过@RequestParam获取到文件,文件名: {}, 大小: {} bytes", file.getOriginalFilename(), file.getSize()); @@ -253,7 +240,6 @@ public class AudioFileController { // 打印请求体(参考C#代码:打印body) String bodyJson = objectMapper.writeValueAsString(requestBody); log.info("body: {}", bodyJson); - System.out.println("body: " + bodyJson); // 参考C#的Console.WriteLine // 保存原始数据到 yhy_datatype_log 表(初步解析后保存) try { @@ -354,8 +340,11 @@ public class AudioFileController { com.rj.entity.AudioManagement newAudio = new com.rj.entity.AudioManagement(); newAudio.setId(UUID.randomUUID().toString()); newAudio.setRecordingName("服务中录音"); // 设置默认录音名称 - newAudio.setSalesName(salesName); - newAudio.setSalesPhone(salesPhone); + newAudio.setSalesName(deviceManagement.getSalesName()); + newAudio.setSalesPhone(deviceManagement.getSalesPhone()); + newAudio.setTenantId(deviceManagement.getTenantId()); // 租户id + newAudio.setDealershipName(deviceManagement.getDealershipName()); + newAudio.setDealershipId(deviceManagement.getDealershipId()); newAudio.setSyncStatus("服务中"); newAudio.setCreateTime(TimeZoneUtils.now()); newAudio.setUpdateTime(TimeZoneUtils.now()); diff --git a/src/main/java/com/rj/controller/AudioManagementSegmentsController.java b/src/main/java/com/rj/controller/AudioManagementSegmentsController.java new file mode 100644 index 0000000..686e2a9 --- /dev/null +++ b/src/main/java/com/rj/controller/AudioManagementSegmentsController.java @@ -0,0 +1,305 @@ +package com.rj.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.rj.entity.AudioManagementSegments; +import com.rj.service.IAudioManagementSegmentsService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import java.time.LocalDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + *

+ * 录音分段管理表 前端控制器 + *

+ * + * 对应表:audio_management_segments + */ +@RestController +@RequestMapping("/api/audioManagementSegments") +@Tag(name = "录音分段管理", description = "录音分段管理相关接口") +@Slf4j +public class AudioManagementSegmentsController { + + @Autowired + private IAudioManagementSegmentsService audioManagementSegmentsService; + + /** + * 新增录音分段 + */ + @PostMapping("/add") + @Operation(summary = "新增录音分段", description = "添加新的录音分段信息") + public ResponseEntity> addSegment( + @Parameter(description = "录音分段信息", required = true) + @RequestBody AudioManagementSegments segment) { + Map result = new HashMap<>(); + try { + if (segment.getCreateTime() == null) { + segment.setCreateTime(LocalDateTime.now()); + } + boolean success = audioManagementSegmentsService.save(segment); + if (success) { + result.put("success", true); + result.put("message", "录音分段添加成功"); + result.put("data", segment); + return ResponseEntity.ok(result); + } else { + result.put("success", false); + result.put("message", "录音分段添加失败"); + return ResponseEntity.badRequest().body(result); + } + } catch (Exception e) { + log.error("录音分段添加异常:{}", e.getMessage(), e); + result.put("success", false); + result.put("message", "录音分段添加异常:" + e.getMessage()); + return ResponseEntity.internalServerError().body(result); + } + } + + /** + * 根据ID查询录音分段 + */ + @GetMapping("/get/{id}") + @Operation(summary = "根据ID查询录音分段", description = "根据分段ID获取录音分段详细信息") + public ResponseEntity> getSegmentById( + @Parameter(description = "分段ID", required = true) + @PathVariable String id) { + Map result = new HashMap<>(); + try { + AudioManagementSegments segment = audioManagementSegmentsService.getById(id); + if (segment != null) { + result.put("success", true); + result.put("message", "查询成功"); + result.put("data", segment); + return ResponseEntity.ok(result); + } else { + result.put("success", false); + result.put("message", "录音分段不存在"); + return ResponseEntity.notFound().build(); + } + } catch (Exception e) { + log.error("录音分段查询异常:{}", e.getMessage(), e); + result.put("success", false); + result.put("message", "查询异常:" + e.getMessage()); + return ResponseEntity.internalServerError().body(result); + } + } + + /** + * 分页查询录音分段列表 + */ + @GetMapping("/list") + @Operation(summary = "分页查询录音分段列表", description = "分页查询录音分段信息列表") + public ResponseEntity> getSegmentList( + @Parameter(description = "页码", example = "1") + @RequestParam(defaultValue = "1") Integer current, + @Parameter(description = "每页大小", example = "10") + @RequestParam(defaultValue = "10") Integer size, + @Parameter(description = "父录音ID") + @RequestParam(required = false) String parentId, + @Parameter(description = "租户ID") + @RequestParam(required = false) String tenantId, + @Parameter(description = "设备编号(模糊查询)") + @RequestParam(required = false) String deviceNo, + @Parameter(description = "销售姓名(模糊查询)") + @RequestParam(required = false) String salesName, + @Parameter(description = "销售电话(模糊查询)") + @RequestParam(required = false) String salesPhone, + @Parameter(description = "意向级别") + @RequestParam(required = false) String intentionLevel, + @Parameter(description = "上传状态") + @RequestParam(required = false) String uploadStatus, + @Parameter(description = "同步状态") + @RequestParam(required = false) String syncStatus) { + + Map result = new HashMap<>(); + try { + Page page = new Page<>(current, size); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + + if (parentId != null && !parentId.trim().isEmpty()) { + queryWrapper.eq(AudioManagementSegments::getParentId, parentId); + } + if (tenantId != null && !tenantId.trim().isEmpty()) { + queryWrapper.eq(AudioManagementSegments::getTenantId, tenantId); + } + if (deviceNo != null && !deviceNo.trim().isEmpty()) { + queryWrapper.like(AudioManagementSegments::getDeviceNo, deviceNo); + } + if (salesName != null && !salesName.trim().isEmpty()) { + queryWrapper.like(AudioManagementSegments::getSalesName, salesName); + } + if (salesPhone != null && !salesPhone.trim().isEmpty()) { + queryWrapper.like(AudioManagementSegments::getSalesPhone, salesPhone); + } + if (intentionLevel != null && !intentionLevel.trim().isEmpty()) { + queryWrapper.eq(AudioManagementSegments::getIntentionLevel, intentionLevel); + } + if (uploadStatus != null && !uploadStatus.trim().isEmpty()) { + queryWrapper.eq(AudioManagementSegments::getUploadStatus, uploadStatus); + } + if (syncStatus != null && !syncStatus.trim().isEmpty()) { + queryWrapper.eq(AudioManagementSegments::getSyncStatus, syncStatus); + } + + // 按创建时间倒序排列 + queryWrapper.orderByDesc(AudioManagementSegments::getCreateTime); + + Page segmentPage = audioManagementSegmentsService.page(page, queryWrapper); + + result.put("success", true); + result.put("message", "查询成功"); + result.put("data", segmentPage.getRecords()); + result.put("total", segmentPage.getTotal()); + result.put("current", segmentPage.getCurrent()); + result.put("size", segmentPage.getSize()); + result.put("pages", segmentPage.getPages()); + + return ResponseEntity.ok(result); + } catch (Exception e) { + log.error("录音分段分页查询异常:{}", e.getMessage(), e); + result.put("success", false); + result.put("message", "查询异常:" + e.getMessage()); + return ResponseEntity.internalServerError().body(result); + } + } + + /** + * 根据父ID查询录音分段列表(不分页) + */ + @GetMapping("/listByParentId") + @Operation(summary = "根据父ID查询录音分段列表(不分页)", + description = "根据父录音ID查询所有分段列表,不分页") + public ResponseEntity> listByParentId( + @Parameter(description = "父录音ID", required = true) + @RequestParam String parentId) { + Map result = new HashMap<>(); + try { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(AudioManagementSegments::getParentId, parentId); + // 通常按开始时间或段索引排序 + queryWrapper.orderByAsc(AudioManagementSegments::getStartTime); + + List list = audioManagementSegmentsService.list(queryWrapper); + + result.put("success", true); + result.put("message", "查询成功"); + result.put("data", list); + result.put("count", list.size()); + return ResponseEntity.ok(result); + } catch (Exception e) { + log.error("根据父ID查询录音分段列表异常:{}", e.getMessage(), e); + result.put("success", false); + result.put("message", "查询异常:" + e.getMessage()); + return ResponseEntity.internalServerError().body(result); + } + } + + /** + * 更新录音分段信息 + */ + @PutMapping("/update") + @Operation(summary = "更新录音分段信息", description = "更新录音分段详细信息") + public ResponseEntity> updateSegment( + @Parameter(description = "录音分段信息", required = true) + @RequestBody AudioManagementSegments segment) { + Map result = new HashMap<>(); + try { + if (segment.getId() == null || segment.getId().trim().isEmpty()) { + result.put("success", false); + result.put("message", "分段ID不能为空"); + return ResponseEntity.badRequest().body(result); + } + + boolean success = audioManagementSegmentsService.updateById(segment); + + if (success) { + result.put("success", true); + result.put("message", "录音分段信息更新成功"); + result.put("data", segment); + return ResponseEntity.ok(result); + } else { + result.put("success", false); + result.put("message", "录音分段信息更新失败"); + return ResponseEntity.badRequest().body(result); + } + } catch (Exception e) { + log.error("录音分段更新异常:{}", e.getMessage(), e); + result.put("success", false); + result.put("message", "更新异常:" + e.getMessage()); + return ResponseEntity.internalServerError().body(result); + } + } + + /** + * 根据ID删除录音分段 + */ + @DeleteMapping("/delete/{id}") + @Operation(summary = "删除录音分段", description = "根据分段ID删除录音分段信息") + public ResponseEntity> deleteSegment( + @Parameter(description = "分段ID", required = true) + @PathVariable String id) { + Map result = new HashMap<>(); + try { + boolean success = audioManagementSegmentsService.removeById(id); + if (success) { + result.put("success", true); + result.put("message", "录音分段删除成功"); + return ResponseEntity.ok(result); + } else { + result.put("success", false); + result.put("message", "录音分段删除失败"); + return ResponseEntity.badRequest().body(result); + } + } catch (Exception e) { + log.error("录音分段删除异常:{}", e.getMessage(), e); + result.put("success", false); + result.put("message", "删除异常:" + e.getMessage()); + return ResponseEntity.internalServerError().body(result); + } + } + + /** + * 批量删除录音分段 + */ + @DeleteMapping("/batchDelete") + @Operation(summary = "批量删除录音分段", description = "根据分段ID列表批量删除录音分段信息") + public ResponseEntity> batchDeleteSegments( + @Parameter(description = "分段ID列表", required = true) + @RequestBody List ids) { + Map result = new HashMap<>(); + try { + if (ids == null || ids.isEmpty()) { + result.put("success", false); + result.put("message", "分段ID列表不能为空"); + return ResponseEntity.badRequest().body(result); + } + + boolean success = audioManagementSegmentsService.removeByIds(ids); + if (success) { + result.put("success", true); + result.put("message", "批量删除成功,共删除 " + ids.size() + " 条记录"); + return ResponseEntity.ok(result); + } else { + result.put("success", false); + result.put("message", "批量删除失败"); + return ResponseEntity.badRequest().body(result); + } + } catch (Exception e) { + log.error("批量删除录音分段异常:{}", e.getMessage(), e); + result.put("success", false); + result.put("message", "批量删除异常:" + e.getMessage()); + return ResponseEntity.internalServerError().body(result); + } + } +} + diff --git a/src/main/java/com/rj/entity/AudioManagementSegments.java b/src/main/java/com/rj/entity/AudioManagementSegments.java new file mode 100644 index 0000000..410caee --- /dev/null +++ b/src/main/java/com/rj/entity/AudioManagementSegments.java @@ -0,0 +1,153 @@ +package com.rj.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + *

+ * 录音分段管理表 + *

+ * + * 对应表:audio_management_segments + * + * @author + * @since 2025-12-18 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("audio_management_segments") +@Schema(description = "录音分段管理表") +public class AudioManagementSegments implements Serializable { + + private static final long serialVersionUID = 1L; + + @Schema(description = "主键,UUID") + @TableId("id") + private String id; + + @Schema(description = "父录音ID(对应 audio_management.id)") + @TableField("parent_id") + private String parentId; + + @Schema(description = "租户ID") + @TableField("tenant_id") + private String tenantId; + + @Schema(description = "录音名称") + @TableField("recording_name") + private String recordingName; + + @Schema(description = "录音段数(序号)") + @TableField("chunk_index") + private String chunkIndex; + + @Schema(description = "设备编号") + @TableField("deviceNo") + private String deviceNo; + + @Schema(description = "记录时间") + @TableField("recording_time") + private LocalDateTime recordingTime; + + @Schema(description = "信息卡内容") + @TableField("info_card_description") + private String infoCardDescription; + + @Schema(description = "销售ID") + @TableField("sales_id") + private String salesId; + + @Schema(description = "销售电话") + @TableField("sales_phone") + private String salesPhone; + + @Schema(description = "销售姓名") + @TableField("sales_name") + private String salesName; + + @Schema(description = "录音时长(分钟)") + @TableField("duration") + private BigDecimal duration; + + @Schema(description = "上传时间") + @TableField("upload_time") + private LocalDateTime uploadTime; + + @Schema(description = "关注程度/意向级别") + @TableField("intention_level") + private String intentionLevel; + + @Schema(description = "经销售ID") + @TableField("dealership_id") + private String dealershipId; + + @Schema(description = "经销售名称") + @TableField("dealership_name") + private String dealershipName; + + @Schema(description = "上传状态") + @TableField("upload_status") + private String uploadStatus; + + @Schema(description = "同步状态") + @TableField("sync_status") + private String syncStatus; + + @Schema(description = "是否合并(0否1是)") + @TableField("is_merged") + private Boolean isMerged; + + @Schema(description = "描述/备注") + @TableField("remarks") + private String remarks; + + @Schema(description = "录音开始时间") + @TableField("start_time") + private LocalDateTime startTime; + + @Schema(description = "录音结束时间") + @TableField("end_time") + private LocalDateTime endTime; + + @Schema(description = "创建时间") + @TableField("create_time") + private LocalDateTime createTime; + + @Schema(description = "录音保存路径") + @TableField("audio_file_path") + private String audioFilePath; + + @Schema(description = "录音保存minio路径") + @TableField("audio_file_url") + private String audioFileUrl; + + @Schema(description = "文件大小(字节)") + @TableField("audio_file_size") + private Long audioFileSize; + + @Schema(description = "文件原始名称") + @TableField("audio_file_original_name") + private String audioFileOriginalName; + + @Schema(description = "文件扩展名") + @TableField("audio_file_extension") + private String audioFileExtension; + + @Schema(description = "录音文本") + @TableField("recording_text") + private String recordingText; + + @Schema(description = "总结") + @TableField("summary") + private String summary; + +} + diff --git a/src/main/java/com/rj/entity/DeviceManagement.java b/src/main/java/com/rj/entity/DeviceManagement.java index 2ed40d5..62e1ce7 100644 --- a/src/main/java/com/rj/entity/DeviceManagement.java +++ b/src/main/java/com/rj/entity/DeviceManagement.java @@ -29,6 +29,10 @@ public class DeviceManagement implements Serializable { @TableId("id") private String id; + @Schema(description = "租户ID") + @TableField("tenant_id") + private String tenantId; + @Schema(description = "设备编号") @TableField("device_code") private String deviceCode; diff --git a/src/main/java/com/rj/mapper/AudioManagementSegmentsMapper.java b/src/main/java/com/rj/mapper/AudioManagementSegmentsMapper.java new file mode 100644 index 0000000..466045f --- /dev/null +++ b/src/main/java/com/rj/mapper/AudioManagementSegmentsMapper.java @@ -0,0 +1,16 @@ +package com.rj.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.rj.entity.AudioManagementSegments; + +/** + *

+ * 录音分段管理表 Mapper 接口 + *

+ * + * 对应表:audio_management_segments + */ +public interface AudioManagementSegmentsMapper extends BaseMapper { + +} + diff --git a/src/main/java/com/rj/service/IAudioManagementSegmentsService.java b/src/main/java/com/rj/service/IAudioManagementSegmentsService.java new file mode 100644 index 0000000..53ef84d --- /dev/null +++ b/src/main/java/com/rj/service/IAudioManagementSegmentsService.java @@ -0,0 +1,16 @@ +package com.rj.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.rj.entity.AudioManagementSegments; + +/** + *

+ * 录音分段管理表 服务类 + *

+ * + * 对应表:audio_management_segments + */ +public interface IAudioManagementSegmentsService extends IService { + +} + diff --git a/src/main/java/com/rj/service/impl/AudioManagementSegmentsServiceImpl.java b/src/main/java/com/rj/service/impl/AudioManagementSegmentsServiceImpl.java new file mode 100644 index 0000000..769ab46 --- /dev/null +++ b/src/main/java/com/rj/service/impl/AudioManagementSegmentsServiceImpl.java @@ -0,0 +1,22 @@ +package com.rj.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.rj.entity.AudioManagementSegments; +import com.rj.mapper.AudioManagementSegmentsMapper; +import com.rj.service.IAudioManagementSegmentsService; +import org.springframework.stereotype.Service; + +/** + *

+ * 录音分段管理表 服务实现类 + *

+ * + * 对应表:audio_management_segments + */ +@Service +public class AudioManagementSegmentsServiceImpl + extends ServiceImpl + implements IAudioManagementSegmentsService { + +} + diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 3accad7..206c1dc 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -49,7 +49,7 @@ logging: # 数据库连接池日志 # com.zaxxer.hikari: DEBUG # Spring JDBC日志 -# org.springframework.jdbc: DEBUG + org.springframework.jdbc: DEBUG # 显示SQL参数 com.baomidou.mybatisplus.core.executor: DEBUG # 显示SQL执行时间 diff --git a/src/main/resources/mapper/AudioManagementSegmentsMapper.xml b/src/main/resources/mapper/AudioManagementSegmentsMapper.xml new file mode 100644 index 0000000..47336d6 --- /dev/null +++ b/src/main/resources/mapper/AudioManagementSegmentsMapper.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, + parent_id, + tenant_id, + recording_name, + chunk_index, + deviceNo, + recording_time, + info_card_description, + sales_id, + sales_phone, + sales_name, + duration, + upload_time, + intention_level, + dealership_id, + dealership_name, + upload_status, + sync_status, + is_merged, + remarks, + start_time, + end_time, + create_time, + audio_file_path, + audio_file_url, + audio_file_size, + audio_file_original_name, + audio_file_extension, + recording_text, + summary + + + + diff --git a/src/main/sql/多租户技术方案.md b/src/main/sql/多租户技术方案.md index ae29027..a0f0c1c 100644 --- a/src/main/sql/多租户技术方案.md +++ b/src/main/sql/多租户技术方案.md @@ -128,6 +128,11 @@ ALTER TABLE `sales_management` ADD COLUMN `tenant_id` VARCHAR(36) NULL COMMENT '租户ID' AFTER `id`, ADD INDEX `idx_sm_tenant_sales` (`tenant_id`, `sales_id`); +ALTER TABLE `device_management` + ADD COLUMN `tenant_id` VARCHAR(36) NULL COMMENT '租户ID' AFTER `id`, + ADD INDEX `idx_dm_tenant_device_management` (`tenant_id`, `id`); + + -- ====================== -- 门店与项目类