|
123456789101112131415161718192021222324252627282930313233 |
- package svc
-
- import (
- db "code.fnuoos.com/zhimeng/model.git/src"
- implement2 "code.fnuoos.com/zhimeng/model.git/src/implement"
- "code.fnuoos.com/zhimeng/model.git/src/super/implement"
- "github.com/gin-gonic/gin"
- )
-
- func GetAgentInfo(c *gin.Context, mediumId int) map[string]string {
- var res = map[string]string{
- "account": "",
- "name": "",
- }
-
- NewAgentDb := implement2.NewAgentDb(db.Db)
- NewAgentListDb := implement.NewAgentListDb(db.Db)
- medium := NewAgentDb.GetSuperAdmin(mediumId)
- if medium != nil {
- res["account"] = medium.Username
- res["name"] = medium.Memo
- }
- NewAgentList, _ := NewAgentListDb.GetAgentList(mediumId)
- if NewAgentList != nil {
- if NewAgentList.CompanyName != "" {
- res["name"] = NewAgentList.CompanyName
- }
- if NewAgentList.CompanyAbbreviation != "" {
- res["name"] = NewAgentList.CompanyAbbreviation
- }
- }
- return res
- }
|