完善收藏足迹

This commit is contained in:
xuwenbo
2020-09-03 16:15:59 +08:00
parent 877daeb6fd
commit 214d999353
4 changed files with 14 additions and 9 deletions

View File

@ -68,7 +68,7 @@ public class YxStoreProductRelationServiceImpl extends BaseServiceImpl<YxStorePr
@Override
public List<YxStoreProductRelationQueryVo> userCollectProduct(int page, int limit, Long uid,String type) {
Page<YxStoreProductRelation> pageModel = new Page<>(page, limit);
List<YxStoreProductRelationQueryVo> list = yxStoreProductRelationMapper.selectList(pageModel,uid,type);
List<YxStoreProductRelationQueryVo> list = yxStoreProductRelationMapper.selectRelationList(pageModel,uid,type);
return list;
}
@ -139,7 +139,7 @@ public class YxStoreProductRelationServiceImpl extends BaseServiceImpl<YxStorePr
PageResult<YxStoreProductRelationDto> relationDtoPageResult = generator.convertPageInfo(page, YxStoreProductRelationDto.class);
relationDtoPageResult.getContent().forEach(i ->{
i.setProduct(storeProductService.getById(i.getProductId()));
i.setUserName(userService.getYxUserById(i.getUid()).getUsername());
i.setUserName(userService.getYxUserById(i.getUid()).getNickname());
});
return relationDtoPageResult;
}

View File

@ -34,7 +34,7 @@ public interface YxStoreProductRelationMapper extends CoreMapper<YxStoreProductR
"B.ot_price as otPrice,B.sales,B.image,B.is_show as isShow" +
" from yx_store_product_relation A left join yx_store_product B " +
"on A.product_id = B.id where A.type=#{type} and A.uid=#{uid} and A.is_del = 0 and B.is_del = 0 order by create_time desc")
List<YxStoreProductRelationQueryVo> selectList(Page page, @Param("uid") Long uid,@Param("type") String type);
List<YxStoreProductRelationQueryVo> selectRelationList(Page page, @Param("uid") Long uid, @Param("type") String type);
}