use of com.albedo.java.plugins.database.mybatis.conditions.query.LbqWrapper in project albedo by somowhere.
the class ApplicationServiceImpl method getByClient.
@Override
public ApplicationDo getByClient(String clientId, String clientSecret) {
LbqWrapper<ApplicationDo> wrapper = Wraps.<ApplicationDo>lbQ().select(ApplicationDo::getId).eq(ApplicationDo::getClientId, clientId).eq(ApplicationDo::getClientSecret, clientSecret);
Function<CacheKey, Object> loader = k -> super.getObj(wrapper, Convert::toLong);
CacheKey cacheKey = new ApplicationClientCacheKeyBuilder().key(clientId, clientSecret);
return getByKey(cacheKey, loader);
}
Aggregations