diff --git a/src/main/java/com/kiisoo/ic/common/utils/RedisUtil.java b/src/main/java/com/kiisoo/ic/common/utils/RedisUtil.java index 2c3df50..4f97b52 100644 --- a/src/main/java/com/kiisoo/ic/common/utils/RedisUtil.java +++ b/src/main/java/com/kiisoo/ic/common/utils/RedisUtil.java @@ -654,15 +654,15 @@ public class RedisUtil { * @return */ public Object getCustomerId(Long customerId, Long staffId, Long shopId){ - return hget(customerId + "_" + staffId, shopId + ""); + return hget("CUSTOMERID_"+customerId + "_" + staffId, shopId + ""); } public void setCustomerId(Long customerId, Long staffId, Long shopId, Long val){ - hset(customerId + "_" + staffId, shopId + "", val); + hset("CUSTOMERID_"+customerId + "_" + staffId, shopId + "", val); } public void removeCustomerId(Long customerId, Long staffId, Long shopId){ - hdel(customerId + "_" + staffId, shopId + ""); + hdel("CUSTOMERID_"+customerId + "_" + staffId, shopId + ""); } /** @@ -700,12 +700,12 @@ public class RedisUtil { * @return 返回客户ID */ public Long getExternalUserId(String externalUserId){ - Object obj = get(externalUserId); + Object obj = get("EXTERNALUSERID_"+externalUserId); return obj == null ? 0L : Long.parseLong(obj.toString()); } public void setExternalUserId(String externalUserId, Long customerId){ - set(externalUserId, customerId); + set("EXTERNALUSERID_"+externalUserId, customerId); } public void batchAddExternalUserIdKey(List dataList) { @@ -714,7 +714,7 @@ public class RedisUtil { @Override public List doInRedis(RedisConnection connection) throws DataAccessException { for (OpCustomer opCustomer : dataList) { - connection.set(opCustomer.getExternalUserid().getBytes(), opCustomer.getId().toString().getBytes()); + connection.set(("EXTERNALUSERID_"+opCustomer.getExternalUserid()).getBytes(), opCustomer.getId().toString().getBytes()); } return null; } @@ -728,7 +728,7 @@ public class RedisUtil { @Override public List doInRedis(RedisConnection connection) throws DataAccessException { for (OpSellerCustomerRelation item : dataList) { - String key = item.getCustomerId() + "_" + item.getUserId(); + String key = "CUSTOMERID_"+item.getCustomerId() + "_" + item.getUserId(); connection.hSet(key.getBytes(), item.getStoreId().toString().getBytes(), item.getId().toString().getBytes()); } return null;