Authored by qinchao

未揽收处理标记

... ... @@ -29,4 +29,8 @@ public interface BuyerOrderMapper {
BuyerOrder selectById(@Param("id") Integer id);
BuyerOrder selectByOrderCodeAndStatus(@Param("orderCode") String orderCode, @Param("status") byte status);
// 修改订单的卖家发货 已处理
int updateSellerDeliveryDealByOrderCode(@Param("orderCode")long orderCode, @Param("uid")int uid);
}
... ...
... ... @@ -249,4 +249,10 @@
where order_code=#{orderCode} and status=#{status}
</select>
<update id="updateSellerDeliveryDealByOrderCode">
update buyer_order set
seller_delivery_deal = 1
where uid = #{uid,jdbcType=INTEGER} and order_code = #{orderCode,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
... ...
... ... @@ -75,6 +75,14 @@ public class BuyerOrderController {
}
}
//更新订单异常物流的处理状态
@RequestMapping(value = "/updateSellerDeliveryDeal")
public ApiResponse updateSellerDeliveryDeal(BuyerOrderReq req) {
LOGGER.info("confirmReceive in. req is {}", req);
buyerOrderService.updateSellerDeliveryDeal(req);
return new ApiResponse.ApiResponseBuilder().code(200).message("处理订单成功").build();
}
//质检通过
@RequestMapping(value = "/qualityCheckPass")
public ApiResponse qualityCheckPass(BuyerOrderReq req) {
... ...
... ... @@ -24,6 +24,8 @@ public interface IBuyerOrderService {
JSONObject confirmReceive(BuyerOrderReq req);
void updateSellerDeliveryDeal(BuyerOrderReq req);
/**
* 客服取消订单
* @param orderCode
... ...
... ... @@ -733,6 +733,25 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
}
@Override
public void updateSellerDeliveryDeal(BuyerOrderReq req){
String orderCode = req.getOrderCode();
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
if (null == buyerOrder) {
throw new ServiceException(400, "订单不存在");
}
if(1==buyerOrder.getSellerDeliveryDeal()){
return ;
}
//更新
buyerOrderMapper.updateSellerDeliveryDealByOrderCode(Long.valueOf(orderCode),buyerOrder.getUid());
//记录一条操作记录
int operateType =OperateTypeEnum.SELLER_DELIVERY_DEAL_FLAG.getCode();
UserHelper userHelper = new UserHelper();
saveOrderOperateRecord(buyerOrder.getOrderCode(), userHelper, operateType, "");
LOGGER.info("updateSellerDeliveryDeal saveOrderOperateRecord operateType={} ,order code ={} ,userHelper = {}",operateType,buyerOrder.getOrderCode() ,userHelper);
}
@Override
public void cancelBuyerOrder(String orderCode) {
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
if (null == buyerOrder) {
... ... @@ -2387,6 +2406,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
resp.setSkup(skup);
resp.setSellerDeliveryDeal(item.getSellerDeliveryDeal());
resp.setSellerDeliveryDealDesc(1==item.getSellerDeliveryDeal()?"已处理":"未处理");
resp.setSellerWaybillCode(null == expressInfoMap.get(item.getOrderCode()) ? "" : expressInfoMap.get(item.getOrderCode()).getWaybillCode());
... ...
... ... @@ -303,7 +303,11 @@ function getOrderList(){
buttons += "<a role='detail' dataId='"+ rowData.orderCode + "' skup='"+ rowData.skup + "' style='margin-left:10px;background-color: #5cb85c !important;'>详情</a>";
// 卖家已发货
if(rowData.status == 2){
buttons += "<a role='cancelOrder' dataId='"+ rowData.orderCode +"' style='margin-left:10px;background-color: #D31225 !important;'>取消订单</a>";
buttons += "<a role='cancelOrder' dataId='"+ rowData.orderCode +"' style='margin-left:10px;color:white;background-color: #D31225 !important;'>取消订单</a>";
if(abnormalDeliveryTab&&(1!=rowData.sellerDeliveryDeal)){
buttons += "<a role='sellerDeliveryDealOrder' dataId='"+ rowData.orderCode +"' style='margin-left:10px;color:white;background-color: #5bc0de !important;'>处理</a>";
}
}
return buttons;
}
... ... @@ -325,6 +329,25 @@ function getOrderList(){
}
});
me.datagrid("getPanel").find("a[role='sellerDeliveryDealOrder']").linkbutton({
onClick: function () {
var orderCode = $(this).attr("dataId");
$.post(contextPath + "/buyerOrder/updateSellerDeliveryDeal", {
orderCode : orderCode
}, function(data) {
if (data.code == 200) {
window.self.$.messager.show({
title : "提示",
msg : "处理订单成功!"
});
me.datagrid('reload');
}else {
window.self.$.messager.alert("失败", data.message, "error");
}
});
}
});
me.datagrid("getPanel").find("a[role='cancelOrder']").linkbutton({
onClick: function () {
var orderCode = $(this).attr("dataId");
... ...