1.应用详情页面时间显示不对,显0-0-0 0:0:0 2.提供应用删除功能,删除前需要判断应用下面没有任何关联订单和凭证等信息

This commit is contained in:
lu7213 committed 2026-10-25 10:06:33 -04:00
1 parent 101140f3c2
commit 6321cde4c0
8 files changed
+117 -12

No files matched your search

@@ -76,12 +76,33 @@ public class RentalController {
"SELECT id,name,status,notify_url,created_at,updated_at FROM rent_app WHERE id=? AND user_id=?",
id, user());
require(app != null, "应用不存在或无权访问");
// DATETIME(3) 约定存 UTC;统一输出毫秒,避免驱动返回 Timestamp/LocalDateTime 的差异。
for (String field : Arrays.asList("created_at", "updated_at")) {
if (app.get(field) != null) {
app.put(field, time(app.get(field)).toEpochMilli());
}
}
List<Map<String, Object>> credentials = store.rows(
"SELECT id,api_key,status,expires_at,created_at FROM rent_credential"
+ " WHERE owner_type='APP' AND owner_id=? ORDER BY id DESC", id);
for (Map<String, Object> credential : credentials) {
for (String field : Arrays.asList("created_at", "expires_at")) {
if (credential.get(field) != null) {
credential.put(field, time(credential.get(field)).toEpochMilli());
}
}
}
return AjaxResult.success(map("app", app, "credentials", credentials));
}
/** 仅允许删除本人未产生业务关联的空应用。 */
@DeleteMapping("/app/{id}")
@PreAuthorize("@ss.hasPermi('rent:portal:register') or @ss.hasPermi('rent:app:remove')")
public AjaxResult removeApp(@PathVariable long id) {
provisioning.deleteApp(id, user());
return AjaxResult.success();
}
@GetMapping("/manage/{resource}")
@PreAuthorize("@ss.hasPermi('rent:manage:list')")
public AjaxResult manage(