|
@@ -47,12 +47,19 @@ public class OrderServiceBusinessImpl implements OrderServiceBusiness {
|
|
|
private final RedisUtil redisUtil;
|
|
|
|
|
|
@Override
|
|
|
- public StoreOrderVO orderDetail(Long id) {
|
|
|
+ public StoreOrderVO orderDetail(Long id ,String orderNo) {
|
|
|
StoreOrderVO vo = new StoreOrderVO();
|
|
|
- StoreOrder storeOrder = storeOrderService.findById(id);
|
|
|
+ StoreOrder storeOrder = null;
|
|
|
+ if(!ObjectUtils.isEmpty(id)){
|
|
|
+ storeOrder = storeOrderService.findById(id);
|
|
|
+ }else if(!ObjectUtils.isEmpty(orderNo)){
|
|
|
+ storeOrder = storeOrderService.findBy("orderId",orderNo);
|
|
|
+ }
|
|
|
+
|
|
|
if(ObjectUtils.isEmpty(storeOrder)){
|
|
|
throw new ServiceException("订单不存在 ID:"+id);
|
|
|
}
|
|
|
+ id =storeOrder.getId();
|
|
|
Condition infoCondition = new Condition(StoreOrderInfo.class);
|
|
|
Example.Criteria infoCriteria = infoCondition.createCriteria();
|
|
|
infoCriteria.andEqualTo("isDelete", 0);
|
|
@@ -170,6 +177,7 @@ public class OrderServiceBusinessImpl implements OrderServiceBusiness {
|
|
|
List<Map.Entry<Long, Long>> topCombinations = combinationCountMap.entrySet()
|
|
|
.stream()
|
|
|
.sorted(Map.Entry.<Long, Long>comparingByValue().reversed())
|
|
|
+ .limit(10)
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
List<StoreCombination> combinationList = storeCombinationService.findByIds(String.join(",", topCombinations.stream().map(Map.Entry::getKey).map(Object::toString).collect(Collectors.toList())));
|