|
|
@@ -567,7 +567,7 @@ public class DistributeController {
|
|
|
|
|
|
//删除存在告警的平台规格
|
|
|
distributeGoodsSkuAlertMapper.delete(Wrappers.lambdaQuery(DistributeGoodsSkuAlert.class)
|
|
|
- .in(DistributeGoodsSkuAlert::getSkuId, businessRate.getSkuId()));
|
|
|
+ .eq(DistributeGoodsSkuAlert::getSkuId, businessRate.getSkuId()));
|
|
|
|
|
|
} catch (DuplicateKeyException e) {
|
|
|
}
|
|
|
@@ -943,6 +943,7 @@ public class DistributeController {
|
|
|
List<CmsUserVO> userVOS = beanSearcher.searchAll(CmsUserVO.class, MapUtils.builder().field(CmsUserVO::getRoleNames, "商务").op(Operator.Contain).build());
|
|
|
List<Long> collect = userVOS.stream().map(CmsUserVO::getId).collect(Collectors.toList());
|
|
|
final List<Long> businessIds = collect;
|
|
|
+ List<Long> newDsSkuIds = new ArrayList<>();
|
|
|
generalRates.forEach(data -> {
|
|
|
if (data.getId() == null) {
|
|
|
try {
|
|
|
@@ -961,6 +962,7 @@ public class DistributeController {
|
|
|
if (CollUtil.isNotEmpty(businessIds)) {
|
|
|
userDistributeBusinessRateMapper.insertOrUpdateBusinessGoodsSkuRate(businessIds, data.getGoodsId(), data.getSkuId(), firstOrderRate, renewOrderRate);
|
|
|
}
|
|
|
+ newDsSkuIds.add(data.getSkuId());
|
|
|
} catch (DuplicateKeyException e) {
|
|
|
}
|
|
|
return;
|
|
|
@@ -982,12 +984,19 @@ public class DistributeController {
|
|
|
}
|
|
|
if (is_change.get()) {
|
|
|
businessGeneralRateMapper.updateById(data);
|
|
|
+ newDsSkuIds.add(data.getSkuId());
|
|
|
if (CollUtil.isNotEmpty(businessIds)) {
|
|
|
//获取所有商务
|
|
|
userDistributeBusinessRateMapper.insertOrUpdateBusinessGoodsSkuRate(businessIds, data.getGoodsId(), data.getSkuId(), firstOrderRate_new, renewOrderRate_new);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (CollUtil.isNotEmpty(newDsSkuIds)) {
|
|
|
+ //删除存在告警的平台规格
|
|
|
+ distributeGoodsSkuAlertMapper.delete(Wrappers.lambdaQuery(DistributeGoodsSkuAlert.class)
|
|
|
+ .in(DistributeGoodsSkuAlert::getSkuId, newDsSkuIds));
|
|
|
+ }
|
|
|
});
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|