Commit c5997ac4 authored by 332784038@qq.com's avatar 332784038@qq.com

Merge branch 'master-fix' into dev

parents a482bdb3 fd4f6d55
...@@ -5682,8 +5682,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -5682,8 +5682,6 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
this.update(new LambdaUpdateWrapper<OrderDO>().set(OrderDO::getSplitTime, this.update(new LambdaUpdateWrapper<OrderDO>().set(OrderDO::getSplitTime,
null).eq(OrderDO::getOrderId, parentOrderId)); null).eq(OrderDO::getOrderId, parentOrderId));
// 查询相关子订单信息,并且删除子订单相关的记录,避免重新撤销拆单后再次拆单的数据重复 // 查询相关子订单信息,并且删除子订单相关的记录,避免重新撤销拆单后再次拆单的数据重复
List<OrderDO> orderDOList =
orderMapper.selectList(new LambdaQueryWrapper<OrderDO>().eq(OrderDO::getParentOrderId, parentOrderId));
if (CollectionUtil.isNotEmpty(orderBackInfoDtoList)) { if (CollectionUtil.isNotEmpty(orderBackInfoDtoList)) {
List<Long> orderIds = new ArrayList<>(); List<Long> orderIds = new ArrayList<>();
for (OrderBackInfoDto splitOrder : orderBackInfoDtoList) { for (OrderBackInfoDto splitOrder : orderBackInfoDtoList) {
...@@ -5719,7 +5717,15 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl ...@@ -5719,7 +5717,15 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 物理删除订单 ,在所有业务执行完成后进行删除 // 物理删除订单 ,在所有业务执行完成后进行删除
orderMapper.remove(orderIds); orderMapper.remove(orderIds);
} }
// 恢复母订单可能的费用申请记录应收单
List<OrderFeeApplicationDO> feeApplicationDOList = feeApplicationService.getFeeApplicationListByOrderId(parentOrderId);
if (CollectionUtil.isNotEmpty(feeApplicationDOList)) {
for (OrderFeeApplicationDO f : feeApplicationDOList) {
if (Objects.nonNull(f.getReceivableId()) && f.getReceivableId() > 0) {
receivableService.revokeDeleteReceivableById(Long.valueOf(f.getReceivableId()));
}
}
}
// 删除订单 // 删除订单
// this.remove(new LambdaQueryWrapper<OrderDO>().eq(OrderDO::getParentOrderId, parentOrderId)); // this.remove(new LambdaQueryWrapper<OrderDO>().eq(OrderDO::getParentOrderId, parentOrderId));
} }
......
...@@ -9,10 +9,8 @@ import cn.iocoder.yudao.module.wealth.vo.receivable.ReceivableBackVO; ...@@ -9,10 +9,8 @@ import cn.iocoder.yudao.module.wealth.vo.receivable.ReceivableBackVO;
import cn.iocoder.yudao.module.wealth.vo.receivable.ReceivableOrderPayedFeeTypeVO; import cn.iocoder.yudao.module.wealth.vo.receivable.ReceivableOrderPayedFeeTypeVO;
import cn.iocoder.yudao.module.wealth.vo.receivable.ReceivableQueryVO; import cn.iocoder.yudao.module.wealth.vo.receivable.ReceivableQueryVO;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.*;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
...@@ -397,5 +395,10 @@ public interface ReceivableMapper extends AbstractMapper<ReceivableDO> { ...@@ -397,5 +395,10 @@ public interface ReceivableMapper extends AbstractMapper<ReceivableDO> {
"AND rb.order_id = #{orderId} ", "AND rb.order_id = #{orderId} ",
"</script>" "</script>"
}) })
List<ReceivableDO> allByOrderId(Long orderId); List<ReceivableDO> allByOrderId(@Param("orderId") Long orderId);
@Update({
"update ecw_receivable set `deleted` = 0 ,update_time = now() where `id` = #{receivableId}"
})
void revokeDeleteReceivableById(@Param("receivableId") Long receivableId);
} }
...@@ -73,7 +73,7 @@ public interface ReceivableService extends IService<ReceivableDO> { ...@@ -73,7 +73,7 @@ public interface ReceivableService extends IService<ReceivableDO> {
/** /**
* 删除应收款--内部接口,不会判断应收能不能进行删除,判断前置 * 删除应收款--内部接口,不会判断应收能不能进行删除,判断前置
* *
* @param orderId 编号 * @param orderId 编号
* @param feeSourceList 费用来源 1 订单计算 2 费用申请 3 特性费用 * @param feeSourceList 费用来源 1 订单计算 2 费用申请 3 特性费用
*/ */
void deleteReceivableByOrderIdAndFeeSource(Long orderId, Collection<Integer> feeSourceList); void deleteReceivableByOrderIdAndFeeSource(Long orderId, Collection<Integer> feeSourceList);
...@@ -81,7 +81,7 @@ public interface ReceivableService extends IService<ReceivableDO> { ...@@ -81,7 +81,7 @@ public interface ReceivableService extends IService<ReceivableDO> {
/** /**
* 删除应收款--内部接口,不会判断应收能不能进行删除,判断前置 * 删除应收款--内部接口,不会判断应收能不能进行删除,判断前置
* *
* @param orderId 订单ID * @param orderId 订单ID
* @param feeSource 费用来源:1 订单计算 2 费用申请 3 特需费用 * @param feeSource 费用来源:1 订单计算 2 费用申请 3 特需费用
*/ */
void deleteReceivableByOrderIdAndFeeSource(Long orderId, Integer feeSource); void deleteReceivableByOrderIdAndFeeSource(Long orderId, Integer feeSource);
...@@ -100,6 +100,7 @@ public interface ReceivableService extends IService<ReceivableDO> { ...@@ -100,6 +100,7 @@ public interface ReceivableService extends IService<ReceivableDO> {
* @param orderItemId 编号 * @param orderItemId 编号
*/ */
ReceivableDO getReceivableByOrderItemId(Long orderItemId, Integer feeType); ReceivableDO getReceivableByOrderItemId(Long orderItemId, Integer feeType);
/** /**
* 获得应收款 * 获得应收款
* *
...@@ -242,4 +243,11 @@ public interface ReceivableService extends IService<ReceivableDO> { ...@@ -242,4 +243,11 @@ public interface ReceivableService extends IService<ReceivableDO> {
List<ReceivableDO> allByOrderId(Long orderId); List<ReceivableDO> allByOrderId(Long orderId);
List<ReceivableDO> getOrderPayList(Collection<Long> orderIdList); List<ReceivableDO> getOrderPayList(Collection<Long> orderIdList);
/**
* 根据应收id撤销删除的应收单
*
* @param receivableId 应收id
*/
void revokeDeleteReceivableById(Long receivableId);
} }
...@@ -372,4 +372,9 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec ...@@ -372,4 +372,9 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
.in(ReceivableDO::getOrderId, orderIdList) .in(ReceivableDO::getOrderId, orderIdList)
); );
} }
@Override
public void revokeDeleteReceivableById(Long receivableId) {
receivableMapper.revokeDeleteReceivableById(receivableId);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment