Compare commits

..

3 Commits

Author SHA1 Message Date
ArvinLovegood
06967420f8 feat(app):添加股票基础信息自动检查功能
- 在应用启动时检查股票基础信息是否为空
- 如果为空,则自动调用 CheckStockBaseInfo 方法获取数据
-每天凌晨 2 点定时检查股票基础信息
2025-08-26 10:45:17 +08:00
ArvinLovegood
6f4eb0ac86 refactor(backend): 移除未使用的导入语句
- 删除了 "C" 的导入语句,该语句在代码中未被使用
- 优化代码结构,提高代码的可读性和维护性
2025-08-24 20:11:57 +08:00
ArvinLovegood
f59255cc6c style:调整 Windows特定代码的构建标签
- 在 alert_windows_api.go 和 alert_windows_api_test.go 文件中添加额外的 +build windows 标签
- 优化代码结构,提高代码的可读性和可维护性
2025-08-24 16:29:57 +08:00
3 changed files with 12 additions and 3 deletions

6
app.go
View File

@@ -465,6 +465,12 @@ func (a *App) domReady(ctx context.Context) {
//检查新版本
go func() {
a.CheckUpdate(0)
count := int64(0)
db.Dao.Model(&data.StockBasic{}).Count(&count)
if count <= 0 {
go a.CheckStockBaseInfo(a.ctx)
}
a.cron.AddFunc("0 0 2 * * *", func() {
logger.SugaredLogger.Errorf("Checking for updates...")
a.CheckStockBaseInfo(a.ctx)

View File

@@ -1,11 +1,12 @@
//go:build windows
// +build windows
package data
import "C"
import (
"github.com/go-toast/toast"
"go-stock/backend/logger"
"github.com/go-toast/toast"
)
// AlertWindowsApi @Author spark

View File

@@ -1,11 +1,13 @@
//go:build windows
// +build windows
package data
import (
"github.com/go-toast/toast"
"go-stock/backend/logger"
"testing"
"github.com/go-toast/toast"
)
// @Author spark