| | |
| | | * @param auctionId |
| | | * @return |
| | | */ |
| | | public TaoBaoGoodsBrief getCommonTaoBaoGoodsInfo(long auctionId) { |
| | | public TaoBaoGoodsBrief getCommonTaoBaoGoodsInfo(String auctionId) { |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.taobaoGoodsCommon, auctionId + ""); |
| | | String value = redisManager.getCommonString(key); |
| | | if (!StringUtil.isNullOrEmpty(value)) { |
| | |
| | | * @param auctionId |
| | | * @return |
| | | */ |
| | | public boolean canAddToUpdateQueue(Long auctionId) { |
| | | public boolean canAddToUpdateQueue(String auctionId) { |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.taobaoQueue, auctionId + ""); |
| | | String value = redisManager.getCommonString(key); |
| | | if (StringUtil.isNullOrEmpty(value)) |
| | |
| | | * |
| | | * @param auctionId |
| | | */ |
| | | public void addAddToQueueHistory(Long auctionId) { |
| | | public void addAddToQueueHistory(String auctionId) { |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.taobaoQueue, auctionId + ""); |
| | | redisManager.cacheCommonString(key, "1", 60 * 60 * 2);// 有效期2个小时 |
| | | } |
| | |
| | | * @param actionId |
| | | * @return |
| | | */ |
| | | public boolean needUpdate(Long actionId) { |
| | | public boolean needUpdate(String actionId) { |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.taobaoUpdate, actionId + ""); |
| | | String value = redisManager.getCommonString(key); |
| | | if (StringUtil.isNullOrEmpty(value)) |
| | |
| | | * @param actionId |
| | | * @return |
| | | */ |
| | | public void addUpdateHistory(Long actionId) { |
| | | public void addUpdateHistory(String actionId) { |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.taobaoUpdate, actionId + ""); |
| | | redisManager.cacheCommonString(key, "1", 60 * 60 * 1);// 有效期1个小时 |
| | | } |
| | |
| | | * @param token |
| | | * @param auctionId |
| | | */ |
| | | public void saveTokenGoodsIdMap(String token, Long auctionId) { |
| | | public void saveTokenGoodsIdMap(String token, String auctionId) { |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.taobaoTokenGoodsMap, StringUtil.Md5(token)); |
| | | redisManager.cacheCommonString(key, auctionId + "", 60 * 30);// 有效期30分钟 |
| | | } |
| | |
| | | * @param token |
| | | * @return |
| | | */ |
| | | public Long getGoodsIdByToken(String token) { |
| | | public String getGoodsIdByToken(String token) { |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.taobaoTokenGoodsMap, StringUtil.Md5(token)); |
| | | String goodsId = redisManager.getCommonString(key); |
| | | if (StringUtil.isNullOrEmpty(goodsId)) |
| | | return null; |
| | | return Long.parseLong(goodsId); |
| | | return goodsId; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @Title: cacheBaseConvertLink |
| | | * @Description: |
| | | */ |
| | | public void cacheBaseConvertLink(Long auctionId, String pid, String link) { |
| | | public void cacheBaseConvertLink(String auctionId, String pid, String link) { |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.taobaoBaseLink, StringUtil.Md5(auctionId + "#" + pid)); |
| | | // |
| | | Calendar calendar = Calendar.getInstance(); |
| | |
| | | redisManager.cacheCommonString(key, link, second);// 有效期30分钟 |
| | | } |
| | | |
| | | public String getBaseConvertLink(Long auctionId, String pid) { |
| | | public String getBaseConvertLink(String auctionId, String pid) { |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.taobaoBaseLink, StringUtil.Md5(auctionId + "#" + pid)); |
| | | String url = redisManager.getCommonString(key); |
| | | |