Compare commits

...

2 Commits

Author SHA1 Message Date
gxwebsoft b5e4c95fc6 feat(cms): 添加页面附件字段支持
- 在 CmsPage 实体类中新增 attachments 字段
- attachments 字段类型为 JSON 数组字符串,包含 name/url/size/ext/sort 信息
- 为 attachments 字段添加相应的 @Schema 注解描述
2026-08-07 18:36:58 +08:00
gxwebsoft 8f3e337b9c feat(cms): 同步域名到租户表保证一致性
- 在保存网站信息后同步 cms_website.domain 到 company.app_domain 字段
- 去除域名前缀的 http(s):// 以保持与前端处理一致
- 添加异常捕获,防止同步失败影响主流程
- 通过 tenantId 关联查询对应租户公司信息并更新域名字段
- 记录同步失败的警告日志,便于问题排查
2026-08-06 23:05:09 +08:00
2 changed files with 5 additions and 3 deletions
@@ -64,6 +64,9 @@ public class CmsPage implements Serializable {
@Schema(description = "备注") @Schema(description = "备注")
private String comments; private String comments;
@Schema(description = "页面附件(JSON 数组字符串,元素含 name/url/size/ext/sort)")
private String attachments;
@Schema(description = "阅读量") @Schema(description = "阅读量")
private Integer views; private Integer views;
@@ -210,9 +210,8 @@ public class CmsWebsiteServiceImpl extends ServiceImpl<CmsWebsiteMapper, CmsWebs
try { try {
Company company = companyService.getByTenantIdRel(loginUser.getTenantId()); Company company = companyService.getByTenantIdRel(loginUser.getTenantId());
if (company != null) { if (company != null) {
// 去掉 http(s):// 前缀,与前端处理保持一致 // 默认域名由前端带上 https:// 前缀,自定义域名已去除前缀,此处原样保存
String cleanDomain = website.getDomain().replaceFirst("^(https?://)", ""); company.setDomain(website.getDomain());
company.setDomain(cleanDomain);
companyService.updateById(company); companyService.updateById(company);
} }
} catch (Exception e) { } catch (Exception e) {