You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
531 B
24 lines
531 B
package service |
|
|
|
import ( |
|
"context" |
|
|
|
"go-common/app/admin/main/macross/model/publish" |
|
"go-common/library/log" |
|
) |
|
|
|
// Dashborad insert dashboard info and logs. |
|
func (s *Service) Dashborad(c context.Context, d *publish.Dashboard) (err error) { |
|
var id int64 |
|
if id, err = s.dao.Dashborad(c, d); err != nil { |
|
log.Error("Dashborad() error(%v)", err) |
|
return |
|
} |
|
if len(d.Logs) > 0 && id > 0 { |
|
if _, err = s.dao.DashboradLogs(c, id, d.Logs); err != nil { |
|
log.Error("DashboradLogs() error(%v)", err) |
|
return |
|
} |
|
} |
|
return |
|
}
|
|
|