1. 部门的缓存刷新机制

This commit is contained in:
YunaiV
2021-01-23 11:29:28 +08:00
parent dc42f0f1bb
commit 7813c4019a
8 changed files with 154 additions and 21 deletions

View File

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import java.util.Date;
import java.util.List;
@Mapper
@@ -30,4 +31,9 @@ public interface SysDeptMapper extends BaseMapper<SysDeptDO> {
return selectCount(new QueryWrapper<SysDeptDO>().eq("parent_id", parentId));
}
default boolean selectExistsByUpdateTimeAfter(Date maxUpdateTime) {
return selectOne(new QueryWrapper<SysDeptDO>().select("id")
.gt("update_time", maxUpdateTime).last("LIMIT 1")) != null;
}
}