| | |
| | | import com.google.gson.JsonPrimitive; |
| | | import com.google.gson.JsonSerializationContext; |
| | | import com.google.gson.JsonSerializer; |
| | | import com.yeshi.fanli.dto.ConfigParamsDTO; |
| | | import com.yeshi.fanli.dto.GoodsMoneyConfigParamsDTO; |
| | | import com.yeshi.fanli.dto.WXMPAcceptData; |
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsDetail; |
| | | import com.yeshi.fanli.entity.goods.CollectionGoodsV2; |
| | |
| | | * |
| | | * @param acceptData |
| | | * @param uid |
| | | * @param id |
| | | * @param type |
| | | * @param goodsType |
| | | * @param out |
| | | */ |
| | | @RequestMapping("collectionGoods") |
| | | public void collectionGoods(WXMPAcceptData acceptData, Long uid, Long goodsId, int type, Integer goodsType, |
| | | public void collectionGoods(WXMPAcceptData acceptData, Long uid, String goodsId, int type, Integer goodsType, |
| | | PrintWriter out) { |
| | | try { |
| | | if (goodsType == null || goodsType < 2 || goodsType > 3) { |
| | |
| | | List<GoodsDetailVO> list = new ArrayList<GoodsDetailVO>(); |
| | | |
| | | if (collectionGoodsList != null && collectionGoodsList.size() > 0) { |
| | | List<Long> listGid = new ArrayList<Long>(); |
| | | List<String> listGid = new ArrayList<>(); |
| | | for (CollectionGoodsV2 collectionGoodsV2 : collectionGoodsList) { |
| | | CommonGoods commonGoods = collectionGoodsV2.getCommonGoods(); |
| | | if (commonGoods == null || commonGoods.getGoodsType() != Constant.SOURCE_TYPE_TAOBAO) { |
| | |
| | | } |
| | | } |
| | | |
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), |
| | | GoodsMoneyConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), |
| | | acceptData.getVersion(),acceptData.getSystem()); |
| | | |
| | | |
| | |
| | | if (listTaoKeGoods != null && listTaoKeGoods.size() > 0 |
| | | && commonGoods.getGoodsType() == Constant.SOURCE_TYPE_TAOBAO) { |
| | | int state = 1; // 默认停售 |
| | | Long goodsId = commonGoods.getGoodsId(); |
| | | String goodsId = commonGoods.getGoodsId(); |
| | | for (TaoBaoGoodsBrief taoKeGoods : listTaoKeGoods) { |
| | | Long auctionId = taoKeGoods.getAuctionId(); |
| | | String auctionId = taoKeGoods.getAuctionId(); |
| | | if (goodsId == auctionId || goodsId.equals(auctionId)) { |
| | | state = 0; // 在售 |
| | | break; |
| | |
| | | JSONArray array = new JSONArray(); |
| | | if (list != null && list.size() > 0) { |
| | | Gson gson = gsonBuilder.create(); |
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), |
| | | GoodsMoneyConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), |
| | | acceptData.getVersion(),acceptData.getSystem()); |
| | | for (ScanHistoryV2 sh : list) { |
| | | CommonGoods commonGoods = sh.getCommonGoods(); |