|  | @@ -178,7 +178,7 @@ public class BytedanceServiceImpl implements IBytedanceService {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          AllianceColonelActivityProductResponse response = request.execute(accessToken);
 | 
	
		
			
				|  |  |          JSONObject jsonObject = JSONObject.parseObject(response.toString());
 | 
	
		
			
				|  |  | -        log.info("返回数据:{}",jsonObject);
 | 
	
		
			
				|  |  | +        log.info("返回数据:{}", jsonObject);
 | 
	
		
			
				|  |  |          Integer code = jsonObject.getInteger("code");
 | 
	
		
			
				|  |  |          String msg = jsonObject.getString("msg");
 | 
	
		
			
				|  |  |          if (code == 10000) {
 | 
	
	
		
			
				|  | @@ -186,85 +186,83 @@ public class BytedanceServiceImpl implements IBytedanceService {
 | 
	
		
			
				|  |  |              returnJson.put("message", "请求成功");
 | 
	
		
			
				|  |  |              returnJson.put("judgeStatus", "1");
 | 
	
		
			
				|  |  |              JSONObject dataJson = jsonObject.getJSONObject("data");
 | 
	
		
			
				|  |  | -          JSONArray  dataArr = dataJson.getJSONArray("data");
 | 
	
		
			
				|  |  | -          if(!Check.isNull(dataArr)){
 | 
	
		
			
				|  |  | -              JSONObject data = dataArr.getJSONObject(0);
 | 
	
		
			
				|  |  | -              if (!Check.isNull(data)) {
 | 
	
		
			
				|  |  | -                  JSONObject itemJson = new JSONObject();
 | 
	
		
			
				|  |  | -                  String product_id = data.getString("product_id");//商品ID
 | 
	
		
			
				|  |  | -                  String title = data.getString("title");//商品名称
 | 
	
		
			
				|  |  | -                  Long price = data.getLong("price");//商品售价
 | 
	
		
			
				|  |  | -                  Double cos_ratio = data.getDouble("cos_ratio");//	佣金比例
 | 
	
		
			
				|  |  | -                  Long cos_fee = data.getLong("cos_fee");//	佣金金额,单位分
 | 
	
		
			
				|  |  | -                  Long first_cid = data.getLong("first_cid");//	商品一级类目
 | 
	
		
			
				|  |  | -                  Long second_cid = data.getLong("second_cid");//	商品二级类目
 | 
	
		
			
				|  |  | -                  Long third_cid = data.getLong("third_cid");//	商品商品三级类目
 | 
	
		
			
				|  |  | -                  Long sales = data.getLong("sales");//	销量
 | 
	
		
			
				|  |  | -                  String cover = data.getString("cover");//	商品主图
 | 
	
		
			
				|  |  | -                  String detail_url = data.getString("detail_url");//	商品团长活动链接
 | 
	
		
			
				|  |  | -                  Long shop_id = data.getLong("shop_id");//	店铺ID
 | 
	
		
			
				|  |  | -                  String shop_name = data.getString("shop_name");//	店铺名称
 | 
	
		
			
				|  |  | -                  Integer status = data.getInteger("status");//	审核状态
 | 
	
		
			
				|  |  | -                  String reason = data.getString("reason");//	reason
 | 
	
		
			
				|  |  | -                  Long category_id = data.getLong("category_id");//	行业类目ID
 | 
	
		
			
				|  |  | -                  String category_name = data.getString("category_name");//	行业类目名称
 | 
	
		
			
				|  |  | -                  String product_stock = data.getString("product_stock");//	商品库存
 | 
	
		
			
				|  |  | -                  String shop_score = data.getString("shop_score");//	店铺分
 | 
	
		
			
				|  |  | -                  Double service_ratio = data.getDouble("service_ratio");//	店铺分
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -                  itemJson.put("itemId", product_id);
 | 
	
		
			
				|  |  | -                  itemJson.put("itemTitle", title);
 | 
	
		
			
				|  |  | -                  itemJson.put("itemPrice", price);
 | 
	
		
			
				|  |  | -                  itemJson.put("itemDesc", title);
 | 
	
		
			
				|  |  | -                  itemJson.put("zkFinalPrice", price);
 | 
	
		
			
				|  |  | -                  itemJson.put("itemImgUrl", cover);
 | 
	
		
			
				|  |  | -                  itemJson.put("shopStar", "-");
 | 
	
		
			
				|  |  | -                  itemJson.put("mallLogisticsScore", shop_name);
 | 
	
		
			
				|  |  | -                  if (status == 0) {
 | 
	
		
			
				|  |  | -                      itemJson.put("activityItemStatus", 1);
 | 
	
		
			
				|  |  | -                  } else if (status == 1) {
 | 
	
		
			
				|  |  | -                      itemJson.put("activityItemStatus", 2);
 | 
	
		
			
				|  |  | -                  } else if (status == 2) {
 | 
	
		
			
				|  |  | -                      itemJson.put("activityItemStatus", 3);
 | 
	
		
			
				|  |  | -                  } else {
 | 
	
		
			
				|  |  | -                      itemJson.put("activityItemStatus", 5);
 | 
	
		
			
				|  |  | -                  }
 | 
	
		
			
				|  |  | -                  itemJson.put("categoryId", category_id);
 | 
	
		
			
				|  |  | -                  itemJson.put("categoryName", category_name);
 | 
	
		
			
				|  |  | -                  itemJson.put("itemGalleryUrls", null); // 轮播图
 | 
	
		
			
				|  |  | -                  itemJson.put("itemDescUrls", null); // 详情图
 | 
	
		
			
				|  |  | -                  itemJson.put("activityId", activityId);
 | 
	
		
			
				|  |  | -                  itemJson.put("shopTitle", shop_name);
 | 
	
		
			
				|  |  | -                  if(!Check.isNull(cos_ratio)){
 | 
	
		
			
				|  |  | -                      itemJson.put("commissionRate", cos_ratio * 10);
 | 
	
		
			
				|  |  | -                  }else {
 | 
	
		
			
				|  |  | -                      itemJson.put("commissionRate", 0);
 | 
	
		
			
				|  |  | -                  }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -                  itemJson.put("mallServiceScore", shop_score);
 | 
	
		
			
				|  |  | -                  itemJson.put("mallQualityScore", ""); // 店铺质量分
 | 
	
		
			
				|  |  | -                  itemJson.put("skuList", ""); // sku信息
 | 
	
		
			
				|  |  | -                  itemJson.put("postArea", ""); // 发货地址
 | 
	
		
			
				|  |  | -                  itemJson.put("detailUrl", detail_url);
 | 
	
		
			
				|  |  | -                  if(!Check.isNull(service_ratio)){
 | 
	
		
			
				|  |  | -                      itemJson.put("regimentalPromotionRate", service_ratio *  10);
 | 
	
		
			
				|  |  | -                  }else {
 | 
	
		
			
				|  |  | -                      itemJson.put("regimentalPromotionRate",0);
 | 
	
		
			
				|  |  | -                  }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -                  returnJson.put("itemJson", itemJson);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -              }else{
 | 
	
		
			
				|  |  | -                  returnJson.put("code", -1);
 | 
	
		
			
				|  |  | -                  returnJson.put("message", "返回数据为空");
 | 
	
		
			
				|  |  | -              }
 | 
	
		
			
				|  |  | -          } else{
 | 
	
		
			
				|  |  | -              returnJson.put("code", -1);
 | 
	
		
			
				|  |  | -              returnJson.put("message", "返回数据为空");
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | +            JSONArray dataArr = dataJson.getJSONArray("data");
 | 
	
		
			
				|  |  | +            if (!Check.isNull(dataArr)) {
 | 
	
		
			
				|  |  | +                JSONObject data = dataArr.getJSONObject(0);
 | 
	
		
			
				|  |  | +                if (!Check.isNull(data)) {
 | 
	
		
			
				|  |  | +                    JSONObject itemJson = new JSONObject();
 | 
	
		
			
				|  |  | +                    String product_id = data.getString("product_id");//商品ID
 | 
	
		
			
				|  |  | +                    String title = data.getString("title");//商品名称
 | 
	
		
			
				|  |  | +                    Long price = data.getLong("price");//商品售价
 | 
	
		
			
				|  |  | +                    Double cos_ratio = data.getDouble("cos_ratio");//	佣金比例
 | 
	
		
			
				|  |  | +                    Long cos_fee = data.getLong("cos_fee");//	佣金金额,单位分
 | 
	
		
			
				|  |  | +                    Long first_cid = data.getLong("first_cid");//	商品一级类目
 | 
	
		
			
				|  |  | +                    Long second_cid = data.getLong("second_cid");//	商品二级类目
 | 
	
		
			
				|  |  | +                    Long third_cid = data.getLong("third_cid");//	商品商品三级类目
 | 
	
		
			
				|  |  | +                    Long sales = data.getLong("sales");//	销量
 | 
	
		
			
				|  |  | +                    String cover = data.getString("cover");//	商品主图
 | 
	
		
			
				|  |  | +                    String detail_url = data.getString("detail_url");//	商品团长活动链接
 | 
	
		
			
				|  |  | +                    Long shop_id = data.getLong("shop_id");//	店铺ID
 | 
	
		
			
				|  |  | +                    String shop_name = data.getString("shop_name");//	店铺名称
 | 
	
		
			
				|  |  | +                    Integer status = data.getInteger("status");//	审核状态
 | 
	
		
			
				|  |  | +                    String reason = data.getString("reason");//	reason
 | 
	
		
			
				|  |  | +                    Long category_id = data.getLong("category_id");//	行业类目ID
 | 
	
		
			
				|  |  | +                    String category_name = data.getString("category_name");//	行业类目名称
 | 
	
		
			
				|  |  | +                    String product_stock = data.getString("product_stock");//	商品库存
 | 
	
		
			
				|  |  | +                    String shop_score = data.getString("shop_score");//	店铺分
 | 
	
		
			
				|  |  | +                    Double service_ratio = data.getDouble("service_ratio");//	店铺分
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                    itemJson.put("itemId", product_id);
 | 
	
		
			
				|  |  | +                    itemJson.put("itemTitle", title);
 | 
	
		
			
				|  |  | +                    itemJson.put("itemPrice", price);
 | 
	
		
			
				|  |  | +                    itemJson.put("itemDesc", title);
 | 
	
		
			
				|  |  | +                    itemJson.put("zkFinalPrice", price);
 | 
	
		
			
				|  |  | +                    itemJson.put("itemImgUrl", cover);
 | 
	
		
			
				|  |  | +                    itemJson.put("shopStar", "-");
 | 
	
		
			
				|  |  | +                    itemJson.put("mallLogisticsScore", shop_name);
 | 
	
		
			
				|  |  | +                    if (status == 0) {
 | 
	
		
			
				|  |  | +                        itemJson.put("activityItemStatus", 1);
 | 
	
		
			
				|  |  | +                    } else if (status == 1) {
 | 
	
		
			
				|  |  | +                        itemJson.put("activityItemStatus", 2);
 | 
	
		
			
				|  |  | +                    } else if (status == 2) {
 | 
	
		
			
				|  |  | +                        itemJson.put("activityItemStatus", 3);
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        itemJson.put("activityItemStatus", 5);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    itemJson.put("categoryId", category_id);
 | 
	
		
			
				|  |  | +                    itemJson.put("categoryName", category_name);
 | 
	
		
			
				|  |  | +                    itemJson.put("itemGalleryUrls", null); // 轮播图
 | 
	
		
			
				|  |  | +                    itemJson.put("itemDescUrls", null); // 详情图
 | 
	
		
			
				|  |  | +                    itemJson.put("activityId", activityId);
 | 
	
		
			
				|  |  | +                    itemJson.put("shopTitle", shop_name);
 | 
	
		
			
				|  |  | +                    if (!Check.isNull(cos_ratio)) {
 | 
	
		
			
				|  |  | +                        itemJson.put("commissionRate", cos_ratio * 10);
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        itemJson.put("commissionRate", 0);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +                    itemJson.put("mallServiceScore", shop_score);
 | 
	
		
			
				|  |  | +                    itemJson.put("mallQualityScore", ""); // 店铺质量分
 | 
	
		
			
				|  |  | +                    itemJson.put("skuList", ""); // sku信息
 | 
	
		
			
				|  |  | +                    itemJson.put("postArea", ""); // 发货地址
 | 
	
		
			
				|  |  | +                    itemJson.put("detailUrl", detail_url);
 | 
	
		
			
				|  |  | +                    if (!Check.isNull(service_ratio)) {
 | 
	
		
			
				|  |  | +                        itemJson.put("regimentalPromotionRate", service_ratio * 10);
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        itemJson.put("regimentalPromotionRate", 0);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +                    returnJson.put("itemJson", itemJson);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                } else {
 | 
	
		
			
				|  |  | +                    returnJson.put("code", -1);
 | 
	
		
			
				|  |  | +                    returnJson.put("message", "返回数据为空");
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +                returnJson.put("code", -1);
 | 
	
		
			
				|  |  | +                returnJson.put("message", "返回数据为空");
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          } else {
 | 
	
	
		
			
				|  | @@ -301,15 +299,15 @@ public class BytedanceServiceImpl implements IBytedanceService {
 | 
	
		
			
				|  |  |              JSONObject dataJson = jsonObject.getJSONObject("data");
 | 
	
		
			
				|  |  |              if (!Check.isNull(dataJson)) {
 | 
	
		
			
				|  |  |                  JSONArray records = dataJson.getJSONArray("records");
 | 
	
		
			
				|  |  | -                if(Check.isNull(records)){
 | 
	
		
			
				|  |  | +                if (Check.isNull(records)) {
 | 
	
		
			
				|  |  |                      returnJson.put("code", -1);
 | 
	
		
			
				|  |  |                      returnJson.put("message", "媒体返回商品信息为空");
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                JSONObject record  = records.getJSONObject(0);
 | 
	
		
			
				|  |  | -                if(Check.isNull(record)){
 | 
	
		
			
				|  |  | +                JSONObject record = records.getJSONObject(0);
 | 
	
		
			
				|  |  | +                if (Check.isNull(record)) {
 | 
	
		
			
				|  |  |                      returnJson.put("code", -1);
 | 
	
		
			
				|  |  |                      returnJson.put("message", "媒体返回商品信息为空");
 | 
	
		
			
				|  |  | -                }else {
 | 
	
		
			
				|  |  | +                } else {
 | 
	
		
			
				|  |  |                      String update_time = record.getString("update_time"); // 更新时间
 | 
	
		
			
				|  |  |                      String product_id = record.getString("product_id"); // 商品id
 | 
	
		
			
				|  |  |                      String product_name = record.getString("product_name"); // 商品id
 | 
	
	
		
			
				|  | @@ -397,7 +395,9 @@ public class BytedanceServiceImpl implements IBytedanceService {
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                      if (Check.isNotNull(order.getPaySuccessTime())) {
 | 
	
		
			
				|  |  |                          orderList.setPaySuccessTime(DateUtils.strDateTimsToInt(order.getPaySuccessTime()));
 | 
	
		
			
				|  |  | +                        orderList.setPaySuccessTimeHour(DateUtils.getHour(order.getPaySuccessTime()));
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |                      if (Check.isNotNull(order.getRefundTime())) {
 | 
	
		
			
				|  |  |                          orderList.setRefundTime(DateUtils.strDateTimsToInt(order.getRefundTime()));
 | 
	
		
			
				|  |  |                      }
 |