...
|
...
|
@@ -42,9 +42,11 @@ import com.yohoufo.order.service.listener.OrderChangeListenerContainer; |
|
|
import com.yohoufo.order.service.proxy.InBoxFacade;
|
|
|
import com.yohoufo.order.service.proxy.OrderOperateRecordService;
|
|
|
import com.yohoufo.order.service.proxy.OrderStatusFlowService;
|
|
|
import com.yohoufo.order.service.proxy.ProductProxyService;
|
|
|
import com.yohoufo.order.utils.PaymentHelper;
|
|
|
import com.yohoufo.order.utils.PubThreadFactory;
|
|
|
import lombok.Data;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
...
|
...
|
@@ -61,6 +63,7 @@ import java.util.concurrent.ArrayBlockingQueue; |
|
|
import java.util.concurrent.ExecutorService;
|
|
|
import java.util.concurrent.ThreadPoolExecutor;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* Created by chenchao on 2018/9/27.
|
...
|
...
|
@@ -143,6 +146,8 @@ public class AppraiseService { |
|
|
//@Value("${order.seller.earnestmoney.miniFaultRejectPunishFee:0}")
|
|
|
private Double miniFaultRejectPunishFee = 0D;
|
|
|
|
|
|
@Autowired
|
|
|
private ProductProxyService productProxyService;
|
|
|
|
|
|
/**
|
|
|
* 触发物流
|
...
|
...
|
@@ -867,6 +872,8 @@ public class AppraiseService { |
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Data
|
|
|
class RefundMoneyResultModel {
|
|
|
boolean refundGoodsMoneyFlag;
|
...
|
...
|
@@ -1422,4 +1429,35 @@ public class AppraiseService { |
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 根据物流单号修改鉴定室
|
|
|
* @param appraiseExpressInfoBo
|
|
|
*/
|
|
|
public void updateDeptNo(AppraiseExpressInfoBo appraiseExpressInfoBo) {
|
|
|
List<Long> orderCodeList = null;
|
|
|
|
|
|
if (null == appraiseExpressInfoBo.getOrderCode() && StringUtils.isNotEmpty(appraiseExpressInfoBo.getWayBillCode())) {
|
|
|
List<ExpressRecord> expressRecords = expressRecordMapper.selectByWayBillCodeAndExpressType(appraiseExpressInfoBo.getWayBillCode(),
|
|
|
EnumExpressType.EXPRESS_TYPE_1.getCode());
|
|
|
|
|
|
orderCodeList = expressRecords.stream().filter(item -> null == item.getDepotNum() || !item.getDepotNum().equals(appraiseExpressInfoBo.getDepotNum()))
|
|
|
.map(ExpressRecord::getOrderCode).collect(Collectors.toList()); // 是否存在不符合的鉴定室
|
|
|
} else if (null != appraiseExpressInfoBo.getOrderCode()) {
|
|
|
orderCodeList = Lists.newArrayList(appraiseExpressInfoBo.getOrderCode());
|
|
|
}
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(orderCodeList)) {
|
|
|
LOGGER.info("updateDeptNo method in orderCodeList = {}", orderCodeList);
|
|
|
|
|
|
List<BuyerOrderGoods> buyerOrderGoodses = buyerOrderGoodsMapper.selectByOrderCodeList(null, orderCodeList);
|
|
|
if (CollectionUtils.isNotEmpty(buyerOrderGoodses)) {
|
|
|
List<Integer> skupList = buyerOrderGoodses.stream().map(BuyerOrderGoods::getSkup).collect(Collectors.toList());
|
|
|
|
|
|
sellerOrderGoodsMapper.updateDeptNoBySkups(skupList, appraiseExpressInfoBo.getDepotNum());
|
|
|
expressRecordMapper.updateDeptNoByOrder(orderCodeList, EnumExpressType.EXPRESS_TYPE_1.getCode(), appraiseExpressInfoBo.getDepotNum());
|
|
|
|
|
|
productProxyService.setBatchDepotNum(skupList, appraiseExpressInfoBo.getDepotNum());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
} |
...
|
...
|
|