| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.fanli.lijin.manager.GoodsLijinMnager; |
| | | import org.springframework.core.task.TaskExecutor; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.yeshi.fanli.dto.ConfigParamsDTO; |
| | | import com.yeshi.fanli.dto.GoodsMoneyConfigParamsDTO; |
| | | import com.yeshi.fanli.entity.accept.AcceptData; |
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsClass; |
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSubClass; |
| | |
| | | @Resource |
| | | private TaoBaoGoodsUpdateService taoBaoGoodsUpdateService; |
| | | |
| | | @Resource |
| | | private GoodsLijinMnager goodsLijinMnager; |
| | | |
| | | /** |
| | | * 一级分类 |
| | | * |
| | |
| | | * 分类下的精选商品 |
| | | */ |
| | | @RequestMapping("getClassGoods") |
| | | public void getClassGoods(AcceptData acceptData, long gcid, int page, PrintWriter out) { |
| | | public void getClassGoods(AcceptData acceptData, Long uid, long gcid, int page, PrintWriter out) { |
| | | GoodsClass goodsClass = goodsClassService.getGoodsClassCache(gcid); |
| | | if (goodsClass == null) { |
| | | out.print(JsonUtil.loadFalseResult("不存在该分类")); |
| | |
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()) |
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create(); |
| | | |
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), |
| | | GoodsMoneyConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), |
| | | acceptData.getVersion(),acceptData.getSystem()); |
| | | |
| | | // 精选库数据 |
| | | JSONArray array = new JSONArray(); |
| | | List<TaoBaoGoodsBrief> goodsBriefs = new ArrayList<>(); |
| | | for (QualityFactory selectionGoods : listQuery) { |
| | | TaoBaoGoodsBrief taoBaoGoodsBrief = selectionGoods.getTaoBaoGoodsBrief(); |
| | | if (taoBaoGoodsBrief == null) { |
| | | continue; |
| | | } |
| | | updateGoodsList.add(taoBaoGoodsBrief); |
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, paramsDTO); |
| | | array.add(gson.toJson(goodsDetailVO)); |
| | | goodsBriefs.add(taoBaoGoodsBrief); |
| | | } |
| | | |
| | | List<GoodsDetailVO> voList = goodsLijinMnager.loadTBMoneyInfo(acceptData.getSystem(), uid, goodsBriefs, paramsDTO); |
| | | for (GoodsDetailVO vo : voList) |
| | | array.add(gson.toJson(vo)); |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("nav", null); |
| | |
| | | * @param page |
| | | * @param scid |
| | | * @param filter |
| | | * @param order |
| | | * 来源:【推荐:0 | 综合:4 、综合只看有券 1 、综合只看天猫 1 | 价格:低到高3 高到低2 | 销量:1】 |
| | | * @param order 来源:【推荐:0 | 综合:4 、综合只看有券 1 、综合只看天猫 1 | 价格:低到高3 高到低2 | 销量:1】 |
| | | * 排序值:【销量由高到低: 1 ; 销量由低到高 5; 价格从高到低: 2 ; 价格从低到高:3 ; 推广量高到低:4 ; |
| | | * 其他默认: 销量由高到低】 |
| | | * |
| | | * @param startprice |
| | | * 起始价格 |
| | | * @param endprice |
| | | * 结束价格 |
| | | * @param fastFilter |
| | | * fastFilter 有券 [{"type":"quantype"}] 天猫商品 [{"type":"shoptype"}] |
| | | * @param totalSales |
| | | * 销量以上 |
| | | * @param startprice 起始价格 |
| | | * @param endprice 结束价格 |
| | | * @param fastFilter fastFilter 有券 [{"type":"quantype"}] 天猫商品 [{"type":"shoptype"}] |
| | | * @param totalSales 销量以上 |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "getSubGoods", method = RequestMethod.POST) |
| | | public void getSecondClassGoods(AcceptData acceptData, int page, long scid, String filter, String order, |
| | | public void getSecondClassGoods(AcceptData acceptData, Long uid, int page, long scid, String filter, String order, |
| | | String startprice, String endprice, String fastFilter, Integer totalSales, PrintWriter out) { |
| | | |
| | | try { |
| | |
| | | |
| | | JSONArray array = new JSONArray(); |
| | | if (resultGoodsList != null) { |
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), |
| | | GoodsMoneyConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), |
| | | acceptData.getVersion(),acceptData.getSystem()); |
| | | for (TaoBaoGoodsBrief goods : resultGoodsList) { |
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO); |
| | | array.add(gson2.toJson(goodsDetailVO)); |
| | | List<GoodsDetailVO> voList = goodsLijinMnager.loadTBMoneyInfo(acceptData.getSystem(), uid, resultGoodsList, paramsDTO); |
| | | for (GoodsDetailVO vo : voList) { |
| | | array.add(gson2.toJson(vo)); |
| | | } |
| | | } |
| | | JSONObject result = new JSONObject(); |