| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.hx.redis.RedisUtil; |
| | | import com.hx.redisson.config.RedissonUtil; |
| | | import com.hx.util.DateUtil; |
| | | import com.hx.util.StringUtils; |
| | | import com.hx.util.rsa.RSAUtil; |
| | |
| | | return application; |
| | | } |
| | | |
| | | /**获取应用在redis上面的数据 |
| | | * @param appId 用户的APPID ` |
| | | * @param redissonUtil RedissonUtil |
| | | * @return |
| | | */ |
| | | public static ThirtApplication jsonToEntity(String appId, RedissonUtil redissonUtil){ |
| | | |
| | | if (StringUtils.isEmpty(appId)) { |
| | | return null; |
| | | } |
| | | |
| | | JSONObject thirtApplication = (JSONObject) redissonUtil.get(appId); |
| | | |
| | | //校验appid是否存在 |
| | | if(thirtApplication == null){ |
| | | return null; |
| | | } |
| | | ThirtApplication application = JSONObject.parseObject(thirtApplication.toString(),ThirtApplication.class); |
| | | |
| | | return application; |
| | | } |
| | | |
| | | } |