Commit be82bb8a by caiyt

修复redis读取pickCode为空的问题,增加微信回调内容打印

parent 08790613
......@@ -92,8 +92,10 @@ public class OrderServiceImpl implements IOrderService {
public Order selectOrderById(Long id) {
Order order = orderMapper.selectOrderById(id);
order.setShop(shopMapper.selectShopById(order.getShopId()));
if (!StringUtils.isEmpty(order.getPickCode())) {
String pickCode = stringRedisTemplate.opsForValue().get(order.getPickCode());
order.setPickCode(pickCode);
}
OrderSnapshot orderSnapshot = orderSnapshotService.selectOrderSnapshotByOrderId(order.getId());
String snapshot = orderSnapshot.getSnapshot();
List<OrderDetail> orderDetails = JSONObject.parseArray(snapshot, OrderDetail.class);
......@@ -615,8 +617,10 @@ public class OrderServiceImpl implements IOrderService {
String waitTime = getWaitTimeByOrderId(order.getId());
Map<String, String> map = new HashMap<>();
map.put("waitTime", waitTime);
if (StringUtils.isNotEmpty(order.getPickCode())) {
String pickCode = stringRedisTemplate.opsForValue().get(order.getPickCode());
map.put("pickCode", pickCode);
}
map.put("orderNum", order.getOrderNum());
map.put("state", order.getState());
return map;
......
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