|
|
|
@ -164,9 +164,9 @@ public class ProductQueryServiceImpl implements ProductQueryService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<UserPageProductByCustomerGroupVo> getPageProductByCustomer() { |
|
|
|
public List<UserPageProductByCustomerGroupVo> getPageProductByCustomer(Long id) { |
|
|
|
List<UserPageProductByCustomerGroupVo> groupVoList = new ArrayList<>(); |
|
|
|
List<UserPageProductByCustomerExtendVo> extendVos = productViewDao.selectProductByCustomerList(); |
|
|
|
List<UserPageProductByCustomerExtendVo> extendVos = productViewDao.selectProductByCustomerList(id); |
|
|
|
Map<Long, List<UserPageProductByCustomerExtendVo>> extMap = extendVos.stream().collect(Collectors.groupingBy(UserPageProductByCustomerExtendVo::getId)); |
|
|
|
extMap.forEach((k, v) -> { |
|
|
|
UserPageProductByCustomerExtendVo extendVo = v.get(0); |
|
|
|
@ -185,6 +185,15 @@ public class ProductQueryServiceImpl implements ProductQueryService { |
|
|
|
return groupVoList; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public UserPageProductByCustomerGroupVo getPageProductByCustomerDetails(Long id) { |
|
|
|
List<UserPageProductByCustomerGroupVo> vos = getPageProductByCustomer(id); |
|
|
|
if(!vos.isEmpty()){ |
|
|
|
return vos.get(0); |
|
|
|
} |
|
|
|
return new UserPageProductByCustomerGroupVo(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 找出对应name的value |
|
|
|
|