mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-23 23:19:19 +08:00
remove: 移除废弃代码
This commit is contained in:
-5
@@ -143,7 +143,6 @@ public class BiProductOverviewServiceImpl implements BiProductOverviewService {
|
||||
int orderCount = productRow != null && productRow.getSalesOrderCount() != null
|
||||
? productRow.getSalesOrderCount()
|
||||
: sumOrders(thisProductDocs);
|
||||
BigDecimal refund = productRow != null ? nz(productRow.getRefundAmount()) : sumRefund(thisProductDocs);
|
||||
BigDecimal promo = productRow != null ? nz(productRow.getTotalPromotionFee()) : BigDecimal.ZERO;
|
||||
BigDecimal orderCost = productRow != null ? nz(productRow.getOrderCost())
|
||||
: sumCost(thisProductDocs);
|
||||
@@ -393,10 +392,6 @@ public class BiProductOverviewServiceImpl implements BiProductOverviewService {
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
}
|
||||
|
||||
private static BigDecimal sumRefund(List<BiOrderStatDailyProductDoc> docs) {
|
||||
return docs.stream().map(d -> nz(d.getRefundAmount())).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
}
|
||||
|
||||
private static BigDecimal sumCost(List<BiOrderStatDailyProductDoc> docs) {
|
||||
return docs.stream()
|
||||
.map(d -> nz(d.getProductCost()).add(nz(d.getFreightCost())).add(nz(d.getOtherCost())))
|
||||
|
||||
-1
@@ -3,7 +3,6 @@ package top.xyquan.ecomdmbbackend.modules.channel.pdd.adfee.importtask.service;
|
||||
import top.xyquan.ecomdmbbackend.common.model.dto.PageQueryDTO;
|
||||
import top.xyquan.ecomdmbbackend.common.model.vo.PageResultVO;
|
||||
import top.xyquan.ecomdmbbackend.modules.channel.pdd.adfee.importtask.model.dto.PddGoodsAdFeeImportTaskFilterDTO;
|
||||
import top.xyquan.ecomdmbbackend.modules.channel.pdd.adfee.importtask.model.dto.PddGoodsAdFeePipelineBatchStatusDTO;
|
||||
import top.xyquan.ecomdmbbackend.modules.channel.pdd.adfee.importtask.model.vo.PddGoodsAdFeeImportItemVO;
|
||||
import top.xyquan.ecomdmbbackend.modules.channel.pdd.adfee.importtask.model.vo.PddGoodsAdFeeImportTaskVO;
|
||||
import top.xyquan.ecomdmbbackend.modules.channel.pdd.adfee.importtask.model.vo.PddGoodsAdFeePipelineShopStatusVO;
|
||||
|
||||
+1
-5
@@ -634,11 +634,7 @@ public class PddOrderFullSyncTaskService {
|
||||
.last("LIMIT 1"));
|
||||
return pddShop != null && pddShop.getEcShopId() != null ? pddShop.getEcShopId() : task.getShopId();
|
||||
}
|
||||
|
||||
private static PddOrderFullSyncTaskVO toVo(PddOrderFullSyncTaskPO task) {
|
||||
return toVo(task, task.getShopId());
|
||||
}
|
||||
|
||||
|
||||
/** @param apiShopId 对前端暴露的店铺 ID(内部 ec_shop.id) */
|
||||
private static PddOrderFullSyncTaskVO toVo(PddOrderFullSyncTaskPO task, Long apiShopId) {
|
||||
return PddOrderFullSyncTaskVO.builder()
|
||||
|
||||
+3
-3
@@ -11,8 +11,7 @@ import top.xyquan.ecomdmbbackend.modules.channel.pdd.order.model.po.PddOrderPO;
|
||||
import top.xyquan.ecomdmbbackend.modules.channel.pdd.order.sync.model.PddOrderSyncShopContext;
|
||||
import top.xyquan.ecomdmbbackend.modules.channel.pdd.pop.order.PddOrderApiSnapshot;
|
||||
|
||||
import org.springframework.dao.CannotAcquireLockException;
|
||||
import org.springframework.dao.DeadlockLoserDataAccessException;
|
||||
import org.springframework.dao.PessimisticLockingFailureException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.support.TransactionTemplate;
|
||||
@@ -164,7 +163,8 @@ public class PddOrderUpsertService {
|
||||
private static boolean isDeadlock(Throwable e) {
|
||||
Throwable cur = e;
|
||||
while (cur != null) {
|
||||
if (cur instanceof DeadlockLoserDataAccessException || cur instanceof CannotAcquireLockException) {
|
||||
// Spring 6.0.3+:死锁/锁获取失败统一归入悲观锁失败基类(含 CannotAcquireLockException)
|
||||
if (cur instanceof PessimisticLockingFailureException) {
|
||||
return true;
|
||||
}
|
||||
String msg = cur.getMessage();
|
||||
|
||||
Reference in New Issue
Block a user