Commit d06db564 by weijiguang

Merge remote-tracking branch 'origin/v2' into v2

parents 6c33c84c 28bcd52d
......@@ -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()));
String pickCode = stringRedisTemplate.opsForValue().get(order.getPickCode());
order.setPickCode(pickCode);
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);
String pickCode = stringRedisTemplate.opsForValue().get(order.getPickCode());
map.put("pickCode", pickCode);
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