| | |
| | | * @return
|
| | | */
|
| | | private int addBrandGoodsTB(BrandInfo brandInfo) {
|
| | | Date date = new Date();
|
| | | String shopKey = brandInfo.getShopKey();
|
| | | if (StringUtil.isNullOrEmpty(shopKey))
|
| | | shopKey = brandInfo.getName();
|
| | | 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);
|
| | |
| | | * @return
|
| | | */
|
| | | private int addBrandGoodsJD(BrandInfo brandInfo) {
|
| | | String shopKey = brandInfo.getShopKey();
|
| | | if (StringUtil.isNullOrEmpty(shopKey))
|
| | | shopKey = brandInfo.getName();
|
| | | 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.getSearchKey();
|
| | | 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);
|
| | |
| | | * @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();
|