优化代码

This commit is contained in:
GoEdgeLab
2022-03-22 21:45:07 +08:00
parent 2b0e2b6888
commit 1e4143bcbb
148 changed files with 340 additions and 315 deletions

View File

@@ -890,7 +890,7 @@ func (this *ServerDAO) ComposeServerConfig(tx *dbs.Tx, server *Server, cacheMap
config.Id = int64(server.Id)
config.ClusterId = int64(server.ClusterId)
config.Type = server.Type
config.IsOn = server.IsOn == 1
config.IsOn = server.IsOn
config.Name = server.Name
config.Description = server.Description
@@ -1085,7 +1085,7 @@ func (this *ServerDAO) ComposeServerConfig(tx *dbs.Tx, server *Server, cacheMap
if err != nil {
return nil, err
}
if userPlan != nil && userPlan.IsOn == 1 {
if userPlan != nil && userPlan.IsOn {
if len(userPlan.DayTo) == 0 {
userPlan.DayTo = DefaultUserPlanMaxDay
}