增加更详细的注释 添加新的计划任务

This commit is contained in:
pixel
2020-02-23 21:49:16 +08:00
parent 9bfe7ffac7
commit 161bdc4d93
4 changed files with 20 additions and 7 deletions

View File

@@ -5,19 +5,22 @@ import (
"gin-vue-admin/tools"
)
//配置文件结构体
type System struct {
Config config.Config
}
func (s *System)GetSystemConfig()(err error,conf config.Config){
return nil,config.GinVueAdminconfig
//读取配置文件
func (s *System) GetSystemConfig() (err error, conf config.Config) {
return nil, config.GinVueAdminconfig
}
func (s *System)SetSystemConfig()(err error){
confs:= tools.StructToMap(s.Config)
for k,v:= range confs {
config.VTool.Set(k,v)
//设置配置文件
func (s *System) SetSystemConfig() (err error) {
confs := tools.StructToMap(s.Config)
for k, v := range confs {
config.VTool.Set(k, v)
}
err = config.VTool.WriteConfig()
return err
}
}