feat: update footer with site policies, add CTA retrieval SQL, and refactor block content management

This commit is contained in:
2026-07-17 22:07:01 +07:00
parent 49b8d2b2ea
commit 6af9240c22
59 changed files with 140 additions and 612 deletions
@@ -0,0 +1,40 @@
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
public class UpdateLivestreamPost {
public static void main(String[] args) {
try {
Class.forName("oracle.jdbc.OracleDriver");
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521/sisvietnam", "sisvietnam", "sisvietnam");
String postTitle = "Tuần 1";
String postExcerpt = "SIS Vì Sức khỏe Cộng đồng kỳ 134 Thoát vị đĩa đệm Khi nào mới phẫu thuật?";
String postContent = "Đau lưng, đau cổ, tê tay, tê chân... là những triệu chứng thường gặp của thoát vị đĩa đệm. Tuy nhiên, không phải ai mắc bệnh cũng cần phẫu thuật.\n" +
"⚠️ Vậy khi nào nên điều trị bảo tồn? Khi nào cần phẫu thuật? Làm sao để tránh bỏ lỡ \"thời điểm vàng\" điều trị?\n" +
"Cùng lắng nghe những chia sẻ từ các chuyên gia trong chương trình Livestream \"S.I.S vì sức khỏe cộng đồng\" vào lúc 𝟏𝟗𝐡𝟒𝟓 Thứ Ba, ngày 𝟎𝟕/𝟎𝟕/𝟐𝟎𝟐𝟔.\n" +
"📌 Đồng hành và tư vấn trực tiếp cùng quý khán giả là các bác sĩ giàu kinh nghiệm tại Bệnh viện ĐKQT S.I.S Cần Thơ:\n" +
"• BS.CKI Nguyễn Quang Hưng, chuyên khoa Ngoại Thần kinh\n" +
"• BS.CKI Trương Đan Kha, chuyên khoa Vật lý trị liệu - Phục hồi chức năng \n" +
"• ThS.BS Lê Thị Chi Lan, chuyên khoa Ngoại Thần kinh.";
String embedUrl = "https://www.youtube.com/embed/j63kT9Bjrb4";
PreparedStatement updatePost = conn.prepareStatement(
"UPDATE sis_post SET title = ?, content = ?, excerpt = ?, meta_description = ?, featured_image = ? WHERE slug = 'sis-vi-suc-khoe-cong-dong-ky-134'"
);
updatePost.setString(1, postTitle);
updatePost.setString(2, postContent);
updatePost.setString(3, postExcerpt);
updatePost.setString(4, embedUrl);
updatePost.setString(5, "/uploads/livestream/livestream_tuan1.jpg");
int rows = updatePost.executeUpdate();
System.out.println("Updated rows: " + rows);
conn.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}