Commit 797b9deb authored by muhong's avatar muhong

新增 小程序收藏接口

parent 41f6cc6f
......@@ -82,7 +82,17 @@ public class FavoritesServiceImpl implements FavoritesService {
AgentTranceResponseVo agentTranceResponseVo = new AgentTranceResponseVo();
agentTranceResponseVo.setAgentTraceInfo_("");
agentTranceResponseVo.setViewType(2);
agentTranceResponseVo.setDetail(favorites);
FavoritesResponseVo vo = new FavoritesResponseVo();
vo.setId(favorites.getId());
vo.setTitle(favorites.getTitle());
vo.setDescription(favorites.getDescription());
vo.setSort(favorites.getSort());
vo.setDeleted(favorites.getDeleted());
vo.setAddTime(favorites.getAddTime());
vo.setImages(favorites.getImages());
vo.setUpdateTime(favorites.getUpdateTime());
vo.setCount(favoritesItemsRelationDao.countByFavoritesId(favorites.getId()));
agentTranceResponseVo.setDetail(vo);
list.add(agentTranceResponseVo);
}
page.setTotal(favoritesPage.getTotal());
......
......@@ -156,6 +156,7 @@ public class WxFavoritesController {
String json = klDataRequestDto.getKl_data();
logger.info("【请求开始】收藏册下藏品列表分页查询,请求参数,kl_data:{}", json);
String id = JsonUtils.getValueByPath(json, "id");
String userId = JsonUtils.getValueByPath(json, "userId");
String page = JsonUtils.getValueByPath(json, "page");
String size = JsonUtils.getValueByPath(json, "size");
if (StringUtils.isBlank(id)) {
......@@ -169,7 +170,8 @@ public class WxFavoritesController {
}
FavoritesRequestDto dto = new FavoritesRequestDto();
dto.setUserId(Long.parseLong(id));
dto.setId(Long.parseLong(id));
dto.setUserId(Long.parseLong(userId));
dto.setPage(Integer.parseInt(page));
dto.setSize(Integer.parseInt(size));
return favoritesService.itemList(dto);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment