提交 031cf119 编写于 作者: H haoxr

refactor: 缓存key调整

上级 4fec2319
......@@ -54,7 +54,7 @@ public class CartServiceImpl implements CartService {
*/
@Override
public boolean deleteCart() {
String key = OmsConstants.CART_PREFIX + SecurityUtils.getMemberId();
String key = OmsConstants.MEMBER_CART_PREFIX + SecurityUtils.getMemberId();
redisTemplate.delete(key);
return true;
}
......@@ -188,7 +188,7 @@ public class CartServiceImpl implements CartService {
* 获取第一层,即某个用户的购物车
*/
private BoundHashOperations getCartHashOperations(Long memberId) {
String cartKey = OmsConstants.CART_PREFIX + memberId;
String cartKey = OmsConstants.MEMBER_CART_PREFIX + memberId;
BoundHashOperations operations = redisTemplate.boundHashOps(cartKey);
return operations;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册