Authored by qinchao

物流更新异常

... ... @@ -13,6 +13,8 @@ import com.yoho.order.model.BuyerOrderReq;
public interface BuyerOrderMapper {
int selectCountByStatus(List<Byte> statusList);
int selectCountByStatusForAbnormalSellerDelivery(@Param("list") List<Byte> statusList ,@Param("currentSecondMinus24Hours") Integer currentSecondMinus24Hours);
int selectCountByStatusAndDepotNo(@Param("list")List<Byte> statusList, @Param("depotNo")Integer depotNo, @Param("platformExpressInfoFlag")String platformExpressInfoFlag);
... ...
package com.yoho.order.model;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.io.Serializable;
... ... @@ -52,6 +54,10 @@ public class BuyerOrder implements Serializable {
private Integer platformDeliveryStatus;//1 平台发货给卖家, 2 平台发货给买家
private Integer sellerDeliveryStatus;//卖家的发货物流:1 :已发货且有物流
private Integer sellerDeliveryDeal;//卖家的发货物流,操作员是否已经处理:0:未处理 ,1 :已处理
public Integer getId() {
return id;
}
... ... @@ -180,4 +186,19 @@ public class BuyerOrder implements Serializable {
this.platformDeliveryStatus = platformDeliveryStatus;
}
public Integer getSellerDeliveryStatus() {
return sellerDeliveryStatus;
}
public void setSellerDeliveryStatus(Integer sellerDeliveryStatus) {
this.sellerDeliveryStatus = sellerDeliveryStatus;
}
public Integer getSellerDeliveryDeal() {
return sellerDeliveryDeal;
}
public void setSellerDeliveryDeal(Integer sellerDeliveryDeal) {
this.sellerDeliveryDeal = sellerDeliveryDeal;
}
}
... ...
... ... @@ -114,4 +114,8 @@ public class BuyerOrderReq extends PageRequestBO{
private Integer clientType; //订单来源 1-PC,3-iphone, 4-android, 5-ipad, 6-h5, 7-miniapp
private Integer attributes; //订单类型 1-普通现货订单,2-线下店订单,3-急速发货订单,4-普通预售
private Integer sellerDeliveryStatus ;
private Integer currentSecondMinus24Hours;
}
... ...
... ... @@ -18,11 +18,14 @@
<result column="channel_no" property="channelNo" jdbcType="VARCHAR" />
<result column="attributes" property="attributes" jdbcType="INTEGER" />
<result column="platform_delivery_status" jdbcType="INTEGER" property="platformDeliveryStatus" />
<result column="seller_delivery_status" jdbcType="INTEGER" property="sellerDeliveryStatus" />
<result column="seller_delivery_deal" jdbcType="INTEGER" property="sellerDeliveryDeal" />
</resultMap>
<sql id="Base_Column_List">
id, uid, order_code, seller_uid, client_type, payment, payment_type, is_cancel,
amount, ship_fee, status, create_time, update_time, channel_no, attributes ,platform_delivery_status
amount, ship_fee, status, create_time, update_time, channel_no, attributes ,platform_delivery_status,
seller_delivery_status,seller_delivery_deal
</sql>
<select id="selectByOrderCode" resultMap="BaseResultMap">
... ... @@ -45,6 +48,20 @@
</foreach>
</if>
</select>
<select id="selectCountByStatusForAbnormalSellerDelivery" resultType="java.lang.Integer">
select count(1)
from buyer_order where 1=1
and seller_delivery_status = 0
and update_time &lt; #{currentSecondMinus24Hours}
<if test="list != null and list.size()>0">
and status in
<foreach collection="list" item="status" open="(" close=")" separator=",">
#{status}
</foreach>
</if>
</select>
<select id="selectCountByStatusAndDepotNo" resultType="java.lang.Integer">
select count(1)
... ... @@ -104,6 +121,12 @@
<if test="buyerOrderReq.clientType != null and buyerOrderReq.clientType != '' ">
and a.client_type = #{buyerOrderReq.clientType}
</if>
<if test="buyerOrderReq.sellerDeliveryStatus != null ">
and a.seller_delivery_status = #{buyerOrderReq.sellerDeliveryStatus}
</if>
<if test="buyerOrderReq.currentSecondMinus24Hours != null ">
and a.update_time &lt; #{buyerOrderReq.currentSecondMinus24Hours}
</if>
<if test="buyerOrderReq.status != null ">
and a.status = #{buyerOrderReq.status}
</if>
... ...
... ... @@ -28,11 +28,9 @@ import com.yoho.ufo.service.model.PageResponseBO;
import com.yoho.ufo.util.*;
import com.yohobuy.ufo.model.order.bo.AppraiseExpressInfoBo;
import com.yohobuy.ufo.model.order.common.*;
import com.yohobuy.ufo.model.order.constants.QNliveConstants;
import com.yohobuy.ufo.model.order.req.BuyerOrderMetaUpdateReq;
import com.yohobuy.ufo.model.order.resp.*;
import com.yohobuy.ufo.model.order.resp.SkupImageInfo;
import com.yohobuy.ufo.model.resp.product.*;
import com.yohobuy.ufo.model.resp.product.SecondDetailResp;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.elasticsearch.common.collect.Lists;
... ... @@ -378,6 +376,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
resultMap.put("num_9", buyerOrderMapper.selectCountByStatus(getStatusListByNavStatus(9)));//瑕疵确认中
resultMap.put("num_10", buyerOrderMapper.selectCountByStatus(getStatusListByNavStatus(10)));//瑕疵确认通过
resultMap.put("num_11", buyerOrderMapper.selectCountByStatus(getStatusListByNavStatus(11)));//平台鉴定通过
int currentSecondMinus24Hours = DateUtil.getCurrentTimeSeconds() - 24*60*60;
resultMap.put("num_12", buyerOrderMapper.selectCountByStatusForAbnormalSellerDelivery(getStatusListByNavStatus(12),currentSecondMinus24Hours));//待卖家发货
return resultMap;
}
... ... @@ -2540,6 +2540,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
return Lists.newArrayList(Constant.BUYER_ORDER_STATUS_MINI_FAULT_ACCEPT.getByteVal());
case 11:
return Lists.newArrayList(Constant.BUYER_ORDER_STATUS_JUDGE_PASS.getByteVal());
case 12:
return Lists.newArrayList(Constant.BUYER_ORDER_STATUS_ALLOCATING.getByteVal());
default:
return Lists.newArrayList();
}
... ... @@ -2552,6 +2554,13 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
if(null != req.getNavStatus()) {
req.setStatusList(getStatusListByNavStatus(req.getNavStatus()));
//特殊处理:物流异常的订单
if(12==req.getNavStatus()){
int currentSecondMinus24Hours = DateUtil.getCurrentTimeSeconds() - 24*60*60;
req.setCurrentSecondMinus24Hours(currentSecondMinus24Hours);
req.setSellerDeliveryStatus(0);
}
}
//attributes=2为门店自提
... ...
... ... @@ -33,6 +33,7 @@
<li><a href="javascript:switchOrderStatus(5);">平台已发货(<span id="num_5"></span>)</a></li>
<li><a href="javascript:switchOrderStatus(6);">订单完成(<span id="num_6"></span>)</a></li>
<li><a href="javascript:switchOrderStatus(7);">已取消(<span id="num_7">)</span>)</a></li>
<li><a href="javascript:switchOrderStatus(12);">物流更新异常(<span id="num_12"></span>)</a></li>
</ul>
</div>
<br>
... ... @@ -387,6 +388,7 @@ function getCountByNavStatus(){
$("#num_9").html(result.data.num_9);
$("#num_10").html(result.data.num_10);
$("#num_11").html(result.data.num_11);
$("#num_12").html(result.data.num_12);
}
else {
$.messager.alert("失败", result.message, "error");
... ...