UPDATE:优化导入子计划检测配置逻辑
This commit is contained in:
@@ -1761,12 +1761,13 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
|
||||
}
|
||||
// 更新检测配置
|
||||
AdPlanTestConfig testConfig = subPlanMetaDataVO.getTestConfig();
|
||||
testConfig.setPlanId(plan.getId());
|
||||
if (testConfig != null) {
|
||||
Integer count = adPlanTestConfigService.lambdaQuery().eq(AdPlanTestConfig::getPlanId, testConfig.getPlanId()).count();
|
||||
Integer count = adPlanTestConfigService.lambdaQuery().eq(AdPlanTestConfig::getPlanId, plan.getId()).count();
|
||||
if (count.intValue() == 0) {
|
||||
adPlanTestConfigService.save(testConfig);
|
||||
} else {
|
||||
adPlanTestConfigService.update(testConfig, new LambdaUpdateWrapper<AdPlanTestConfig>().eq(AdPlanTestConfig::getPlanId, testConfig.getPlanId()));
|
||||
adPlanTestConfigService.update(testConfig, new LambdaUpdateWrapper<AdPlanTestConfig>().eq(AdPlanTestConfig::getPlanId, plan.getId()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user