|
@@ -258,6 +258,11 @@ public class DistributeServiceImpl implements DistributeService {
|
|
|
//特殊平台 按规格分销比例
|
|
//特殊平台 按规格分销比例
|
|
|
List<UserPlatSkuDistributeRate> skuRates = userDistributeReq.getSkuRates();
|
|
List<UserPlatSkuDistributeRate> skuRates = userDistributeReq.getSkuRates();
|
|
|
if (CollUtil.isNotEmpty(skuRates)) {
|
|
if (CollUtil.isNotEmpty(skuRates)) {
|
|
|
|
|
+ List<Long> skuIds = skuRates.stream().map(UserPlatSkuDistributeRate::getSkuId).collect(Collectors.toList());
|
|
|
|
|
+ userPlatSkuDistributeRateMapper.delete(Wrappers.lambdaQuery(UserPlatSkuDistributeRate.class)
|
|
|
|
|
+ .notIn(UserPlatSkuDistributeRate::getSkuId, skuIds)
|
|
|
|
|
+ .eq(UserPlatSkuDistributeRate::getDistributeId, userDistribute.getId()));
|
|
|
|
|
+
|
|
|
Map<Long, GoodsDon> map = new ConcurrentHashMap<>();
|
|
Map<Long, GoodsDon> map = new ConcurrentHashMap<>();
|
|
|
for (UserPlatSkuDistributeRate skuRate : skuRates) {
|
|
for (UserPlatSkuDistributeRate skuRate : skuRates) {
|
|
|
if (skuRate.getRate() == null) {
|
|
if (skuRate.getRate() == null) {
|
|
@@ -287,6 +292,9 @@ public class DistributeServiceImpl implements DistributeService {
|
|
|
} catch (DuplicateKeyException e) {
|
|
} catch (DuplicateKeyException e) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ } else {
|
|
|
|
|
+ userPlatSkuDistributeRateMapper.delete(Wrappers.lambdaQuery(UserPlatSkuDistributeRate.class)
|
|
|
|
|
+ .eq(UserPlatSkuDistributeRate::getDistributeId, userDistribute.getId()));
|
|
|
}
|
|
}
|
|
|
handlerDistributeOtherFunc(userDistribute, userDistributeReq);
|
|
handlerDistributeOtherFunc(userDistribute, userDistributeReq);
|
|
|
}
|
|
}
|