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

преди 3 месеца
преди 2 месеца
преди 3 месеца
преди 2 месеца
преди 3 месеца
123456789101112131415161718192021222324252627282930313233
  1. package svc
  2. import (
  3. db "code.fnuoos.com/zhimeng/model.git/src"
  4. implement2 "code.fnuoos.com/zhimeng/model.git/src/implement"
  5. "code.fnuoos.com/zhimeng/model.git/src/super/implement"
  6. "github.com/gin-gonic/gin"
  7. )
  8. func GetAgentInfo(c *gin.Context, mediumId int) map[string]string {
  9. var res = map[string]string{
  10. "account": "",
  11. "name": "",
  12. }
  13. NewAgentDb := implement2.NewAgentDb(db.Db)
  14. NewAgentListDb := implement.NewAgentListDb(db.Db)
  15. medium := NewAgentDb.GetSuperAdmin(mediumId)
  16. if medium != nil {
  17. res["account"] = medium.Username
  18. res["name"] = medium.Memo
  19. }
  20. NewAgentList, _ := NewAgentListDb.GetAgentList(mediumId)
  21. if NewAgentList != nil {
  22. if NewAgentList.CompanyName != "" {
  23. res["name"] = NewAgentList.CompanyName
  24. }
  25. if NewAgentList.CompanyAbbreviation != "" {
  26. res["name"] = NewAgentList.CompanyAbbreviation
  27. }
  28. }
  29. return res
  30. }