代码优化

This commit is contained in:
spllzh
2025-08-15 08:04:21 +08:00
parent 1d9d5ca2c4
commit 4e6af75be4
3 changed files with 597 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
package com.rj.common;
import com.rj.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* Service管理器
* 统一管理所有常用的Service注入减少Controller中的重复注入
*
* @author 系统生成
* @since 2025-08-07
*/
@Component
public class ServiceManager {
@Autowired
private IDealershipService dealershipService;
@Autowired
private IProjectManagementService projectManagementService;
@Autowired
private ISalesManagementService salesManagementService;
@Autowired
private ICustomerManagementService customerManagementService;
@Autowired
private IDeviceManagementService deviceManagementService;
@Autowired
private IAudioManagementService audioManagementService;
@Autowired
private IVideoManagementService videoManagementService;
@Autowired
private IReservationService reservationService;
// Getter方法
public IDealershipService getDealershipService() {
return dealershipService;
}
public IProjectManagementService getProjectManagementService() {
return projectManagementService;
}
public ISalesManagementService getSalesManagementService() {
return salesManagementService;
}
public ICustomerManagementService getCustomerManagementService() {
return customerManagementService;
}
public IDeviceManagementService getDeviceManagementService() {
return deviceManagementService;
}
public IAudioManagementService getAudioManagementService() {
return audioManagementService;
}
public IVideoManagementService getVideoManagementService() {
return videoManagementService;
}
public IReservationService getReservationService() {
return reservationService;
}
}