| | |
| | | import java.util.Map;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.transaction.Transactional;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.TaoBaoClassRelationMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.lable.LabelGoodsMapper;
|
| | |
| | | return qualityFactoryMapper.listQueryByAuctionId(list);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | @Transactional
|
| | | public void addBatchTaoBaoGoods(List<TaoBaoGoodsBrief> listTaoBaoGoods, String lableNames, AdminUser admin) throws Exception {
|
| | | |
| | | public void addBatchTaoBaoGoods(List<TaoBaoGoodsBrief> listTaoBaoGoods, String lableNames, AdminUser admin)
|
| | | throws Exception {
|
| | |
|
| | | if (listTaoBaoGoods == null || listTaoBaoGoods.size() == 0) {
|
| | | throw new Exception("未找到匹配的商品");
|
| | | }
|
| | | |
| | |
|
| | | // 创建标签
|
| | | List<Label> listLabel = labelService.addBatchByNames(lableNames, admin);
|
| | |
|
| | | List<QualityFactory> listQuality = new ArrayList<QualityFactory>();
|
| | | List<LabelGoods> listLabelGoods = new ArrayList<LabelGoods>();
|
| | |
|
| | | for (TaoBaoGoodsBrief goodsBrief: listTaoBaoGoods) {
|
| | | for (TaoBaoGoodsBrief goodsBrief : listTaoBaoGoods) {
|
| | |
|
| | | // 本地是否已存在此商品
|
| | | List<TaoBaoGoodsBrief> hasList = taoBaoGoodsBriefService.queryByAuctionId(goodsBrief.getAuctionId());
|
| | |
| | | if (hasList != null && hasList.size() > 0) {
|
| | | TaoBaoGoodsBrief currentGoodsBrief = hasList.get(0);
|
| | | goodsBrief.setId(currentGoodsBrief.getId());
|
| | | |
| | |
|
| | | // 更新商品最新信息
|
| | | taoBaoGoodsUpdateService.updateTaoBaoGoods(goodsBrief);
|
| | | } else {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | if (listQuality.size() > 0) {
|
| | |
| | |
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | @Transactional
|
| | | public void setWeightBatch(List<Long> idList, AdminUser admin, Integer weight, Integer weightSmall,
|
| | |
| | | try {
|
| | | TaoBaoGoodsBrief taoBaoGoodsBrief = TaoKeApiUtil.searchGoodsDetail(goods.getAuctionId());
|
| | | if (taoBaoGoodsBrief != null) {
|
| | |
|
| | | listGoodsBrief.add(taoBaoGoodsBrief);
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0; i < goodsList.size(); i++) {
|
| | | if (goodsList.get(i).getMaterialLibType() != null && goodsList.get(i).getMaterialLibType() == 0) {
|
| | | goodsList.remove(i);
|
| | | i--;
|
| | | }
|
| | | }
|
| | |
|
| | | // 商品id集合
|
| | | List<Long> listSystemTBid = new ArrayList<Long>();
|
| | |
|