|
|
@@ -118,11 +118,22 @@ public class MarketingCampaignServiceImpl
|
|
|
if (id == null) {
|
|
|
return Result.error("id不能为空");
|
|
|
}
|
|
|
+ MarketingCampaignDetailVO detailVO = new MarketingCampaignDetailVO();
|
|
|
+
|
|
|
// 1. 查询营销活动基本信息
|
|
|
MarketingCampaignEntity campaign = this.getById(id);
|
|
|
if (campaign == null || campaign.getIsDelete() == 1) {
|
|
|
return Result.error("营销活动不存在");
|
|
|
}
|
|
|
+ // 1.1 查询营销活动关联的SOP详情
|
|
|
+ Long sopId = campaign.getSopId();
|
|
|
+ if (sopId != null) {
|
|
|
+ // 1.2 查询SOP详情
|
|
|
+ SopDetailEntity sopDetail = sopDetailService.getById(sopId);
|
|
|
+ if (sopDetail != null && sopDetail.getIsDelete() == 0) {
|
|
|
+ detailVO.setSopDetail(sopDetail);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
// 2. 查询关联的SOP详情列表(通过中间表)
|
|
|
LambdaQueryWrapper<MarketingCampaignSopDetailEntity> wrapper = new LambdaQueryWrapper<>();
|
|
|
@@ -148,7 +159,6 @@ public class MarketingCampaignServiceImpl
|
|
|
// }
|
|
|
|
|
|
// 3. 组装VO
|
|
|
- MarketingCampaignDetailVO detailVO = new MarketingCampaignDetailVO();
|
|
|
detailVO.setCampaign(campaign);
|
|
|
detailVO.setSopDetailList(relationList);
|
|
|
detailVO.setCustomerList(customerEntityList);
|