| | |
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.yeshi.fanli.dto.dataoke.DaTaoKeGoodsResult;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetailV2;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsService;
|
| | | import com.yeshi.fanli.util.dataoke.DaTaoKeApiUtil;
|
| | | import com.yeshi.fanli.util.taobao.DaTaoKeUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | |
|
| | |
| | | subId = null;
|
| | |
|
| | | TaoBaoGoodsBriefExtra goods = null;
|
| | | List<DaTaoKeDetail> detailList = null;
|
| | | List<DaTaoKeDetailV2> detailList = null;
|
| | | if (cid == 1) {
|
| | | detailList = daTaoKeGoodsService.getCurrentHotSalesRankGoodsList();
|
| | | DaTaoKeGoodsResult result = DaTaoKeApiUtil.getRankingList(DaTaoKeApiUtil.RANK_TYPE_HOT, null);
|
| | | if (result != null)
|
| | | detailList = result.getGoodsList();
|
| | |
|
| | | } else if (cid == 2) {
|
| | | detailList = daTaoKeGoodsService.getCurrentSalesRankGoodsList(subId);
|
| | | DaTaoKeGoodsResult result = DaTaoKeApiUtil.getRankingList(DaTaoKeApiUtil.RANK_TYPE_TIME, subId);
|
| | | if (result != null)
|
| | | detailList = result.getGoodsList();
|
| | | } else {
|
| | | detailList = daTaoKeGoodsService.getCurrentDaySalesRankGoodsList(subId);
|
| | | DaTaoKeGoodsResult result = DaTaoKeApiUtil.getRankingList(DaTaoKeApiUtil.RANK_TYPE_DAY, subId);
|
| | | if (result != null)
|
| | | detailList = result.getGoodsList();
|
| | | }
|
| | |
|
| | | if (detailList == null)
|
| | |
| | | List<TaoBaoGoodsBriefExtra> list = new ArrayList<TaoBaoGoodsBriefExtra>();
|
| | | BigDecimal proportion = hongBaoManageService.getFanLiRate();
|
| | | if (detailList != null)
|
| | | for (DaTaoKeDetail detail : detailList) {
|
| | | for (DaTaoKeDetailV2 detail : detailList) {
|
| | | goods = TaoBaoUtil.getTaoBaoGoodsBriefExtra(TaoBaoUtil.convert(detail), proportion.toString(),
|
| | | null);
|
| | | if (cid == 2)
|
| | |
| | | goods.setSalesType(1);
|
| | | list.add(goods);
|
| | | }
|
| | | |
| | |
|
| | | LogHelper.test("最终商品数据:" + list.size());
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", detailList.size());
|