Browse Source

授权

paid
richie 5 years ago
parent
commit
a6cf80e772
  1. 4
      src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableDataModel.java

4
src/main/java/com/fr/plugin/db/redis/core/RedisScriptTableDataModel.java

@ -1,6 +1,7 @@
package com.fr.plugin.db.redis.core; package com.fr.plugin.db.redis.core;
import com.fanruan.api.data.open.BaseDataModel; import com.fanruan.api.data.open.BaseDataModel;
import com.fr.plugin.context.PluginContexts;
import com.fr.plugin.db.redis.core.emb.Redis; import com.fr.plugin.db.redis.core.emb.Redis;
import com.fr.plugin.db.redis.core.script.EngineType; import com.fr.plugin.db.redis.core.script.EngineType;
import com.fr.plugin.db.redis.help.RedisClient; import com.fr.plugin.db.redis.help.RedisClient;
@ -37,6 +38,9 @@ public class RedisScriptTableDataModel extends BaseDataModel {
if (columnNames != null) { if (columnNames != null) {
return; return;
} }
if (!PluginContexts.currentContext().isAvailable()) {
throw new RuntimeException("Redis Plugin License Expired!");
}
Redis redis = mc.createRedisClient(); Redis redis = mc.createRedisClient();
redis.getClient().select(dbIndex); redis.getClient().select(dbIndex);
RedisClient redisClient = RedisClientSelector.select(redis, engineType); RedisClient redisClient = RedisClientSelector.select(redis, engineType);

Loading…
Cancel
Save