Commit 137bf8de by 王祖波

缓存key

parent 93de13ef
...@@ -524,8 +524,8 @@ public class MaterialApiServiceImpl implements MaterialApiService { ...@@ -524,8 +524,8 @@ public class MaterialApiServiceImpl implements MaterialApiService {
if (StringUtils.isAnyBlank(combinedQDTO.getImageUrl(), combinedQDTO.getQrCodeUrl())) { if (StringUtils.isAnyBlank(combinedQDTO.getImageUrl(), combinedQDTO.getQrCodeUrl())) {
return com.gic.api.base.commons.ServiceResponse.failure("9999","参数异常") ; return com.gic.api.base.commons.ServiceResponse.failure("9999","参数异常") ;
} }
String unionString = combinedQDTO.getUnionString() + wxEnterpriseId; String unionString = combinedQDTO.getUnionString();
String key = ImageCombined.IMAGE_REDIS_KEY + UUID.nameUUIDFromBytes(unionString.getBytes(StandardCharsets.UTF_8)); String key = ImageCombined.IMAGE_REDIS_KEY + wxEnterpriseId + ":" + UUID.nameUUIDFromBytes(unionString.getBytes(StandardCharsets.UTF_8));
String cache = (String)RedisUtil.getCache(key); String cache = (String)RedisUtil.getCache(key);
if (StringUtils.isNotBlank(cache)) { if (StringUtils.isNotBlank(cache)) {
return com.gic.api.base.commons.ServiceResponse.success(cache); return com.gic.api.base.commons.ServiceResponse.success(cache);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment