package com.platform.verification; import com.alibaba.fastjson.JSONObject; import com.hx.redis.RedisUtil; import com.hx.util.DateUtil; import com.hx.util.StringUtils; import com.hx.util.rsa.RSAUtil; import com.platform.entity.ThirtApplication; import com.platform.resultTool.PlatformCode; import com.platform.resultTool.PlatformResult; import java.text.SimpleDateFormat; import java.util.Date; /**应用转化 * @author CJH * @date 2021-10-20 */ public class ApplicationTool { /**获取应用在redis上面的数据 * @param appId 用户的APPID ` * @param redisUtil redisUtil * @return */ public static ThirtApplication jsonToEntity(String appId, RedisUtil redisUtil){ if (StringUtils.isEmpty(appId)) { return null; } JSONObject thirtApplication = (JSONObject) redisUtil.get(appId); //校验appid是否存在 if(thirtApplication == null){ return null; } ThirtApplication application = JSONObject.parseObject(thirtApplication.toString(),ThirtApplication.class); return application; } }