|
|
|
@ -1639,31 +1639,55 @@ public class JcskInvoiceApiServiceImpl implements IInvoiceApiService { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 用户信息处理 |
|
|
|
|
* 获取登记用户信息 |
|
|
|
|
*/ |
|
|
|
|
public InvoiceAllYhdj getUserInfo(Companyservice companyservice) { |
|
|
|
|
|
|
|
|
|
String identity = companyservice.getIdentity(); |
|
|
|
|
String sellertax = companyservice.getSellertax(); |
|
|
|
|
|
|
|
|
|
String key = WebServiceConstant.TOKEN_KEY + sellertax + "_"+ identity; |
|
|
|
|
|
|
|
|
|
RedisCache redisCache = SpringUtils.getBean(RedisCache.class); |
|
|
|
|
JSONObject yhdjObj = redisCache.getCacheObject(WebServiceConstant.TOKEN_KEY + sellertax + "_"+ identity); |
|
|
|
|
cn.hutool.json.JSONObject yhdjObj = redisCache.getCacheObject(key); |
|
|
|
|
|
|
|
|
|
// TODO: 2023/5/17
|
|
|
|
|
// JSONObject obj = JSONObject.parseObject(info);
|
|
|
|
|
// Long exprieTime = System.currentTimeMillis();
|
|
|
|
|
// exprieTime = exprieTime + (int) obj.get("expires_in") * 1000L; // 过期时间
|
|
|
|
|
// obj.put("exprieTime", exprieTime);
|
|
|
|
|
// redisCache.setCacheObject(ElephantConstants.TOKEN_REDIS_KEY + "appkey:" + appkey, obj);
|
|
|
|
|
if(JSONUtil.isNull(yhdjObj)){ |
|
|
|
|
// 查询用户登记参数
|
|
|
|
|
QueryWrapper<InvoiceAllYhdj> yhdjQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
yhdjQueryWrapper.eq("nsrsbh", sellertax); |
|
|
|
|
yhdjQueryWrapper.eq("identity", identity); |
|
|
|
|
InvoiceAllYhdj invoiceAllYhdj = yhdjMapper.selectOne(yhdjQueryWrapper); |
|
|
|
|
|
|
|
|
|
// 查询用户登记参数
|
|
|
|
|
QueryWrapper<InvoiceAllYhdj> yhdjQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
yhdjQueryWrapper.eq("nsrsbh", sellertax); |
|
|
|
|
yhdjQueryWrapper.eq("identity", identity); |
|
|
|
|
InvoiceAllYhdj invoiceAllYhdj = yhdjMapper.selectOne(yhdjQueryWrapper); |
|
|
|
|
cn.hutool.json.JSONObject obj = JSONUtil.parseObj(invoiceAllYhdj); |
|
|
|
|
Long exprieTime = System.currentTimeMillis(); // 过期时间
|
|
|
|
|
obj.put("exprieTime", exprieTime); |
|
|
|
|
redisCache.setCacheObject(key, obj); |
|
|
|
|
|
|
|
|
|
yhdjObj = obj; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return invoiceAllYhdj; |
|
|
|
|
return BeanUtil.copyProperties(yhdjObj,InvoiceAllYhdj.class); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|