|
|
@ -173,9 +173,10 @@ public class CmsWebsiteServiceImpl extends ServiceImpl<CmsWebsiteMapper, CmsWebs |
|
|
|
// cmsWebsiteSettingService.save(setting);
|
|
|
|
|
|
|
|
// 将网站创建者的userId做为查询条件 10257(4716),10324(6978),10398(26564)
|
|
|
|
Integer websiteUserId = website.getTemplateId() != null ? website.getTemplateId() : 0; |
|
|
|
|
|
|
|
Integer websiteUserId = website.getTemplateId(); |
|
|
|
|
|
|
|
// 只有当templateId存在时才执行复制操作
|
|
|
|
if (websiteUserId != null && websiteUserId > 0) { |
|
|
|
// TODO 国际化
|
|
|
|
final CmsLangLogParam cmsLangLogParam = new CmsLangLogParam(); |
|
|
|
cmsLangLogParam.setWebsiteUserId(websiteUserId); |
|
|
@ -224,17 +225,6 @@ public class CmsWebsiteServiceImpl extends ServiceImpl<CmsWebsiteMapper, CmsWebs |
|
|
|
}); |
|
|
|
cmsLinkService.saveBatch(links); |
|
|
|
|
|
|
|
// TODO 复制订单
|
|
|
|
// CmsOrderParam cmsOrderParam = new CmsOrderParam();
|
|
|
|
// cmsOrderParam.setWebsiteUserId(websiteUserId);
|
|
|
|
// final List<CmsOrder> orders = cmsOrderMapper.selectListAllRel(cmsOrderParam);
|
|
|
|
// orders.forEach(d -> {
|
|
|
|
// d.setUserId(loginUser.getUserId());
|
|
|
|
// d.setTenantId(loginUser.getTenantId());
|
|
|
|
// });
|
|
|
|
// cmsOrderService.saveBatch(orders);
|
|
|
|
|
|
|
|
|
|
|
|
// TODO 复制栏目和文章、文章内容
|
|
|
|
CmsNavigationParam cmsNavigationParam = new CmsNavigationParam(); |
|
|
|
cmsNavigationParam.setWebsiteUserId(websiteUserId); |
|
|
@ -290,6 +280,9 @@ public class CmsWebsiteServiceImpl extends ServiceImpl<CmsWebsiteMapper, CmsWebs |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
log.warn("没有有效的模板ID,跳过复制操作"); |
|
|
|
} |
|
|
|
|
|
|
|
// 新增项目
|
|
|
|
final Project project = new Project(); |
|
|
|