mirror of
https://github.com/zfile-dev/zfile.git
synced 2025-04-19 05:34:52 +00:00
Service 层修改为调用 JPA 的 Repository
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
package im.zhaojun.common.service;
|
||||
|
||||
import im.zhaojun.common.mapper.SystemConfigMapper;
|
||||
import im.zhaojun.common.model.SystemConfig;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import im.zhaojun.common.repository.SystemConfigRepository;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -11,10 +10,9 @@ import javax.annotation.Resource;
|
||||
public class SystemConfigService {
|
||||
|
||||
@Resource
|
||||
private SystemConfigMapper systemConfigMapper;
|
||||
private SystemConfigRepository systemConfigRepository;
|
||||
|
||||
@Cacheable("zfile")
|
||||
public SystemConfig getSystemConfig() {
|
||||
return systemConfigMapper.selectFirstConfig();
|
||||
return systemConfigRepository.findFirstBy();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user