Authored by mali

Merge branch 'dev'

... ... @@ -73,8 +73,8 @@ public class ExpressInfoController {
* @return
*/
@RequestMapping(params = "method=ufo.order.expressDetailInfo")
public ApiResponse queryExpressDetailInfo(@RequestParam("uid") Integer uid,@RequestParam("orderCode") Long orderCode) {
ExpressInfoRespBo expressInfoRespBo = expressInfoService.queryExpressDetailInfo(uid,orderCode);
public ApiResponse queryExpressDetailInfo(@RequestParam("orderCode") Long orderCode) {
ExpressInfoRespBo expressInfoRespBo = expressInfoService.queryExpressDetailInfo(orderCode);
return new ApiResponse.ApiResponseBuilder().code(200).data(expressInfoRespBo).build();
}
}
... ...
... ... @@ -42,7 +42,7 @@ public interface IExpressInfoService {
* @param orderCode
* @return
*/
ExpressInfoRespBo queryExpressDetailInfo(Integer uid,Long orderCode);
ExpressInfoRespBo queryExpressDetailInfo(Long orderCode);
/**
... ...
... ... @@ -68,23 +68,11 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
public void deliverToDepot(Integer uid,Integer expressCompanyId, Long orderCode, String wayBillCode) {
LOGGER.info("deliverToDepot uid={} ,expressCompanyId = {}, orderCode = {}, wayBillCode = {}", new Object[]{uid ,expressCompanyId, orderCode, wayBillCode});
//保存物流信息+更新订单状态
saveExpressAndUpdateBuyerOrderStatus(uid,expressCompanyId,orderCode,wayBillCode,ExpressInfoConstant.EXPRESS_TYPE_1,OrderStatus.SELLER_SEND_OUT);
//保存物流信息+更新订单状态;
//本阶段的物流类型和订单状态
Integer expressType = ExpressInfoConstant.EXPRESS_TYPE_1;
OrderStatus orderStatus=OrderStatus.SELLER_SEND_OUT;
// 发送mq获取物流信息
sendExpressMQ(uid,expressCompanyId,orderCode,wayBillCode);
LOGGER.info("deliverToDepot end ! send express to erp ");
}
/**
* 保存物流信息
* 更新订单状态
* @param uid
* @param expressCompanyId
* @param orderCode
* @param wayBillCode
*/
private void saveExpressAndUpdateBuyerOrderStatus(Integer uid,Integer expressCompanyId, Long orderCode, String wayBillCode,Integer expressType,OrderStatus orderStatus){
LOGGER.info("deliverToDepot saveExpressAndUpdateBuyerOrderStatus uid={} ,expressCompanyId = {}, orderCode = {}, wayBillCode = {} " +
",expressType = {} ,orderStatus = {}", new Object[]{uid ,expressCompanyId, orderCode, wayBillCode,expressType,orderStatus});
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
... ... @@ -94,6 +82,11 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
throw new ServiceException(ServiceError.ORDER_NULL);
}
if(uid!=buyerOrder.getUid()){
LOGGER.warn("deliverToDepot saveExpressAndUpdateBuyerOrderStatus uid {} not equal buyer order uid {}",uid, buyerOrder.getUid());
throw new ServiceException(ServiceError.ORDER_NULL);
}
// 保存订单物流信息
int ts=DateUtil.getCurrentTimeSecond();
ExpressInfo expressInfo=new ExpressInfo();
... ... @@ -112,6 +105,10 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
buyerOrder.setUpdateTime(ts);
LOGGER.info("deliverToDepot update buyer order {} ", buyerOrder);
buyerOrderMapper.updateByPrimaryKeySelective(buyerOrder);
// 发送mq获取物流信息
sendExpressMQ(uid,expressCompanyId,orderCode,wayBillCode);
LOGGER.info("deliverToDepot end ! send express to erp ");
}
@Override
... ... @@ -151,8 +148,16 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
* @return
*/
@Override
public ExpressInfoRespBo queryExpressDetailInfo(Integer uid,Long orderCode) {
public ExpressInfoRespBo queryExpressDetailInfo(Long orderCode) {
LOGGER.info("queryExpressDetailInfo orderCode = {}", orderCode);
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
if (buyerOrder == null){
LOGGER.warn("getOrderInfo order not exist, orderCode is {}", orderCode);
throw new ServiceException(ServiceError.ORDER_NULL);
}
Integer uid=buyerOrder.getUid();
ExpressInfoRespBo expressInfoRespBo = new ExpressInfoRespBo();
Integer expressType = getExpressType(orderCode);
LOGGER.info("getExpressType result = {}", expressType);
... ...
No preview for this file type
This diff could not be displayed because it is too large.
... ... @@ -58,11 +58,11 @@ a {
.goods-detail-page .swiper-container {
width: 18.75rem;
height: 18.75rem;
}
.goods-detail-page .swiper-container img {
width: 100%;
height: 18.75rem;
}
.goods-detail-page .goods-title {
... ...
... ... @@ -99,21 +99,25 @@
$('title').html(data.product_name || '商品详情');
goodsList.image_list.map(function(item) {
$('.swiper-wrapper').append('<div class="swiper-slide"><img src="' + item.image_url + '"></div>');
if(item.image_url) {
$('.swiper-wrapper').append('<div class="swiper-slide"><img src="' + item.image_url + '"></div>');
}
});
new Swiper('.swiper-container', {
autoplay: true,
pagination: {
el: '.swiper-pagination',
type: 'fraction',
renderFraction: function (currentClass, totalClass) {
return '<span class="' + currentClass + '"></span>' +
'|' +
'<span class="' + totalClass + '"></span>';
if ($('.swiper-slide').length > 0) {
new Swiper('.swiper-container', {
autoplay: true,
pagination: {
el: '.swiper-pagination',
type: 'fraction',
renderFraction: function (currentClass, totalClass) {
return '<span class="' + currentClass + '"></span>' +
'|' +
'<span class="' + totalClass + '"></span>';
}
}
}
});
});
}
}
})
});
... ...