| | |
| | | package com.yeshi.fanli.controller.client.v2;
|
| | |
|
| | | import java.io.PrintWriter;
|
| | | import java.math.BigDecimal;
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | |
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.yeshi.fanli.dto.ConfigParamsDTO;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSubClass;
|
| | |
| | | import com.yeshi.fanli.service.inter.goods.GoodsClassService;
|
| | | import com.yeshi.fanli.service.inter.goods.GoodsSubClassService;
|
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoClassService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.lable.LabelClassService;
|
| | | import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
|
| | | import com.yeshi.fanli.service.inter.lable.TaoKeGoodsService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderHongBaoMoneyComputeService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
| | | private TaoBaoClassService taoBaoClassService;
|
| | |
|
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | | private OrderHongBaoMoneyComputeService orderHongBaoMoneyComputeService;
|
| | |
|
| | | @Resource
|
| | | private LabelClassService labelClassService;
|
| | |
| | |
|
| | | List<TaoBaoGoodsBrief> updateGoodsList = new ArrayList<>();
|
| | |
|
| | | // 精选库数据为空时,网络进行查询
|
| | | if (listQuery == null || listQuery.size() == 0) {
|
| | | // 精选库数据小于10时,网络进行查询
|
| | | if (listQuery == null || listQuery.size() < 10) {
|
| | | long count = qualityGoodsService.countQueryClassId(gcid);
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | page = page - totalPage;
|
| | |
| | | filter.setPageSize(pageSize);
|
| | | filter.setCateIds(taoBaoCatIds);
|
| | |
|
| | | JSONObject result = taoKeGoodsService.searchWuLiaoV2(filter);
|
| | | JSONObject result = taoKeGoodsService.searchWuLiaoV2(filter,acceptData.getPlatform(),acceptData.getVersion());
|
| | | out.print(JsonUtil.loadTrueResult(result));
|
| | | return;
|
| | | }
|
| | |
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
|
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
|
| | |
|
| | | BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | |
|
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | |
| | | // 精选库数据
|
| | | JSONArray array = new JSONArray();
|
| | | for (QualityFactory selectionGoods : listQuery) {
|
| | |
| | | continue;
|
| | | }
|
| | | updateGoodsList.add(taoBaoGoodsBrief);
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, null, fanLiRate,
|
| | | shareRate);
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, paramsDTO);
|
| | | array.add(gson.toJson(goodsDetailVO));
|
| | | }
|
| | |
|
| | |
| | | .excludeFieldsWithoutExposeAnnotation().create();
|
| | |
|
| | | JSONArray array = new JSONArray();
|
| | | BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | | if (resultGoodsList != null)
|
| | | if (resultGoodsList != null) {
|
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | for (TaoBaoGoodsBrief goods : resultGoodsList) {
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(goods, null, fanLiRate,
|
| | | shareRate);
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO);
|
| | | array.add(gson2.toJson(goodsDetailVO));
|
| | | }
|
| | |
|
| | | }
|
| | | JSONObject result = new JSONObject();
|
| | | result.put("result", array);
|
| | | result.put("count", result.optLong("count") + count);
|
| | |
| | | taoKeGoodsService.setSearchFilter(searchfilter, filter, order, startprice, endprice, fastFilter,
|
| | | totalSales);
|
| | |
|
| | | JSONObject result = taoKeGoodsService.searchWuLiaoV2(searchfilter);
|
| | | JSONObject result = taoKeGoodsService.searchWuLiaoV2(searchfilter,acceptData.getPlatform(),acceptData.getVersion());
|
| | | out.print(JsonUtil.loadTrueResult(result));
|
| | | return;
|
| | | }
|