搜尋身份證號, 電話功能選項

This commit is contained in:
2025-12-26 01:46:07 +08:00
parent 2d3fb23c7b
commit c2a3c0e5bf
16 changed files with 528 additions and 154 deletions

View File

@@ -298,6 +298,34 @@ namespace Model
var timestamp = DateTime.Now.ToString("HHmmss");
return prefix + datePart + timestamp;
}
/// <summary>
/// 更新指定 follower 的 search_keywords 欄位
/// </summary>
/// <param name="followerId">follower 的 ID</param>
/// <returns>是否成功更新</returns>
public static bool UpdateSearchKeywords(int followerId)
{
try
{
using (var db = new Model.ezEntities())
{
var follower = db.followers.Find(followerId);
if (follower == null)
return false;
MyWeb.encrypt enc = new MyWeb.encrypt();
follower.search_keywords = enc.GenerateSearchKeywords(follower);
db.SaveChanges();
return true;
}
}
catch
{
return false;
}
}
}
}