|
|
@ -11,6 +11,7 @@ import org.springframework.stereotype.Service; |
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.Collections; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
@Service("goodsDataService") |
|
|
|
@Service("goodsDataService") |
|
|
@ -118,4 +119,37 @@ public class GoodsDataServiceImpl implements GoodsDataService { |
|
|
|
|
|
|
|
|
|
|
|
return goodsModelList; |
|
|
|
return goodsModelList; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public List<GoodsModel> goodsModelPddList(JSONObject jsonObject) { |
|
|
|
|
|
|
|
// 定义数据列表
|
|
|
|
|
|
|
|
List<GoodsModel> goodsModelList = new ArrayList<>(); |
|
|
|
|
|
|
|
GoodsModel goodsModel; |
|
|
|
|
|
|
|
// 淘客推广信息
|
|
|
|
|
|
|
|
PublishInfoModel publishInfoModel; |
|
|
|
|
|
|
|
// 价格促销信息
|
|
|
|
|
|
|
|
PricePromotionInfoModel pricePromotionInfoModel; |
|
|
|
|
|
|
|
// 基础信息
|
|
|
|
|
|
|
|
GoodsInfoModel goodsInfoModel; |
|
|
|
|
|
|
|
// 商品佣金信息
|
|
|
|
|
|
|
|
IncomeInfoModel incomeInfoModel; |
|
|
|
|
|
|
|
// 更多活动优惠
|
|
|
|
|
|
|
|
MorePromotionModel morePromotionModel; |
|
|
|
|
|
|
|
List<MorePromotionModel> morePromotionModels; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONArray array = jsonObject.getJSONObject("goodsSearchResponse").getJSONArray("goodsSearchResponse"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (Object object : array) { |
|
|
|
|
|
|
|
JSONObject goods = (JSONObject) object; |
|
|
|
|
|
|
|
goodsModel = new GoodsModel(); |
|
|
|
|
|
|
|
// 淘客推广信息
|
|
|
|
|
|
|
|
// 商品佣金信息
|
|
|
|
|
|
|
|
incomeInfoModel = new IncomeInfoModel(); |
|
|
|
|
|
|
|
publishInfoModel = new PublishInfoModel(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Collections.emptyList(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|