代码优化
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
package com.njcn.access.utils;
|
||||
|
||||
import com.njcn.redis.pojo.enums.AppRedisKey;
|
||||
import com.njcn.redis.utils.RedisUtil;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -11,6 +14,9 @@ import java.util.List;
|
||||
@Component
|
||||
public class ChannelObjectUtil {
|
||||
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
/**
|
||||
* 将list转成对应实体
|
||||
* @param object
|
||||
@@ -42,4 +48,8 @@ public class ChannelObjectUtil {
|
||||
// 或者抛出异常,根据您的需求
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object getDeviceMid(String nDid) {
|
||||
return redisUtil.getObjectByKey(AppRedisKey.DEVICE_MID + nDid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user