增加pgx驱动,完善前端的代码,暂定supabase后端数据库

This commit is contained in:
2025-05-21 08:50:34 +08:00
parent 9f2fb09157
commit 66980958f5
13 changed files with 126 additions and 85 deletions

28
signals/issueID.go Normal file
View File

@@ -0,0 +1,28 @@
package signals
import (
"sync"
//"zsxyww.com/scheduler/database"
)
var IssueID int
var IssueIDMutex sync.Mutex
func init() {
//启动程序时从数据库获取最后的IssueID用来初始化程序的IssueID变量
}
// IssueID++
func IssueIDPP() {
IssueIDMutex.Lock()
IssueID++
IssueIDMutex.Unlock()
}
func GetIssueID() int {
IssueIDMutex.Lock()
defer IssueIDMutex.Unlock()
return IssueID
}