Commit be82bb8a by caiyt

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

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