feat: 站点审核通过时弹出编辑框,支持审核者修改数据后再通过

- SiteReview.vue: 「通过」打开编辑弹窗,可改名称/地址/类型/状态/备注
- AdminController: approveChange 接受 request body(编辑数据)
- SiteService.approveChange: 优先用审核者编辑数据,否则用原始提交
- 拒绝保持原逻辑直接拒绝
This commit is contained in:
mediabot-pt
2026-06-30 13:00:05 +08:00
parent cc9a0155cc
commit e009d53cad
5 changed files with 91 additions and 18 deletions

View File

@@ -272,10 +272,17 @@ public class AdminController {
}
@PostMapping("/changes/{id}/approve")
public ApiResponse<Void> approveChange(@PathVariable Long id, HttpServletRequest request) {
public ApiResponse<Void> approveChange(@PathVariable Long id,
@RequestBody(required = false) Map<String, Object> body,
HttpServletRequest request) {
checkAdmin(request);
Long reviewerId = (Long) request.getAttribute("accountId");
siteService.approveChange(id, reviewerId);
String name = body != null ? (String) body.get("name") : null;
String baseUrl = body != null ? (String) body.get("baseUrl") : null;
String siteType = body != null ? (String) body.get("siteType") : null;
String status = body != null ? (String) body.get("status") : null;
String notes = body != null ? (String) body.get("notes") : null;
siteService.approveChange(id, reviewerId, name, baseUrl, siteType, status, notes);
log.info("Change approved: id={}, reviewer={}", id, reviewerId);
return ApiResponse.success();
}