广告平台(站长下代理使用)
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.
 
 
 
 
 
 

32 regels
845 B

  1. package svc
  2. import (
  3. implement2 "code.fnuoos.com/zhimeng/model.git/src/implement"
  4. "code.fnuoos.com/zhimeng/model.git/src/super/implement"
  5. "github.com/gin-gonic/gin"
  6. )
  7. func GetMediumInfo(c *gin.Context, mediumId int) map[string]string {
  8. var res = map[string]string{
  9. "account": "",
  10. "name": "",
  11. }
  12. NewMediumDb := implement2.NewMediumDb(MasterDb(c))
  13. NewMediumListDb := implement.NewMediumListDb(MasterDb(c))
  14. medium := NewMediumDb.GetSuperAdmin(mediumId)
  15. if medium != nil {
  16. res["account"] = medium.Username
  17. res["name"] = medium.Memo
  18. }
  19. NewMediumList, _ := NewMediumListDb.GetMediumList(mediumId)
  20. if NewMediumList != nil {
  21. if NewMediumList.CompanyName != "" {
  22. res["name"] = NewMediumList.CompanyName
  23. }
  24. if NewMediumList.CompanyAbbreviation != "" {
  25. res["name"] = NewMediumList.CompanyAbbreviation
  26. }
  27. }
  28. return res
  29. }