mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 04:39:00 +08:00
🐛 Fixing a bug. #793 租户查询缓存问题
This commit is contained in:
1 parent
e814feecab
commit
79823b6029
3 files changed
+5
-5
No files matched your search
+3
-3
@@ -124,10 +124,10 @@ public class SysTenantController {
|
||||
@Inner(value = false)
|
||||
@GetMapping("/list")
|
||||
public R list() {
|
||||
final LocalDate today = LocalDate.now();
|
||||
List<SysTenant> tenants = sysTenantService.getNormal()
|
||||
List<SysTenant> tenants = sysTenantService.getNormalTenant()
|
||||
.stream()
|
||||
.filter(sysTenant -> (sysTenant.getStartTime().isAfter(today) && sysTenant.getEndTime().isBefore(today)))
|
||||
.filter(tenant -> tenant.getStartTime().isAfter(LocalDate.now()))
|
||||
.filter(tenant -> tenant.getEndTime().isBefore(LocalDate.now()))
|
||||
.collect(Collectors.toList());
|
||||
return R.ok(tenants);
|
||||
}
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ public interface SysTenantService extends IService<SysTenant> {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SysTenant> getNormal();
|
||||
List<SysTenant> getNormalTenant();
|
||||
|
||||
/**
|
||||
* 保存租户
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
|
||||
*/
|
||||
@Override
|
||||
@Cacheable(value = CacheConstants.TENANT_DETAILS)
|
||||
public List<SysTenant> getNormal() {
|
||||
public List<SysTenant> getNormalTenant() {
|
||||
return list(Wrappers.<SysTenant>lambdaQuery()
|
||||
.eq(SysTenant::getStatus, CommonConstants.STATUS_NORMAL));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user