|
|
@@ -36,6 +36,7 @@ import com.sckw.system.api.RemoteSystemService;
|
|
|
import com.sckw.system.api.model.dto.res.AreaTreeFrontResDto;
|
|
|
import com.sckw.system.api.model.dto.res.EntCacheResDto;
|
|
|
import com.sckw.system.api.model.dto.res.UserCacheResDto;
|
|
|
+import com.sckw.transport.api.dubbo.TransportDubboService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
@@ -69,6 +70,9 @@ public class KwoTradeOrderService {
|
|
|
@DubboReference(version = "2.0.0", group = "design", check = false)
|
|
|
private PayCenterDubboService payCenterDubboService;
|
|
|
|
|
|
+ @DubboReference(version = "2.0.0", group = "design", check = false)
|
|
|
+ private TransportDubboService transportDubboService;
|
|
|
+
|
|
|
private final KwoTradeOrderMapper kwoTradeOrderMapper;
|
|
|
private final StreamBridge streamBridge;
|
|
|
private final KwoTradeOrderAddressService kwoTradeOrderAddressService;
|
|
|
@@ -764,6 +768,9 @@ public class KwoTradeOrderService {
|
|
|
if (kwoTradeOrderUnitService.entMatch(param.getId(), LoginUserHolder.getEntId(), DictEnum.TORDER_UNIT_TYPE_2.getValue())) {
|
|
|
throw new BusinessException("无订单操作权限!");
|
|
|
}
|
|
|
+ if (transportDubboService.checkLogisticsOrderByTradeOrderId(param.getId())){
|
|
|
+ throw new BusinessException("订单存在未完成的物流托运,不可完结!");
|
|
|
+ }
|
|
|
String lockKey = String.format(RedisConstant.TORDER_UPDATE_AMOUNT_KEY, param.getId());
|
|
|
if (Boolean.FALSE.equals(RedissonUtils.tryLock(lockKey, 5L, 10L))) {
|
|
|
throw new BusinessException("业务繁忙,请稍后再试!");
|