mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-10 21:19:00 +08:00
🐛 Fixing a bug. #793 租户查询缓存问题
This commit is contained in:
1 parent
cec6c67d93
commit
8904c39e81
4 files changed
+5
-5
No files matched your search
+1
-1
@@ -698,7 +698,7 @@ CREATE TABLE `sys_tenant` (
|
||||
-- Records of sys_tenant
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_tenant` VALUES (1, '北京分公司', '1', '2019-05-15 00:00:00', '2020-05-15 00:00:00', '0', '0', '2019-05-15 15:44:57', '2019-05-18 14:47:30');
|
||||
INSERT INTO `sys_tenant` VALUES (1, '北京分公司', '1', '2019-05-15 00:00:00', '2029-05-15 00:00:00', '0', '0', '2019-05-15 15:44:57', '2019-05-18 14:47:30');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<artifactId>pigx-cloud-dependencies-parent</artifactId>
|
||||
<groupId>com.pig4cloud</groupId>
|
||||
<version>Hoxton.SR1</version>
|
||||
<version>Hoxton.SR2</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
|
||||
+2
-2
@@ -126,8 +126,8 @@ public class SysTenantController {
|
||||
public R list() {
|
||||
List<SysTenant> tenants = sysTenantService.getNormalTenant()
|
||||
.stream()
|
||||
.filter(tenant -> tenant.getStartTime().isAfter(LocalDate.now()))
|
||||
.filter(tenant -> tenant.getEndTime().isBefore(LocalDate.now()))
|
||||
.filter(tenant -> tenant.getStartTime().isBefore(LocalDate.now()))
|
||||
.filter(tenant -> tenant.getEndTime().isAfter(LocalDate.now()))
|
||||
.collect(Collectors.toList());
|
||||
return R.ok(tenants);
|
||||
}
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
|
||||
@Override
|
||||
@Cacheable(value = CacheConstants.TENANT_DETAILS)
|
||||
public List<SysTenant> getNormalTenant() {
|
||||
return list(Wrappers.<SysTenant>lambdaQuery()
|
||||
return baseMapper.selectList(Wrappers.<SysTenant>lambdaQuery()
|
||||
.eq(SysTenant::getStatus, CommonConstants.STATUS_NORMAL));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user