订单列表 返回 店铺名称
This commit is contained in:
parent
209ee68153
commit
d525b078bc
|
|
@ -37,6 +37,10 @@ public class OrderInfoVo implements Serializable {
|
|||
* 店铺Id
|
||||
*/
|
||||
private String shopId;
|
||||
/**
|
||||
* 店铺名称
|
||||
*/
|
||||
private String shopName;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ import java.util.*;
|
|||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.apache.dubbo.registry.zookeeper.util.CuratorFrameworkParams.MAX_RETRIES;
|
||||
|
||||
|
|
@ -119,6 +120,8 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||
|
||||
@Override
|
||||
public Page<OrderInfoVo> getOrderByPage(OrderInfoQueryDTO param) {
|
||||
List<ShopInfo> list = shopInfoService.list(QueryWrapper.create().select(ShopInfo::getId, ShopInfo::getShopName));
|
||||
Map<Long, String> shopMap = list.stream().collect(Collectors.toMap(ShopInfo::getId, ShopInfo::getShopName));
|
||||
String productName = param.getProductName();
|
||||
List<Long> like = null;
|
||||
if (StrUtil.isNotBlank(productName)) {
|
||||
|
|
@ -151,6 +154,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||
.eq(OrderDetail::getOrderId, s.getId())
|
||||
.listAs(OrderDetailSmallVO.class);
|
||||
s.setGoods(orderDetails);
|
||||
s.setShopName(shopMap.get(Long.parseLong(s.getShopId())));
|
||||
});
|
||||
return orderInfoVoPage;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue