| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.brand.BrandShopCaheDao;
|
| | |
| | | import com.yeshi.fanli.dto.pdd.PDDSearchFilter;
|
| | | import com.yeshi.fanli.entity.brand.BrandInfo;
|
| | | import com.yeshi.fanli.entity.brand.BrandShopCahe;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoShop;
|
| | | import com.yeshi.common.entity.taobao.TaoBaoShop;
|
| | | import com.yeshi.fanli.service.inter.brand.BrandShopCaheService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoShopService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
| | |
|
| | | BrandShopCahe brandShop = new BrandShopCahe();
|
| | | brandShop.setBrandId(brandInfo.getId());
|
| | | brandShop.setShop(ShopInfoVOFactory.convertTaoBaoShop(taoBaoShop));
|
| | | brandShop.setShop(shopInfoVO);
|
| | | brandShop.setCreateTime(new Date());
|
| | | brandShopCaheDao.insert(brandShop);
|
| | | return false;
|
| | |
| | | * @return
|
| | | */
|
| | | @Override
|
| | | public void addBrandShopPDD(BrandInfo brandInfo) {
|
| | | String shopKey = brandInfo.getShopKey();
|
| | | public int addBrandShopPDD(BrandInfo brandInfo) {
|
| | | String shopKey = brandInfo.getShopKeyPDD();
|
| | | if (StringUtil.isNullOrEmpty(shopKey))
|
| | | shopKey = brandInfo.getName();
|
| | | return 0;
|
| | |
|
| | | String searchKey = brandInfo.getSearchKey();
|
| | | String searchKey = brandInfo.getSearchKeyPDD();
|
| | | if (StringUtil.isNullOrEmpty(searchKey))
|
| | | searchKey = brandInfo.getName();
|
| | |
|
| | |
| | | pddfilter.setSortType(6);
|
| | | pddfilter.setMerchantType(3);
|
| | |
|
| | | PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter);
|
| | | PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter, Constant.PDD_SEARCH_CUSTOMER_PARAMS);
|
| | | if (result != null && result.getGoodsList() != null && result.getGoodsList().size() > 0) {
|
| | | boolean addShop = true;
|
| | | List<PDDGoodsDetail> goodsList = result.getGoodsList();
|
| | |
| | | brandShop.setShop(shopInfoVO);
|
| | | brandShop.setCreateTime(new Date());
|
| | | brandShopCaheDao.insert(brandShop);
|
| | | return 1;
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | |
|