|
12345678910111213141516171819202122232425262728293031 |
- package svc
-
- import (
- implement2 "code.fnuoos.com/zhimeng/model.git/src/implement"
- "code.fnuoos.com/zhimeng/model.git/src/super/implement"
- "github.com/gin-gonic/gin"
- )
-
- func GetMediumInfo(c *gin.Context, mediumId int) map[string]string {
- var res = map[string]string{
- "account": "",
- "name": "",
- }
- NewMediumDb := implement2.NewMediumDb(MasterDb(c))
- NewMediumListDb := implement.NewMediumListDb(MasterDb(c))
- medium := NewMediumDb.GetSuperAdmin(mediumId)
- if medium != nil {
- res["account"] = medium.Username
- res["name"] = medium.Memo
- }
- NewMediumList, _ := NewMediumListDb.GetMediumList(mediumId)
- if NewMediumList != nil {
- if NewMediumList.CompanyName != "" {
- res["name"] = NewMediumList.CompanyName
- }
- if NewMediumList.CompanyAbbreviation != "" {
- res["name"] = NewMediumList.CompanyAbbreviation
- }
- }
- return res
- }
|