|
|
|
@ -537,6 +537,7 @@ public class JdServiceImpl implements JdService { |
|
|
|
|
// 根据skuId 查询商品详情
|
|
|
|
|
// 根据skuId 查询商品售价
|
|
|
|
|
OpenRpcResult priceResponse = JdPostService.getSellPrice(getToken(), String.valueOf(goodsMsg.getThirdId())).getOpenRpcResult(); |
|
|
|
|
if (priceResponse.getResultCode().equals("0000") && priceResponse.getSuccess() ) { |
|
|
|
|
GetSellPriceGoodsResp price = priceResponse.getResult().get(0); |
|
|
|
|
// 设置涨价
|
|
|
|
|
BigDecimal profitPrice = price.getSalePrice().multiply(productConfig.getDiscount().divide(new BigDecimal(100) , 2, RoundingMode.HALF_UP)); |
|
|
|
@ -547,6 +548,11 @@ public class JdServiceImpl implements JdService { |
|
|
|
|
specs.setThirdPrice(price.getJdPrice()); |
|
|
|
|
specs.setName(goodsMsg.getTitle()); |
|
|
|
|
specs.setExt3(price.getSalePrice().toString()); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
specs.setStatus(0); |
|
|
|
|
specs.setUpdateTime(new Date()); |
|
|
|
|
} |
|
|
|
|
// 设置展示图片
|
|
|
|
|
goodsSpecsService.update(specs); |
|
|
|
|
} |
|
|
|
@ -566,6 +572,8 @@ public class JdServiceImpl implements JdService { |
|
|
|
|
|
|
|
|
|
// 创建一个GoodsMsg对象
|
|
|
|
|
GoodsMsg goodsMsg = goodsMsgService.queryDetail(aLong.toString()); |
|
|
|
|
|
|
|
|
|
if ( goodsMsg != null && !goodsMsg.getStatus().equals(0)) { |
|
|
|
|
GetSkuImageGoodsResp img = imageListResponse.getResult().get(0); |
|
|
|
|
StringBuilder imgS = new StringBuilder(); |
|
|
|
|
// 遍历商品图片列表
|
|
|
|
@ -596,6 +604,9 @@ public class JdServiceImpl implements JdService { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 下架商品
|
|
|
|
|
private void deleteMsg(String aLong) { |
|
|
|
|
GoodsMsg goodsMsg = goodsMsgService.queryDetail(aLong); |
|
|
|
@ -717,12 +728,9 @@ public class JdServiceImpl implements JdService { |
|
|
|
|
QueryOrderOpenResp queryOrderOpenResp = result.getResult().get(0); |
|
|
|
|
StateOrderOpenResp stateOrderOpenResp = queryOrderOpenResp.getOrderState(); |
|
|
|
|
// 查看订单是否已确认
|
|
|
|
|
if (stateOrderOpenResp.getConfirmState() == 1) { |
|
|
|
|
jsonObject.put("logisticsStatus", "SIGN"); |
|
|
|
|
jsonObject.put("logisticsStatusDesc", "已签收"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 订单状态为567为待揽收
|
|
|
|
|
if (stateOrderOpenResp.getConfirmState() == 5 || stateOrderOpenResp.getConfirmState() == 6 || stateOrderOpenResp.getConfirmState() == 7) { |
|
|
|
|
if (stateOrderOpenResp.getConfirmState() == 1 || stateOrderOpenResp.getConfirmState() == 5 || stateOrderOpenResp.getConfirmState() == 6 || stateOrderOpenResp.getConfirmState() == 7) { |
|
|
|
|
jsonObject.put("logisticsStatus", "WAIT_ACCEPT"); |
|
|
|
|
jsonObject.put("logisticsStatusDesc", "待揽收"); |
|
|
|
|
} |
|
|
|
@ -741,6 +749,10 @@ public class JdServiceImpl implements JdService { |
|
|
|
|
jsonObject.put("logisticsStatus", "DELIVERING"); |
|
|
|
|
jsonObject.put("logisticsStatusDesc", "派件中"); |
|
|
|
|
} |
|
|
|
|
if (stateOrderOpenResp.getConfirmState() == 19) { |
|
|
|
|
jsonObject.put("logisticsStatus", "SIGN"); |
|
|
|
|
jsonObject.put("logisticsStatusDesc", "已签收"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return jsonObject; |
|
|
|
|
} |
|
|
|
|