| | |
| | | * @return
|
| | | */
|
| | | private int addBrandGoodsTB(BrandInfo brandInfo) {
|
| | | Date date = new Date();
|
| | | String shopKey = brandInfo.getShopKey();
|
| | | if (StringUtil.isNullOrEmpty(shopKey)) {
|
| | | // 删除之前的
|
| | | brandGoodsCaheDao.removeByDate(brandInfo.getId(), 1 , date);
|
| | | |
| | | // 删除店铺
|
| | | brandShopCaheService.removeByDateAndType(brandInfo.getId(), 11, date);
|
| | | return 0;
|
| | | }
|
| | | |
| | | String searchKey = brandInfo.getSearchKey();
|
| | | if (StringUtil.isNullOrEmpty(searchKey))
|
| | | searchKey = brandInfo.getName();
|
| | |
|
| | | Date date = new Date();
|
| | | SearchFilter filter = new SearchFilter();
|
| | | filter.setKey(searchKey);
|
| | | filter.setPage(1);
|
| | |
| | | // 添加店铺
|
| | | String shopTitle = goods.getShopTitle();
|
| | | if (addShop && !StringUtil.isNullOrEmpty(shopTitle) && shopTitle.contains("旗舰店")
|
| | | && shopTitle.contains(brandInfo.getName())) {
|
| | | addShop = brandShopCaheService.addBrandShopTB(brandInfo.getId(), goods.getAuctionId(),
|
| | | && shopTitle.toLowerCase().contains(shopKey.toLowerCase())) {
|
| | | addShop = brandShopCaheService.addBrandShopTB(brandInfo, goods.getAuctionId(),
|
| | | goods.getSellerId());
|
| | | }
|
| | |
|
| | |
| | | * @return
|
| | | */
|
| | | private int addBrandGoodsJD(BrandInfo brandInfo) {
|
| | | String searchKey = brandInfo.getSearchKey();
|
| | | Date date = new Date();
|
| | | String shopKey = brandInfo.getShopKeyJD();
|
| | | if (StringUtil.isNullOrEmpty(shopKey)) {
|
| | | // 删除店铺
|
| | | brandShopCaheService.removeByDateAndType(brandInfo.getId(), 20, date);
|
| | | // 删除之前
|
| | | brandGoodsCaheDao.removeByDate(brandInfo.getId(), 2 , date);
|
| | | return 0;
|
| | | }
|
| | | |
| | | String searchKey = brandInfo.getSearchKeyJD();
|
| | | if (StringUtil.isNullOrEmpty(searchKey))
|
| | | searchKey = brandInfo.getName();
|
| | |
|
| | | int count = 0;
|
| | | JDSearchResult result = null;
|
| | | String way = configService.get("jd_api_search_key");
|
| | | Date date = new Date();
|
| | |
|
| | | // 删除店铺
|
| | | brandShopCaheService.removeByDateAndType(brandInfo.getId(), 20, date);
|
| | |
| | | if (addShop && shopInfo != null) {
|
| | | // 包含该品牌名称
|
| | | String shopName = shopInfo.getShopName();
|
| | | if (!StringUtil.isNullOrEmpty(shopName) && shopName.contains(brandInfo.getName())) {
|
| | | if (!StringUtil.isNullOrEmpty(shopName) && shopName.toLowerCase().contains(shopKey.toLowerCase())) {
|
| | | addShop = false;
|
| | | brandShopCaheService.addBrandShopJD(brandInfo, shopInfo);
|
| | | }
|
| | |
| | | * @return
|
| | | */
|
| | | private int addBrandGoodsPDD(BrandInfo brandInfo) {
|
| | | String searchKey = brandInfo.getSearchKey();
|
| | | Date date = new Date();
|
| | | String shopKey = brandInfo.getShopKeyPDD();
|
| | | if (StringUtil.isNullOrEmpty(shopKey)) {
|
| | | // 删除之前
|
| | | brandGoodsCaheDao.removeByDate(brandInfo.getId(), 3, date);
|
| | | // 删除之前店铺
|
| | | brandShopCaheService.removeByDateAndType(brandInfo.getId(), 30, date);
|
| | | return 0;
|
| | | }
|
| | | |
| | | String searchKey = brandInfo.getSearchKeyPDD();
|
| | | if (StringUtil.isNullOrEmpty(searchKey))
|
| | | searchKey = brandInfo.getName();
|
| | |
|
| | |
| | | PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter);
|
| | |
|
| | | int count = 0;
|
| | | Date date = new Date();
|
| | |
|
| | | if (result != null) {
|
| | | List<PDDGoodsDetail> goodsList = result.getGoodsList();
|