From e78ba7e2ee25a4126911a07a8b8a56ef451deee7 Mon Sep 17 00:00:00 2001 From: songzhibin97 <718428482@qq.com> Date: Wed, 15 Sep 2021 17:42:28 +0800 Subject: [PATCH 1/7] fix:stype --- server/core/viper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/core/viper.go b/server/core/viper.go index 60ce695a..bfd2d70a 100644 --- a/server/core/viper.go +++ b/server/core/viper.go @@ -58,7 +58,7 @@ func Viper(path ...string) *viper.Viper { } global.GVA_CONFIG.AutoCode.Root, _ = filepath.Abs("..") global.BlackCache = local_cache.NewCache( - local_cache.SetDefaultExpire(time.Second * time.Duration(global.GVA_CONFIG.JWT.ExpiresTime)) - ) + local_cache.SetDefaultExpire(time.Second * time.Duration(global.GVA_CONFIG.JWT.ExpiresTime)), + ) return v } From b8049e9cb2f56d2a924696e0484f93f10d0f1e24 Mon Sep 17 00:00:00 2001 From: songzhibin97 <718428482@qq.com> Date: Wed, 15 Sep 2021 18:06:07 +0800 Subject: [PATCH 2/7] fix:style --- server/core/viper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/core/viper.go b/server/core/viper.go index 60ce695a..bfd2d70a 100644 --- a/server/core/viper.go +++ b/server/core/viper.go @@ -58,7 +58,7 @@ func Viper(path ...string) *viper.Viper { } global.GVA_CONFIG.AutoCode.Root, _ = filepath.Abs("..") global.BlackCache = local_cache.NewCache( - local_cache.SetDefaultExpire(time.Second * time.Duration(global.GVA_CONFIG.JWT.ExpiresTime)) - ) + local_cache.SetDefaultExpire(time.Second * time.Duration(global.GVA_CONFIG.JWT.ExpiresTime)), + ) return v } From ff531b2dec5190fd308022e1549730f9c48ba86f Mon Sep 17 00:00:00 2001 From: songzhibin97 <718428482@qq.com> Date: Wed, 15 Sep 2021 18:42:17 +0800 Subject: [PATCH 3/7] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/go.mod | 1 + server/go.sum | 1 + server/utils/md5.go | 4 +- server/utils/plugin/plugin_uinx.go | 2 +- server/utils/timer/timed_task_test.go | 65 +++++++++++++++++++++++++++ 5 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 server/utils/timer/timed_task_test.go diff --git a/server/go.mod b/server/go.mod index 58369fe1..0cfd9d05 100644 --- a/server/go.mod +++ b/server/go.mod @@ -25,6 +25,7 @@ require ( github.com/shirou/gopsutil v3.21.1+incompatible github.com/songzhibin97/gkit v1.1.1 github.com/spf13/viper v1.7.0 + github.com/stretchr/testify v1.7.0 // indirect github.com/swaggo/gin-swagger v1.3.0 github.com/swaggo/swag v1.7.0 github.com/tencentyun/cos-go-sdk-v5 v0.7.19 diff --git a/server/go.sum b/server/go.sum index 9a54896f..4cdf6692 100644 --- a/server/go.sum +++ b/server/go.sum @@ -463,6 +463,7 @@ github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= diff --git a/server/utils/md5.go b/server/utils/md5.go index 59ac0e14..252e8b0c 100644 --- a/server/utils/md5.go +++ b/server/utils/md5.go @@ -11,8 +11,8 @@ import ( //@param: str []byte //@return: string -func MD5V(str []byte) string { +func MD5V(str []byte, b ...byte) string { h := md5.New() h.Write(str) - return hex.EncodeToString(h.Sum(nil)) + return hex.EncodeToString(h.Sum(b)) } diff --git a/server/utils/plugin/plugin_uinx.go b/server/utils/plugin/plugin_uinx.go index 5d234ec2..1f8ca106 100644 --- a/server/utils/plugin/plugin_uinx.go +++ b/server/utils/plugin/plugin_uinx.go @@ -82,7 +82,7 @@ func loadPlugin(path string, f fs.FileInfo) error { fmt.Println("loadPlugin err ", fmt.Sprintf("path:%s 没有实现 %s 接口", filepath.Base(fPath), OnlyFuncName)) return errors.New("没有实现指定接口") } else { - + // todo } fmt.Println("loadPlugin add ", filepath.Base(fPath)) ManagementPlugin.SetPlugin(filepath.Base(fPath), p) diff --git a/server/utils/timer/timed_task_test.go b/server/utils/timer/timed_task_test.go new file mode 100644 index 00000000..560beb77 --- /dev/null +++ b/server/utils/timer/timed_task_test.go @@ -0,0 +1,65 @@ +package timer + +import ( + "fmt" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +var job = mockJob{} + +type mockJob struct{} + +func (job mockJob) Run() { + mockFunc() +} +func mockFunc() { + time.Sleep(time.Second) + fmt.Println("1s...") +} +func TestNewTimerTask(t *testing.T) { + tm := NewTimerTask() + _tm := tm.(*timer) + + { + _, err := tm.AddTaskByFunc("func", "@every 1s", mockFunc) + assert.Nil(t, err) + _, ok := _tm.taskList["func"] + if !ok { + t.Error("no find func") + } + } + + { + _, err := tm.AddTaskByJob("job", "@every 1s", job) + assert.Nil(t, err) + _, ok := _tm.taskList["job"] + if !ok { + t.Error("no find job") + } + } + + { + _, ok := tm.FindCron("func") + if !ok { + t.Error("no find func") + } + _, ok = tm.FindCron("job") + if !ok { + t.Error("no find job") + } + _, ok = tm.FindCron("none") + if ok { + t.Error("find none") + } + } + { + tm.Clear("func") + _, ok := tm.FindCron("func") + if ok { + t.Error("find func") + } + } +} From 263c7547bcba0720668774f58ce0ed60125fe1c0 Mon Sep 17 00:00:00 2001 From: MZZZ Date: Wed, 15 Sep 2021 20:18:59 +0800 Subject: [PATCH 4/7] Update viper.go core/viper.go:61:95: syntax error: unexpected newline, expecting comma or ) --- server/core/viper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/core/viper.go b/server/core/viper.go index 60ce695a..ddfdd217 100644 --- a/server/core/viper.go +++ b/server/core/viper.go @@ -58,7 +58,7 @@ func Viper(path ...string) *viper.Viper { } global.GVA_CONFIG.AutoCode.Root, _ = filepath.Abs("..") global.BlackCache = local_cache.NewCache( - local_cache.SetDefaultExpire(time.Second * time.Duration(global.GVA_CONFIG.JWT.ExpiresTime)) + local_cache.SetDefaultExpire(time.Second * time.Duration(global.GVA_CONFIG.JWT.ExpiresTime)), ) return v } From 69c75ee76943b5e36e0f1c9c4005d494b0c626d0 Mon Sep 17 00:00:00 2001 From: qimiao <303176530@qq.com> Date: Thu, 16 Sep 2021 10:19:54 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= =?UTF-8?q?=E6=80=A7=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/api/v1/example/exa_breakpoint_continue.go | 12 +++++++++++- server/middleware/email.go | 2 +- server/middleware/operation.go | 2 +- server/resource/template/server/service.go.tpl | 3 +++ server/service/autocode/autocodeExample.go | 3 +++ .../service/example/exa_breakpoint_continue.go | 3 +++ server/service/example/exa_customer.go | 3 +++ .../service/example/exa_file_upload_download.go | 6 ++++++ server/service/system/sys_authority.go | 16 +++++++++++++++- server/service/system/sys_autocode_history.go | 3 +++ server/service/system/sys_base_menu.go | 6 ++++++ server/service/system/sys_dictionary.go | 3 +++ server/service/system/sys_dictionary_detail.go | 3 +++ server/service/system/sys_initdb.go | 2 +- server/service/system/sys_operation_record.go | 3 +++ server/service/system/sys_user.go | 6 ++++++ server/utils/file_operations.go | 1 - server/utils/plugin/plugin_uinx.go | 1 + server/utils/timer/timed_task.go | 3 --- 19 files changed, 72 insertions(+), 9 deletions(-) diff --git a/server/api/v1/example/exa_breakpoint_continue.go b/server/api/v1/example/exa_breakpoint_continue.go index 9afbf279..cf20d55c 100644 --- a/server/api/v1/example/exa_breakpoint_continue.go +++ b/server/api/v1/example/exa_breakpoint_continue.go @@ -1,7 +1,9 @@ package example import ( + "fmt" "io/ioutil" + "mime/multipart" "strconv" "github.com/flipped-aurora/gin-vue-admin/server/global" @@ -38,7 +40,12 @@ func (u *FileUploadAndDownloadApi) BreakpointContinue(c *gin.Context) { response.FailWithMessage("文件读取失败", c) return } - defer f.Close() + defer func(f multipart.File) { + err := f.Close() + if err != nil { + fmt.Println(err) + } + }(f) cen, _ := ioutil.ReadAll(f) if !utils.CheckMd5(cen, chunkMd5) { global.GVA_LOG.Error("检查md5失败!", zap.Any("err", err)) @@ -120,6 +127,9 @@ func (u *FileUploadAndDownloadApi) RemoveChunk(c *gin.Context) { fileName := c.Query("fileName") filePath := c.Query("filePath") err := utils.RemoveChunk(fileMd5) + if err != nil { + return + } err = fileUploadAndDownloadService.DeleteFileChunk(fileMd5, fileName, filePath) if err != nil { global.GVA_LOG.Error("缓存切片删除失败!", zap.Any("err", err)) diff --git a/server/middleware/email.go b/server/middleware/email.go index 9ba328b9..9942599e 100644 --- a/server/middleware/email.go +++ b/server/middleware/email.go @@ -42,7 +42,7 @@ func ErrorToEmail() gin.HandlerFunc { c.Next() - latency := time.Now().Sub(now) + latency := time.Since(now) status := c.Writer.Status() record.ErrorMessage = c.Errors.ByType(gin.ErrorTypePrivate).String() str := "接收到的请求为" + record.Body + "\n" + "请求方式为" + record.Method + "\n" + "报错信息如下" + record.ErrorMessage + "\n" + "耗时" + latency.String() + "\n" diff --git a/server/middleware/operation.go b/server/middleware/operation.go index d6efd088..8e4539b2 100644 --- a/server/middleware/operation.go +++ b/server/middleware/operation.go @@ -62,7 +62,7 @@ func OperationRecord() gin.HandlerFunc { c.Next() - latency := time.Now().Sub(now) + latency := time.Since(now) record.ErrorMessage = c.Errors.ByType(gin.ErrorTypePrivate).String() record.Status = c.Writer.Status() record.Latency = latency diff --git a/server/resource/template/server/service.go.tpl b/server/resource/template/server/service.go.tpl index 8a40fc44..2fc99f19 100644 --- a/server/resource/template/server/service.go.tpl +++ b/server/resource/template/server/service.go.tpl @@ -80,6 +80,9 @@ func ({{.Abbreviation}}Service *{{.StructName}}Service)Get{{.StructName}}InfoLis {{- end }} {{- end }} err = db.Count(&total).Error + if err!=nil { + return + } err = db.Limit(limit).Offset(offset).Find(&{{.Abbreviation}}s).Error return err, {{.Abbreviation}}s, total } diff --git a/server/service/autocode/autocodeExample.go b/server/service/autocode/autocodeExample.go index 3d53c5aa..3f6e6205 100644 --- a/server/service/autocode/autocodeExample.go +++ b/server/service/autocode/autocodeExample.go @@ -71,6 +71,9 @@ func (autoCodeExampleService *AutoCodeExampleService) GetAutoCodeExampleInfoList db = db.Where("label LIKE ?", "%"+info.AutoCodeExampleField+"%") } err = db.Count(&total).Error + if err != nil { + return + } err = db.Limit(limit).Offset(offset).Find(&autoCodeExamples).Error return err, autoCodeExamples, total } diff --git a/server/service/example/exa_breakpoint_continue.go b/server/service/example/exa_breakpoint_continue.go index 23805a0d..afce53b2 100644 --- a/server/service/example/exa_breakpoint_continue.go +++ b/server/service/example/exa_breakpoint_continue.go @@ -58,6 +58,9 @@ func (e *FileUploadAndDownloadService) DeleteFileChunk(fileMd5 string, fileName var chunks []example.ExaFileChunk var file example.ExaFile err := global.GVA_DB.Where("file_md5 = ? AND file_name = ?", fileMd5, fileName).First(&file).Update("IsFinish", true).Update("file_path", filePath).Error + if err != nil { + return err + } err = global.GVA_DB.Where("exa_file_id = ?", file.ID).Delete(&chunks).Unscoped().Error return err } diff --git a/server/service/example/exa_customer.go b/server/service/example/exa_customer.go index 11f3d04c..b191eba9 100644 --- a/server/service/example/exa_customer.go +++ b/server/service/example/exa_customer.go @@ -68,6 +68,9 @@ func (exa *CustomerService) GetCustomerInfoList(sysUserAuthorityID string, info var a system.SysAuthority a.AuthorityId = sysUserAuthorityID err, auth := systemService.AuthorityServiceApp.GetAuthorityInfo(a) + if err != nil { + return + } var dataId []string for _, v := range auth.DataAuthorityId { dataId = append(dataId, v.AuthorityId) diff --git a/server/service/example/exa_file_upload_download.go b/server/service/example/exa_file_upload_download.go index d38e6946..14d0df5a 100644 --- a/server/service/example/exa_file_upload_download.go +++ b/server/service/example/exa_file_upload_download.go @@ -42,6 +42,9 @@ func (e *FileUploadAndDownloadService) FindFile(id uint) (error, example.ExaFile func (e *FileUploadAndDownloadService) DeleteFile(file example.ExaFileUploadAndDownload) (err error) { var fileFromDb example.ExaFileUploadAndDownload err, fileFromDb = e.FindFile(file.ID) + if err != nil { + return + } oss := upload.NewOss() if err = oss.DeleteFile(fileFromDb.Key); err != nil { return errors.New("文件删除失败") @@ -62,6 +65,9 @@ func (e *FileUploadAndDownloadService) GetFileRecordInfoList(info request.PageIn db := global.GVA_DB var fileLists []example.ExaFileUploadAndDownload err = db.Find(&fileLists).Count(&total).Error + if err != nil { + return + } err = db.Limit(limit).Offset(offset).Order("updated_at desc").Find(&fileLists).Error return err, fileLists, total } diff --git a/server/service/system/sys_authority.go b/server/service/system/sys_authority.go index 810966dd..8b47a2e8 100644 --- a/server/service/system/sys_authority.go +++ b/server/service/system/sys_authority.go @@ -44,6 +44,9 @@ func (authorityService *AuthorityService) CopyAuthority(copyInfo response.SysAut } copyInfo.Authority.Children = []system.SysAuthority{} err, menus := MenuServiceApp.GetMenuAuthority(&request.GetAuthorityId{AuthorityId: copyInfo.OldAuthorityId}) + if err != nil { + return + } var baseMenu []system.SysBaseMenu for _, v := range menus { intNum, _ := strconv.Atoi(v.MenuId) @@ -52,7 +55,9 @@ func (authorityService *AuthorityService) CopyAuthority(copyInfo response.SysAut } copyInfo.Authority.SysBaseMenus = baseMenu err = global.GVA_DB.Create(©Info.Authority).Error - + if err != nil { + return + } paths := CasbinServiceApp.GetPolicyPathByAuthorityId(copyInfo.OldAuthorityId) err = CasbinServiceApp.UpdateCasbin(copyInfo.Authority.AuthorityId, paths) if err != nil { @@ -87,11 +92,20 @@ func (authorityService *AuthorityService) DeleteAuthority(auth *system.SysAuthor } db := global.GVA_DB.Preload("SysBaseMenus").Where("authority_id = ?", auth.AuthorityId).First(auth) err = db.Unscoped().Delete(auth).Error + if err != nil { + return + } if len(auth.SysBaseMenus) > 0 { err = global.GVA_DB.Model(auth).Association("SysBaseMenus").Delete(auth.SysBaseMenus) + if err != nil { + return + } //err = db.Association("SysBaseMenus").Delete(&auth) } else { err = db.Error + if err != nil { + return + } } err = global.GVA_DB.Delete(&[]system.SysUseAuthority{}, "sys_authority_authority_id = ?", auth.AuthorityId).Error CasbinServiceApp.ClearCasbin(0, auth.AuthorityId) diff --git a/server/service/system/sys_autocode_history.go b/server/service/system/sys_autocode_history.go index 4bce5d02..8604af6a 100644 --- a/server/service/system/sys_autocode_history.go +++ b/server/service/system/sys_autocode_history.go @@ -111,6 +111,9 @@ func (autoCodeHistoryService *AutoCodeHistoryService) GetSysHistoryPage(info req db := global.GVA_DB var fileLists []system.SysAutoCodeHistory err = db.Find(&fileLists).Count(&total).Error + if err != nil { + return + } err = db.Limit(limit).Offset(offset).Order("updated_at desc").Select("id,created_at,updated_at,struct_name,struct_cn_name,flag,table_name").Find(&fileLists).Error return err, fileLists, total } diff --git a/server/service/system/sys_base_menu.go b/server/service/system/sys_base_menu.go index 776c40f3..2bdde5c4 100644 --- a/server/service/system/sys_base_menu.go +++ b/server/service/system/sys_base_menu.go @@ -23,10 +23,16 @@ func (baseMenuService *BaseMenuService) DeleteBaseMenu(id float64) (err error) { var menu system.SysBaseMenu db := global.GVA_DB.Preload("SysAuthoritys").Where("id = ?", id).First(&menu).Delete(&menu) err = global.GVA_DB.Delete(&system.SysBaseMenuParameter{}, "sys_base_menu_id = ?", id).Error + if err != nil { + return err + } if len(menu.SysAuthoritys) > 0 { err = global.GVA_DB.Model(&menu).Association("SysAuthoritys").Delete(&menu.SysAuthoritys) } else { err = db.Error + if err != nil { + return + } } } else { return errors.New("此菜单存在子菜单不可删除") diff --git a/server/service/system/sys_dictionary.go b/server/service/system/sys_dictionary.go index 37f05b69..4dfc9601 100644 --- a/server/service/system/sys_dictionary.go +++ b/server/service/system/sys_dictionary.go @@ -99,6 +99,9 @@ func (dictionaryService *DictionaryService) GetSysDictionaryInfoList(info reques db = db.Where("`desc` LIKE ?", "%"+info.Desc+"%") } err = db.Count(&total).Error + if err != nil { + return + } err = db.Limit(limit).Offset(offset).Find(&sysDictionarys).Error return err, sysDictionarys, total } diff --git a/server/service/system/sys_dictionary_detail.go b/server/service/system/sys_dictionary_detail.go index a8aca53e..f227b5ea 100644 --- a/server/service/system/sys_dictionary_detail.go +++ b/server/service/system/sys_dictionary_detail.go @@ -79,6 +79,9 @@ func (dictionaryDetailService *DictionaryDetailService) GetSysDictionaryDetailIn db = db.Where("sys_dictionary_id = ?", info.SysDictionaryID) } err = db.Count(&total).Error + if err != nil { + return + } err = db.Limit(limit).Offset(offset).Find(&sysDictionaryDetails).Error return err, sysDictionaryDetails, total } diff --git a/server/service/system/sys_initdb.go b/server/service/system/sys_initdb.go index 45d3b747..25b03fbd 100644 --- a/server/service/system/sys_initdb.go +++ b/server/service/system/sys_initdb.go @@ -53,7 +53,7 @@ func (initDBService *InitDBService) createTable(dsn string, driver string, creat defer func(db *sql.DB) { err := db.Close() if err != nil { - + fmt.Println(err) } }(db) if err = db.Ping(); err != nil { diff --git a/server/service/system/sys_operation_record.go b/server/service/system/sys_operation_record.go index 49811b8f..9e7e6a0a 100644 --- a/server/service/system/sys_operation_record.go +++ b/server/service/system/sys_operation_record.go @@ -79,6 +79,9 @@ func (operationRecordService *OperationRecordService) GetSysOperationRecordInfoL db = db.Where("status = ?", info.Status) } err = db.Count(&total).Error + if err != nil { + return + } err = db.Order("id desc").Limit(limit).Offset(offset).Preload("User").Find(&sysOperationRecords).Error return err, sysOperationRecords, total } diff --git a/server/service/system/sys_user.go b/server/service/system/sys_user.go index ebdd8908..a467569c 100644 --- a/server/service/system/sys_user.go +++ b/server/service/system/sys_user.go @@ -70,6 +70,9 @@ func (userService *UserService) GetUserInfoList(info request.PageInfo) (err erro db := global.GVA_DB.Model(&system.SysUser{}) var userList []system.SysUser err = db.Count(&total).Error + if err != nil { + return + } err = db.Limit(limit).Offset(offset).Preload("Authorities").Preload("Authority").Find(&userList).Error return err, userList, total } @@ -125,6 +128,9 @@ func (userService *UserService) SetUserAuthorities(id uint, authorityIds []strin func (userService *UserService) DeleteUser(id float64) (err error) { var user system.SysUser err = global.GVA_DB.Where("id = ?", id).Delete(&user).Error + if err != nil { + return err + } err = global.GVA_DB.Delete(&[]system.SysUseAuthority{}, "sys_user_id = ?", id).Error return err } diff --git a/server/utils/file_operations.go b/server/utils/file_operations.go index 0e747773..0444a74c 100644 --- a/server/utils/file_operations.go +++ b/server/utils/file_operations.go @@ -65,5 +65,4 @@ func TrimSpace(target interface{}) { v.Field(i).SetString(strings.TrimSpace(v.Field(i).String())) } } - return } diff --git a/server/utils/plugin/plugin_uinx.go b/server/utils/plugin/plugin_uinx.go index 1f8ca106..8317f1f0 100644 --- a/server/utils/plugin/plugin_uinx.go +++ b/server/utils/plugin/plugin_uinx.go @@ -83,6 +83,7 @@ func loadPlugin(path string, f fs.FileInfo) error { return errors.New("没有实现指定接口") } else { // todo + fmt.Println("todo...") } fmt.Println("loadPlugin add ", filepath.Base(fPath)) ManagementPlugin.SetPlugin(filepath.Base(fPath), p) diff --git a/server/utils/timer/timed_task.go b/server/utils/timer/timed_task.go index 881fddeb..336e84db 100644 --- a/server/utils/timer/timed_task.go +++ b/server/utils/timer/timed_task.go @@ -62,7 +62,6 @@ func (t *timer) StartTask(taskName string) { if v, ok := t.taskList[taskName]; ok { v.Start() } - return } // StopTask 停止任务 @@ -72,7 +71,6 @@ func (t *timer) StopTask(taskName string) { if v, ok := t.taskList[taskName]; ok { v.Stop() } - return } // Remove 从taskName 删除指定任务 @@ -82,7 +80,6 @@ func (t *timer) Remove(taskName string, id int) { if v, ok := t.taskList[taskName]; ok { v.Remove(cron.EntryID(id)) } - return } // Clear 清除任务 From d7cafbf509057b0f1e7e3905e6fdc3f0560a0cd9 Mon Sep 17 00:00:00 2001 From: songzhibin97 <718428482@qq.com> Date: Thu, 16 Sep 2021 14:28:20 +0800 Subject: [PATCH 6/7] Update main.go --- server/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/main.go b/server/main.go index c82e084b..0a74adb3 100644 --- a/server/main.go +++ b/server/main.go @@ -30,4 +30,5 @@ func main() { defer db.Close() } core.RunWindowsServer() + } From 122c284cd0c8552bc97d582557b06ed70e7e19d4 Mon Sep 17 00:00:00 2001 From: piexlmax Date: Fri, 17 Sep 2021 10:06:57 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E6=B8=85=E9=99=A4=E5=A4=9A=E4=BD=99public?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B9=EF=BC=8C=E4=BF=AE=E5=A4=8Dico?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/favicon.ico | Bin 0 -> 4286 bytes web/public/favicon.ico | Bin 4286 -> 0 bytes web/public/index.html | 17 ----------------- 3 files changed, 17 deletions(-) create mode 100644 web/favicon.ico delete mode 100644 web/public/favicon.ico delete mode 100644 web/public/index.html diff --git a/web/favicon.ico b/web/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..ee520ce4b34e962134995910c368ccd4870a774e GIT binary patch literal 4286 zcmeHLTT`1w7>@tIEAJe8>5Su@(}|5T%xJ9_N(XEiTc@=$IMz;!*cPYLX~j}$iwJ|1 zKu9Tu01`mT`H(;YNgxnTDG)*kkYbcWDJ`cYUk+dLxVx5=LPudTtv4*Q`F8hx-{*Pv z+1>BkK_GaE{O#EzpuYme%L2hG0)gOlQpu1Yl2kg*3bAc2*e$yX>?(lOm1Q{BR>8U5 z;5awDUJsnkwU9E@=JWYjU0!+!KWQ&MSYUC~$wOiS0UmCb3y&5bU~P4UjB)V$eWd!~ zcDvwmISHW(48>*pJ*2ADvqf4tsO=T(UljE45n?XfsA^N)Y=;`c0 zOMMmkja|$>W*&mgI*N|AW)jl|jj9n1)#Xq%)u6Sx7K44=7#%i2qikStrv4s=HEo|< zr^n>@7<3vXbnPlM)>NSWjsh}iHkxWHS$uy_CzK?=X2MHzw2a(ETT2~&ljUQ4%*^sK z=rzbrPl2&Z3w?Vly7lcSDa?a7GZpfJ9Mn~np-Le~nOutUlH1tGPqk{U`yEDu7LUZuZE7&mpI7&PzubF-))w8`mqNQxuyQTO7AJ5b%3pk)D7p z>j0b+I@t1$LYMF=rtVxpkbm<1ScjW>%>Rp2gk!Nnq+Pi{__yY{?*Cs;%3;nw0n5+t z!M{2WZebGhJqqw1CuaU~psqoN#WhC=hVjcIAeM=6>ZB0YlfPr{zL3KX8&qSnG!8@8 zBH&+{3q@Nk!$>;)1&+kLgIl#{;aD;;8|BX<{CRQ_E?%PiN$hljp+SvLW*W<827=Unuo8sGpRux(DN@jWP-e29Wl%wj zY84_aq9}^Am9-cWTD5GGEo#+5Fi2wX_P*bo+xO!)p*7B;iKlbFd(U~_d(U?#hLj56 zPhFkj-|A6~Qk#@g^#D^U0XT1cu=c-vu1+SElX9NR;kzAUV(q0|dl0|%h|dI$%VICy zJnu2^L*Te9JrJMGh%-P79CL0}dq92RGU6gI{v2~|)p}sG5x0U*z<8U;Ij*hB9z?ei z@g6Xq-pDoPl=MANPiR7%172VA%r)kevtV-_5H*QJKFmd;8yA$98zCxBZYXTNZ#QFk2(TX0;Y2dt&WitL#$96|gJY=3xX zpCoi|YNzgO3R`f@IiEeSmKrPSf#h#Qd<$%Ej^RIeeYfsxhPMOG`S`Pz8q``=511zm zAm)MX5AV^5xIWPyEu7u>qYs?pn$I4nL9J!=K=SGlKLXpE<5x+2cDTXq?brj?n6sp= zphe9;_JHf40^9~}9i08r{XM$7HB!`{Ys~TK0kx<}ZQng`UPvH*11|q7&l9?@FQz;8 zx!=3<4seY*%=OlbCbcae?5^V_}*K>Uo6ZWV8mTyE^B=DKy7-sdLYkR5Z?paTgK-zyIkKjIcpyO z{+uIt&YSa_$QnN_@t~L014dyK(fOOo+W*MIxbA6Ndgr=Y!f#Tokqv}n<7-9qfHkc3 z=>a|HWqcX8fzQCT=dqVbogRq!-S>H%yA{1w#2Pn;=e>JiEj7Hl;zdt-2f+j2%DeVD zsW0Ab)ZK@0cIW%W7z}H{&~yGhn~D;aiP4=;m-HCo`BEI+Kd6 z={Xwx{TKxD#iCLfl2vQGDitKtN>z|-AdCN|$jTFDg0m3O`WLD4_s#$S diff --git a/web/public/index.html b/web/public/index.html deleted file mode 100644 index 3e5a1396..00000000 --- a/web/public/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - <%= htmlWebpackPlugin.options.title %> - - - -
- - -