| | |
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.yeshi.fanli.dto.ConfigParamsDTO;
|
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.brand.BrandGoodsCahe;
|
| | |
| | |
|
| | | BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | |
|
| | | ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
|
| | | // 商品信息过滤
|
| | | listGoodsBrief = taoBaoGoodsUpdateService.filterImportantTaoBaoGoods(listGoodsBrief);
|
| | |
|
| | |
| | | continue;
|
| | | }
|
| | | }
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, null, fanLiRate,
|
| | | shareRate);
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, paramsDTO);
|
| | | array.add(gson.toJson(goodsDetailVO));
|
| | | }
|
| | | }
|
| | |
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | | // @RequestMapping(value = "getList", method = RequestMethod.POST)
|
| | | @RequestMapping(value = "getList", method = RequestMethod.POST)
|
| | | public void getList(AcceptData acceptData, Integer page, Long cid, Long uid, PrintWriter out) {
|
| | | if (Constant.IS_TEST) {
|
| | | getListV3(acceptData, page, cid, uid, out);
|
| | | return;
|
| | | }
|
| | | |
| | | |
| | | if (page == null || page < 1) {
|
| | | out.print(JsonUtil.loadFalseResult("页码不正确"));
|
| | | return;
|
| | |
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | | // @RequestMapping(value = "getShopInfoV2", method = RequestMethod.POST)
|
| | | @RequestMapping(value = "getShopInfoV2", method = RequestMethod.POST)
|
| | | public void getShopInfoV2(AcceptData acceptData, Integer page, Long id, Long uid, PrintWriter out) {
|
| | | |
| | | if (Constant.IS_TEST) {
|
| | | getShopInfoV3(acceptData, page, id, uid, out);
|
| | | return;
|
| | | }
|
| | |
|
| | | if (id == null) {
|
| | | out.print(JsonUtil.loadFalseResult("缺失店铺id"));
|
| | |
| | |
|
| | | BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | |
|
| | | ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
|
| | | // 商品信息过滤
|
| | | listGoodsBrief = taoBaoGoodsUpdateService.filterImportantTaoBaoGoods(listGoodsBrief);
|
| | |
|
| | |
| | | continue;
|
| | | }
|
| | | }
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, null, fanLiRate,
|
| | | shareRate);
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, paramsDTO);
|
| | | array.add(gson.toJson(goodsDetailVO));
|
| | | }
|
| | | }
|
| | |
| | | * 精选1, 足迹列表2
|
| | | * @param out
|
| | | */
|
| | | // @RequestMapping(value = "getHistoryV2", method = RequestMethod.POST)
|
| | | @RequestMapping(value = "getHistoryV2", method = RequestMethod.POST)
|
| | | public void getHistoryV2(AcceptData acceptData, Integer page, Long uid, Integer type, PrintWriter out) {
|
| | | if (Constant.IS_TEST) {
|
| | | getHistoryV3(acceptData, page, uid, type, out);
|
| | | return;
|
| | | }
|
| | | |
| | | if (type == null) {
|
| | | out.print(JsonUtil.loadFalseResult("类型不正确"));
|
| | | return;
|
| | |
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getList", method = RequestMethod.POST)
|
| | | // @RequestMapping(value = "getList", method = RequestMethod.POST)
|
| | | public void getListV3(AcceptData acceptData, Integer page, Long cid, Long uid, PrintWriter out) {
|
| | | if (page == null || page < 1) {
|
| | | out.print(JsonUtil.loadFalseResult("页码不正确"));
|
| | |
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getShopInfoV2", method = RequestMethod.POST)
|
| | | // @RequestMapping(value = "getShopInfoV2", method = RequestMethod.POST)
|
| | | public void getShopInfoV3(AcceptData acceptData, Integer page, Long id, Long uid, PrintWriter out) {
|
| | | if (id == null) {
|
| | | out.print(JsonUtil.loadFalseResult("缺失店铺id"));
|
| | |
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
|
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
|
| | |
|
| | | ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
|
| | | JSONArray array = new JSONArray();
|
| | | |
| | | List<BrandGoodsCahe> listGoods = brandGoodsCaheService.getByBrandId((page - 1) * 50, 50,id);
|
| | | for (BrandGoodsCahe brandGoods: listGoods) {
|
| | | JDGoods goodsJD = brandGoods.getGoodsJD();
|
| | | if (goodsJD != null) {
|
| | | array.add(gson.toJson(GoodsDetailVOFactory.convertJDGoods(goodsJD, fanLiRate, shareRate)));
|
| | | array.add(gson.toJson(GoodsDetailVOFactory.convertJDGoods(goodsJD, paramsDTO)));
|
| | | continue;
|
| | | }
|
| | |
|
| | | TaoBaoGoodsBrief goodsTB = brandGoods.getGoodsTB();
|
| | | if (goodsTB != null) {
|
| | | array.add(gson.toJson(GoodsDetailVOFactory.convertTaoBao(goodsTB, null, fanLiRate, shareRate)));
|
| | | array.add(gson.toJson(GoodsDetailVOFactory.convertTaoBao(goodsTB, paramsDTO)));
|
| | | continue;
|
| | | }
|
| | |
|
| | | PDDGoodsDetail goodsPDD = brandGoods.getGoodsPDD();
|
| | | if (goodsPDD != null) {
|
| | | array.add(gson.toJson(GoodsDetailVOFactory.convertPDDGoods(goodsPDD, fanLiRate, shareRate)));
|
| | | array.add(gson.toJson(GoodsDetailVOFactory.convertPDDGoods(goodsPDD, paramsDTO)));
|
| | | continue;
|
| | | }
|
| | | }
|
| | |
| | | * 精选1, 足迹列表2
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getHistoryV2", method = RequestMethod.POST)
|
| | | // @RequestMapping(value = "getHistoryV2", method = RequestMethod.POST)
|
| | | public void getHistoryV3(AcceptData acceptData, Integer page, Long uid, Integer type, PrintWriter out) {
|
| | | if (type == null) {
|
| | | out.print(JsonUtil.loadFalseResult("类型不正确"));
|