首页 > 代码库 > redis取值报错

redis取值报错

 

> get "all_couriers_on_the_job"
(error) ERR Operation against a key holding the wrong kind of value
#类型不对,所以报错,先查看值的类型:
> type "all_couriers_on_the_job"
hash
> HGETALL "all_couriers_on_the_job"
 1) "47"
 2) "{\"id\":47,\"imagePath\":\"http://img.sxxxbao.com/xi/1449999870849.jpg\",\"name\":\"ccccc\",\"phone\":\"1381022771\",\"status\":\"3\",\"storeId\":2}"

 

redis取值报错