use of co.yixiang.modules.activity.domain.YxStoreCouponUser in project yshopmall by guchengwuyue.
the class YxStoreCouponUserServiceImpl method queryAll.
@Override
public // @Cacheable
Map<String, Object> queryAll(YxStoreCouponUserQueryCriteria criteria, Pageable pageable) {
getPage(pageable);
PageInfo<YxStoreCouponUser> page = new PageInfo<>(queryAll(criteria));
List<YxStoreCouponUserDto> storeOrderDTOS = generator.convert(page.getList(), YxStoreCouponUserDto.class);
for (YxStoreCouponUserDto couponUserDTO : storeOrderDTOS) {
YxUser yxUser = userService.getOne(new LambdaQueryWrapper<YxUser>().eq(YxUser::getUid, couponUserDTO.getUid()));
if (yxUser == null) {
couponUserDTO.setNickname("--");
continue;
}
couponUserDTO.setNickname(yxUser.getNickname());
}
Map<String, Object> map = new LinkedHashMap<>(2);
map.put("content", storeOrderDTOS);
map.put("totalElements", page.getTotal());
return map;
}
Aggregations