| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.fanli.lijin.manager.GoodsLijinMnager; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | |
| | | * 用户相关商品 |
| | | * |
| | | * @author Administrator |
| | | * |
| | | */ |
| | | @Controller |
| | | @RequestMapping("api/v2/consumer") |
| | |
| | | |
| | | @Resource |
| | | private RedisManager redisManager; |
| | | |
| | | @Resource |
| | | private GoodsLijinMnager goodsLijinMnager; |
| | | |
| | | /** |
| | | * 收藏商品 |
| | |
| | | GoodsMoneyConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), |
| | | acceptData.getVersion(),acceptData.getSystem()); |
| | | |
| | | |
| | | List<CommonGoods> commonGoodsList=new ArrayList<>(); |
| | | |
| | | for (CollectionGoodsV2 collectionGoodsV2 : collectionGoodsList) { |
| | | CommonGoods commonGoods = collectionGoodsV2.getCommonGoods(); |
| | | if (commonGoods == null) { |
| | |
| | | commonGoods.setState(state); |
| | | } |
| | | |
| | | GoodsDetailVO detailVO = GoodsDetailVOFactory.convertCommonGoods(commonGoods, paramsDTO); |
| | | detailVO.setId(commonGoods.getId()); |
| | | detailVO.setCreatetime(collectionGoodsV2.getCreateTime()); |
| | | list.add(detailVO); |
| | | commonGoods.setCreateTime(collectionGoodsV2.getCreateTime()); |
| | | commonGoodsList.add(commonGoods); |
| | | } |
| | | |
| | | list=goodsLijinMnager.loadCommonGoodsMoneyInfo(acceptData.getSystem(),uid,commonGoodsList,paramsDTO); |
| | | } |
| | | |
| | | GsonBuilder builder = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() { |
| | |
| | | long count = scanHistoryV2Service.getCountByDeviceOrUid(uid, acceptData.getDevice(), goodsType, notBackSuVip); |
| | | |
| | | JSONArray array = new JSONArray(); |
| | | List<CommonGoods> commonGoodsList = new ArrayList<>(); |
| | | if (list != null && list.size() > 0) { |
| | | Gson gson = gsonBuilder.create(); |
| | | GoodsMoneyConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), |
| | |
| | | if (commonGoods == null) { |
| | | continue; |
| | | } |
| | | |
| | | GoodsDetailVO detailVO = GoodsDetailVOFactory.convertCommonGoods(commonGoods, paramsDTO); |
| | | |
| | | detailVO.setId(commonGoods.getId()); |
| | | detailVO.setCreatetime(sh.getCreateTime()); |
| | | array.add(gson.toJson(detailVO)); |
| | | commonGoods.setCreateTime(sh.getCreateTime()); |
| | | commonGoodsList.add(commonGoods); |
| | | } |
| | | List<GoodsDetailVO> goodsDetailVOS = goodsLijinMnager.loadCommonGoodsMoneyInfo(acceptData.getSystem(), uid, commonGoodsList, paramsDTO); |
| | | for (GoodsDetailVO vo : goodsDetailVOS) { |
| | | array.add(gson.toJson(vo)); |
| | | } |
| | | } |
| | | |