duhuizhe
2024-05-15 aa2c3d4deba76ade0958ff3ced88396e226a4964
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/RedisService.java
@@ -1,7 +1,7 @@
package com.nuvole.four.service;
import com.nuvole.four.domain.extend.AppDTO;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang3.StringEscapeUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.*;
@@ -57,7 +57,7 @@
            Map map = new HashMap();
            // todo xuekang
            // StringEscapeUtils.unescapeHtml4(key)
            map.put("key",StringEscapeUtils.unescapeHtml(key));
            map.put("key", StringEscapeUtils.unescapeHtml4(key));
            map.put("value",value);
            dto.setMap(map);
            AppDTO s = new AppDTO();
@@ -84,7 +84,7 @@
            ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue();
            AppDTO dto = new AppDTO();
            Map map = new HashMap();
            map.put("key",StringEscapeUtils.unescapeHtml(key));
            map.put("key",StringEscapeUtils.unescapeHtml4(key));
            map.put("value",value);
            map.put("expireTime",expireTime);
            map.put("timeUnit",timeUnit);
@@ -131,7 +131,7 @@
     */
    public void remove(final String key) {
        if (exists(key)) {
            redisTemplate.delete(StringEscapeUtils.unescapeHtml(key));
            redisTemplate.delete(StringEscapeUtils.unescapeHtml4(key));
        }
    }
@@ -144,7 +144,7 @@
    public boolean exists(final String key) {
        AppDTO dto = new AppDTO();
        Map map = new HashMap();
        map.put("key",StringEscapeUtils.unescapeHtml(key));
        map.put("key",StringEscapeUtils.unescapeHtml4(key));
        dto.setMap(map);
        AppDTO s = new AppDTO();
        BeanUtils.copyProperties(dto,s);
@@ -163,7 +163,7 @@
        ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue();
        AppDTO dto = new AppDTO();
        Map map = new HashMap();
        map.put("key",StringEscapeUtils.unescapeHtml(key));
        map.put("key",StringEscapeUtils.unescapeHtml4(key));
        dto.setMap(map);
        AppDTO s = new AppDTO();
        BeanUtils.copyProperties(dto,s);