|
|
@@ -749,7 +749,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
if(ObjectUtil.isEmpty(config.getOrderAttribution())
|
|
|
||!config.getOrderAttribution().equals(1)){
|
|
|
if(param.getCompanyUserId()!=null){
|
|
|
- if (ObjectUtil.isNotEmpty(fsuser.getCompanyUserId())&&fsuser.getCompanyUserId()!=param.getCompanyUserId()){
|
|
|
+ if (ObjectUtil.isNotEmpty(fsuser.getCompanyUserId())&&!fsuser.getCompanyUserId().equals(param.getCompanyUserId())){
|
|
|
CompanyUser companyUser=companyUserService.selectCompanyUserById(fsuser.getCompanyUserId());
|
|
|
return R.error(String.format("请联系%s销售进行购买商品!",companyUser.getNickName()));
|
|
|
}else {
|
|
|
@@ -3843,6 +3843,31 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
return R.error("导入失败,订单号为" + dto.getOrderNumber() + "物流编码异常,请核对后再导入!");
|
|
|
}
|
|
|
list.add(dto);
|
|
|
+
|
|
|
+
|
|
|
+ //批量导入物流单号 存在快递鸟时订阅下方参数,进行调整
|
|
|
+ if(CloudHostUtils.hasCloudHostName("内蒙古一贴")){
|
|
|
+ FsStoreOrderScrm order = fsStoreOrderMapper.selectFsStoreOrderByOrderCode(dto.getOrderNumber());
|
|
|
+ //订阅物流回调
|
|
|
+ String lastFourNumber = "";
|
|
|
+ if (dto.getDeliverySn().equals(ShipperCodeEnum.SF.getValue())) {
|
|
|
+ lastFourNumber = order.getUserPhone();
|
|
|
+ if (lastFourNumber.length() == 11) {
|
|
|
+ lastFourNumber = StrUtil.sub(lastFourNumber, lastFourNumber.length(), -4);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ expressService.subscribeEspress(order.getOrderCode(), order.getDeliverySn(), order.getDeliveryId(), lastFourNumber);
|
|
|
+
|
|
|
+ TemplateBean templateBean = TemplateBean.builder()
|
|
|
+ .orderId(order.getId().toString())
|
|
|
+ .orderCode(order.getOrderCode().toString())
|
|
|
+ .deliveryId(order.getDeliveryId())
|
|
|
+ .deliveryName(order.getDeliveryName())
|
|
|
+ .userId(order.getUserId())
|
|
|
+ .templateType(TemplateListenEnum.TYPE_2.getValue())
|
|
|
+ .build();
|
|
|
+ publisher.publishEvent(new TemplateEvent(this, templateBean));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//分批次处理
|
|
|
@@ -3863,6 +3888,9 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
+ String lastFourNumber = "15808582581";
|
|
|
+ }
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Throwable.class,propagation = Propagation.REQUIRED)
|
|
|
public R pay(FsStoreOrderPayParam param) {
|