录音统计,代码优化
This commit is contained in:
@@ -3,6 +3,7 @@ package com.rj;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -13,6 +14,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
*/
|
||||
@MapperScan("com.rj.mapper")
|
||||
@SpringBootApplication
|
||||
@EnableScheduling
|
||||
public class Langchain4jHeima20250803Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -87,3 +87,4 @@ public class PasswordUtil {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -71,3 +71,4 @@ public class ServiceManager {
|
||||
return reservationService;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -169,7 +169,6 @@ public class AudioManagementController {
|
||||
List<String> dealershipIds = DataEnrichmentUtil.extractIds(audioPage.getRecords(), AudioManagement::getDealershipId);
|
||||
List<String> saleIds = DataEnrichmentUtil.extractIds(audioPage.getRecords(), AudioManagement::getSalesId);
|
||||
List<String> projectIds = DataEnrichmentUtil.extractIds(audioPage.getRecords(), AudioManagement::getProjectId);
|
||||
List<String> customerIds = DataEnrichmentUtil.extractIds(audioPage.getRecords(), AudioManagement::getCustomerId);
|
||||
|
||||
|
||||
// 使用工具类批量获取关联数据
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.rj.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.rj.common.DataEnrichmentUtil;
|
||||
import com.rj.entity.AudioManagement;
|
||||
import com.rj.entity.VideoManagement;
|
||||
import com.rj.service.IVideoManagementService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -116,6 +118,11 @@ public class VideoManagementController {
|
||||
}
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private DataEnrichmentUtil dataEnrichmentUtil;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询视频列表
|
||||
*/
|
||||
@@ -157,7 +164,21 @@ public class VideoManagementController {
|
||||
queryWrapper.orderByDesc(VideoManagement::getCreateTime);
|
||||
|
||||
Page<VideoManagement> videoPage = videoManagementService.page(page, queryWrapper);
|
||||
|
||||
|
||||
// 使用工具类提取ID列表
|
||||
List<String> dealershipIds = DataEnrichmentUtil.extractIds(videoPage.getRecords(), VideoManagement::getDealershipId);
|
||||
List<String> salesIds = DataEnrichmentUtil.extractIds(videoPage.getRecords(), VideoManagement::getSalesId);
|
||||
|
||||
// 使用工具类批量获取关联数据
|
||||
Map<String, String> dealershipNameMap = dataEnrichmentUtil.getDealershipIdNameMap(dealershipIds);
|
||||
Map<String, String> saleNameMap = dataEnrichmentUtil.getSalesIdNameMap(salesIds);
|
||||
|
||||
videoPage.getRecords().forEach(video -> {
|
||||
video.setDealershipName(dealershipNameMap.get(video.getDealershipId()));
|
||||
video.setSalesName(saleNameMap.get(video.getSalesId()));
|
||||
});
|
||||
|
||||
|
||||
result.put("success", true);
|
||||
result.put("message", "查询成功");
|
||||
result.put("data", videoPage.getRecords());
|
||||
|
||||
@@ -170,3 +170,4 @@ public class AuthController {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -309,3 +309,4 @@ public class MenuController {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -279,3 +279,4 @@ public class RoleController {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -285,3 +285,4 @@ public class UserRoleController {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -36,3 +36,4 @@ public class LoginResponse {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -18,3 +18,4 @@ public interface IMenuService extends IService<Menu> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -18,3 +18,4 @@ public interface IRoleService extends IService<Role> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -18,3 +18,4 @@ public interface IUserRoleService extends IService<UserRole> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,3 +22,4 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IM
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,3 +22,4 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,3 +22,4 @@ public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> i
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user