| | |
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.swing.colorchooser.AbstractColorChooserPanel;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
| | | @Controller
|
| | | @RequestMapping("api/v2/brand")
|
| | | public class BrandControllerV2 {
|
| | |
|
| | | @Resource
|
| | | private BrandClassService brandClassService;
|
| | |
|
| | | @Resource
|
| | | private BrandClassShopService brandClassShopService;
|
| | |
|
| | |
| | | if (page == null || page < 1) {
|
| | | page = 1;
|
| | | }
|
| | | JSONObject data = brandClassShopService.listEffectiveCacheV2(page, cid,acceptData.getPlatform(),acceptData.getVersion());
|
| | | JSONObject data = brandClassShopService.listEffectiveCacheV2(page, cid,acceptData.getPlatform(),acceptData.getVersion(),acceptData.getSystem());
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
|
| | |
|
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | acceptData.getVersion(),acceptData.getSystem());
|
| | | // 商品信息过滤
|
| | | listGoodsBrief = taoBaoGoodsUpdateService.filterImportantTaoBaoGoods(listGoodsBrief);
|
| | |
|
| | |
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | if (page == 1 && cid != null) {
|
| | | List<BrandInfo> brandlist = brandInfoService.listValidBrandInfoCache(cid);
|
| | | List<BrandInfo> brandlist = brandInfoService.listValidBrandInfoCache(cid,acceptData.getSystem());
|
| | | if(brandlist == null)
|
| | | brandlist = new ArrayList<BrandInfo>();
|
| | | data.put("brandlist", JsonUtil.getApiCommonGson().toJson(brandlist));
|
| | |
| | |
|
| | | long count = brandInfoService.countBrandInfo(cid);
|
| | |
|
| | | List<BrandInfoVO> list = brandInfoService.listBrandInfoCache((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, cid,acceptData.getPlatform(),acceptData.getVersion());
|
| | | List<BrandInfoVO> list = brandInfoService.listBrandInfoCache((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, cid,acceptData.getPlatform(),acceptData.getVersion(),acceptData.getSystem());
|
| | | if (list == null)
|
| | | list = new ArrayList<BrandInfoVO>();
|
| | |
|
| | |
| | | JSONObject data = new JSONObject();
|
| | | if (page == 1) {
|
| | | // 2、顶部轮播图
|
| | | List<BannerVO> oldtopPicList = swiperPictureService.getByBannerCardAndVersion("brand_picture",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
|
| | | List<BannerVO> oldtopPicList = swiperPictureService.getByBannerCardAndVersion("brand_picture",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()),acceptData.getSystem());
|
| | | if (oldtopPicList != null && oldtopPicList.size() > 0)
|
| | | topPicList.addAll(oldtopPicList);
|
| | | TaoBaoShop taoBaoShop = taoBaoShopService.selectByPrimaryKey(id);
|
| | |
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
|
| | |
|
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | acceptData.getVersion(),acceptData.getSystem());
|
| | | // 商品信息过滤
|
| | | listGoodsBrief = taoBaoGoodsUpdateService.filterImportantTaoBaoGoods(listGoodsBrief);
|
| | |
|
| | |
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | if (page == 1 && cid == null) { // 精选页banner
|
| | | List<BannerVO> banners = swiperPictureService.getByBannerCardAndVersion("brand_banners",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
|
| | | List<BannerVO> banners = swiperPictureService.getByBannerCardAndVersion("brand_banners",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()),acceptData.getSystem());
|
| | | if (banners == null)
|
| | | banners = new ArrayList<>();
|
| | | data.put("banners", JsonUtil.getApiCommonGson().toJson(banners));
|
| | | }
|
| | |
|
| | | if (page == 1 && cid != null) {
|
| | | List<BrandInfo> brandlist = brandInfoService.listValidByCidToApp(cid);
|
| | | List<BrandInfo> brandlist = brandInfoService.listValidByCidToApp(cid,acceptData.getSystem());
|
| | | if(brandlist == null)
|
| | | brandlist = new ArrayList<BrandInfo>();
|
| | | data.put("brandlist", JsonUtil.getApiCommonGson().toJson(brandlist));
|
| | | }
|
| | |
|
| | | long count = brandInfoService.countValidByCidToApp(cid);
|
| | | long count = brandInfoService.countValidByCidToApp(cid,acceptData.getSystem());
|
| | |
|
| | | List<BrandInfoVO> list = brandInfoService.listValidToApp((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, cid,acceptData.getPlatform(),acceptData.getVersion());
|
| | | List<BrandInfoVO> list = brandInfoService.listValidToApp((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, cid,acceptData.getPlatform(),acceptData.getVersion(), acceptData.getSystem());
|
| | | if (list == null)
|
| | | list = new ArrayList<BrandInfoVO>();
|
| | |
|
| | |
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
|
| | |
|
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | acceptData.getVersion(),acceptData.getSystem());
|
| | | JSONArray array = new JSONArray();
|
| | |
|
| | | List<BrandGoodsCahe> listGoods = brandGoodsCaheService.getByBrandId((page - 1) * 50, 50,id);
|
| | |
| | | if (page == 1 && array.size() > 0) {
|
| | | // 2、顶部轮播图
|
| | | List<BannerVO> topPicList = new ArrayList<>();
|
| | | List<BannerVO> oldtopPicList = swiperPictureService.getByBannerCardAndVersion("brand_picture",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
|
| | | List<BannerVO> oldtopPicList = swiperPictureService.getByBannerCardAndVersion("brand_picture",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()),acceptData.getSystem());
|
| | | if (oldtopPicList != null && oldtopPicList.size() > 0)
|
| | | topPicList.addAll(oldtopPicList);
|
| | |
|