|
@@ -102,6 +102,7 @@ public class OrderDeliveryServiceImpl implements OrderDeliveryService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
|
|
+ @TenantIgnore
|
|
|
public PageResult<ShippingPlanRespVO> getShippingPlanPage(ShippingPlanPageReqVO pageReqVO) {
|
|
public PageResult<ShippingPlanRespVO> getShippingPlanPage(ShippingPlanPageReqVO pageReqVO) {
|
|
|
PageResult<ShippingPlanDO> pageResult = shippingPlanMapper.selectPage(pageReqVO);
|
|
PageResult<ShippingPlanDO> pageResult = shippingPlanMapper.selectPage(pageReqVO);
|
|
|
return new PageResult<>(
|
|
return new PageResult<>(
|
|
@@ -111,6 +112,7 @@ public class OrderDeliveryServiceImpl implements OrderDeliveryService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
|
|
+ @TenantIgnore
|
|
|
public ShippingPlanRespVO getShippingPlan(Long id) {
|
|
public ShippingPlanRespVO getShippingPlan(Long id) {
|
|
|
ShippingPlanDO plan = shippingPlanMapper.selectById(id);
|
|
ShippingPlanDO plan = shippingPlanMapper.selectById(id);
|
|
|
if (plan == null) {
|
|
if (plan == null) {
|
|
@@ -124,6 +126,7 @@ public class OrderDeliveryServiceImpl implements OrderDeliveryService {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
+ @TenantIgnore
|
|
|
public Long createShippingPlan(ShippingPlanSaveReqVO createReqVO) {
|
|
public Long createShippingPlan(ShippingPlanSaveReqVO createReqVO) {
|
|
|
ShippingPlanDO plan = OrderDeliveryConvert.INSTANCE.convert(createReqVO);
|
|
ShippingPlanDO plan = OrderDeliveryConvert.INSTANCE.convert(createReqVO);
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
LocalDateTime now = LocalDateTime.now();
|
|
@@ -131,6 +134,14 @@ public class OrderDeliveryServiceImpl implements OrderDeliveryService {
|
|
|
plan.setUpdateTime(now);
|
|
plan.setUpdateTime(now);
|
|
|
plan.setIsActive(true);
|
|
plan.setIsActive(true);
|
|
|
plan.setIsConfirm(false);
|
|
plan.setIsConfirm(false);
|
|
|
|
|
+ // Domain 字段不能为空,设置默认值
|
|
|
|
|
+ if (plan.getDomain() == null || plan.getDomain().isEmpty()) {
|
|
|
|
|
+ plan.setDomain("8010");
|
|
|
|
|
+ }
|
|
|
|
|
+ // Priority 默认值
|
|
|
|
|
+ if (plan.getPriority() == null) {
|
|
|
|
|
+ plan.setPriority(java.math.BigDecimal.ZERO);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
Long loginUserId = getLoginUserId();
|
|
Long loginUserId = getLoginUserId();
|
|
|
if (loginUserId != null) {
|
|
if (loginUserId != null) {
|
|
@@ -148,6 +159,7 @@ public class OrderDeliveryServiceImpl implements OrderDeliveryService {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
+ @TenantIgnore
|
|
|
public void updateShippingPlan(ShippingPlanSaveReqVO updateReqVO) {
|
|
public void updateShippingPlan(ShippingPlanSaveReqVO updateReqVO) {
|
|
|
ShippingPlanDO exists = validateShippingPlanExists(updateReqVO.getRecId());
|
|
ShippingPlanDO exists = validateShippingPlanExists(updateReqVO.getRecId());
|
|
|
ShippingPlanDO update = OrderDeliveryConvert.INSTANCE.convert(updateReqVO);
|
|
ShippingPlanDO update = OrderDeliveryConvert.INSTANCE.convert(updateReqVO);
|
|
@@ -170,6 +182,7 @@ public class OrderDeliveryServiceImpl implements OrderDeliveryService {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
+ @TenantIgnore
|
|
|
public void deleteShippingPlan(Long id) {
|
|
public void deleteShippingPlan(Long id) {
|
|
|
validateShippingPlanExists(id);
|
|
validateShippingPlanExists(id);
|
|
|
shippingPlanMapper.deleteById(id);
|
|
shippingPlanMapper.deleteById(id);
|
|
@@ -182,10 +195,11 @@ public class OrderDeliveryServiceImpl implements OrderDeliveryService {
|
|
|
}
|
|
}
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
String createUser = plan.getCreateUser();
|
|
String createUser = plan.getCreateUser();
|
|
|
|
|
+ String domain = plan.getDomain() != null ? plan.getDomain() : "8010";
|
|
|
List<ShippingPlanDetailDO> details = OrderDeliveryConvert.INSTANCE.convertDetailSaveList(items);
|
|
List<ShippingPlanDetailDO> details = OrderDeliveryConvert.INSTANCE.convertDetailSaveList(items);
|
|
|
for (ShippingPlanDetailDO detail : details) {
|
|
for (ShippingPlanDetailDO detail : details) {
|
|
|
detail.setPlanId(plan.getRecId());
|
|
detail.setPlanId(plan.getRecId());
|
|
|
- detail.setDomain(plan.getDomain());
|
|
|
|
|
|
|
+ detail.setDomain(domain);
|
|
|
detail.setCreateTime(now);
|
|
detail.setCreateTime(now);
|
|
|
detail.setUpdateTime(now);
|
|
detail.setUpdateTime(now);
|
|
|
detail.setCreateUser(createUser);
|
|
detail.setCreateUser(createUser);
|