feat(theme): 皮肤包管理收敛与命名批次-兜底catch经wrapFailure先log.error记原始堆栈再包装(upload/derive/updateMeta三处,extractZip/deleteRecursively静默吞改warn/debug);内置包改显示名走.meta覆盖层(ThemeRegistry加载后覆写title/description,updateMeta放开内置:全空=恢复默认,params拒改);derive/upload支持表单命名(theme.json改写regex换ObjectMapper防误替换,upload落位前改staging失败不落位);resolveTheme回退warn补站点编码;ThemeVo.editable语义改为可编辑元数据;附内置包mint-breeze/fresh-mint2与R1学校主站编码迁移SQL;308/308全绿
build / build-push (push) Successful in 48s
build / build-push (push) Successful in 48s
This commit is contained in:
@@ -48,27 +48,34 @@ public class ThemeController {
|
||||
return themeService.list();
|
||||
}
|
||||
|
||||
/** W1(G2):上传合规 zip——立即注册(免重启);不合规返回逐条校验报告,不落盘不注册 */
|
||||
/** W1(G2):上传合规 zip——立即注册(免重启);不合规返回逐条校验报告,不落盘不注册。
|
||||
* 任务四:title/description 选填,落位前改写包内 theme.json(留空沿用包内声明) */
|
||||
@PostMapping("/upload")
|
||||
public com.yunhai.cms.model.vo.ThemeVo upload(BoaUser authUserWithDept, @RequestParam("file") MultipartFile file) {
|
||||
ThemeInfo info = themePackageService.upload(authUserWithDept, file);
|
||||
public com.yunhai.cms.model.vo.ThemeVo upload(BoaUser authUserWithDept,
|
||||
@RequestParam("file") MultipartFile file,
|
||||
@RequestParam(value = "title", required = false) String title,
|
||||
@RequestParam(value = "description", required = false) String description) {
|
||||
ThemeInfo info = themePackageService.upload(authUserWithDept, file, title, description);
|
||||
return themeService.voOf(info);
|
||||
}
|
||||
|
||||
/** W1(G3):从现有包派生新皮肤(复制包体+改名,外部包可编辑可删除) */
|
||||
/** W1(G3):从现有包派生新皮肤(复制包体+改名,外部包可编辑可删除);任务四支持同步命名 */
|
||||
@PostMapping("/derive")
|
||||
public com.yunhai.cms.model.vo.ThemeVo derive(BoaUser authUserWithDept,
|
||||
@RequestBody com.yunhai.cms.model.dto.ThemeDeriveRequest req) {
|
||||
ThemeInfo info = themePackageService.derive(authUserWithDept, req.getSource(), req.getName());
|
||||
ThemeInfo info = themePackageService.derive(authUserWithDept, req.getSource(), req.getName(),
|
||||
req.getTitle(), req.getDescription());
|
||||
return themeService.voOf(info);
|
||||
}
|
||||
|
||||
/** W1(G4):编辑外部包 theme.json 的 title 与参数 schema(保存后引用站点立即生效) */
|
||||
/** W1(G4)+ 任务四:编辑元数据——外部包写 theme.json(title/描述/参数 schema),
|
||||
* 内置包显示名/描述写 .meta 覆盖层(参数 schema 拒改),保存后引用站点立即生效 */
|
||||
@PutMapping("/{name}/meta")
|
||||
public com.yunhai.cms.model.vo.ThemeVo updateMeta(BoaUser authUserWithDept,
|
||||
@PathVariable("name") String name,
|
||||
@RequestBody com.yunhai.cms.model.dto.ThemeMetaRequest req) {
|
||||
ThemeInfo info = themePackageService.updateMeta(authUserWithDept, name, req.getTitle(), req.getParams());
|
||||
ThemeInfo info = themePackageService.updateMeta(authUserWithDept, name,
|
||||
req.getTitle(), req.getDescription(), req.getParams());
|
||||
return themeService.voOf(info);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user