Browse Source

更新

master
huangjiajun 2 months ago
parent
commit
98a9c98772
4 changed files with 8 additions and 6 deletions
  1. +1
    -0
      app/md/md_medium.go
  2. +1
    -1
      app/svc/svc_deal_agent_amount.go
  3. +1
    -1
      app/svc/svc_deal_medium_amount.go
  4. +5
    -4
      app/svc/svc_medium_agent.go

+ 1
- 0
app/md/md_medium.go View File

@@ -22,6 +22,7 @@ type MediumListData struct {
LegalRepresentative string `json:"legal_representative" example:"法定代表人"`
Account string `json:"account" example:"媒体账号"`
BusinessLicenseAddress string `json:"business_license_address" example:"营业执照地址"`
BusinessLicenseImg string `json:"business_license_img" example:"营业执照图片"`
}
type MediumListSaveReq struct {
Username string `json:"username"`


+ 1
- 1
app/svc/svc_deal_agent_amount.go View File

@@ -107,7 +107,7 @@ func GetAgentAmount(session *xorm.Session, masterId string, agentId int, isForce
if err != nil && err.Error() != "redigo: nil returned" {
return
}
agentListDb := implement.NewAgentListDb(db.DBs[masterId])
agentListDb := implement.NewAgentListDb(db.Db)
agent, err1 := agentListDb.GetAgentListBySession(session, agentId)
if err1 != nil {
return amount, err1


+ 1
- 1
app/svc/svc_deal_medium_amount.go View File

@@ -107,7 +107,7 @@ func GetMediumAmount(session *xorm.Session, masterId string, mediumId int, isFor
if err != nil && err.Error() != "redigo: nil returned" {
return
}
mediumListDb := implement.NewMediumListDb(db.DBs[masterId])
mediumListDb := implement.NewMediumListDb(db.Db)
medium, err1 := mediumListDb.GetMediumListBySession(session, mediumId)
if err1 != nil {
return amount, err1


+ 5
- 4
app/svc/svc_medium_agent.go View File

@@ -85,7 +85,7 @@ func MediumBindAgentList(c *gin.Context) {

if data != nil {
for _, v := range data {
tmp := md.MediumListData{
tmp1 := md.MediumListData{
Id: utils.IntToStr(v.AgentWithMedium.Id),
MediumId: utils.IntToStr(v.AgentWithMedium.AgentId),
CompanyName: v.AgentList.CompanyName,
@@ -94,12 +94,13 @@ func MediumBindAgentList(c *gin.Context) {
Memo: v.AgentList.Memo,
LegalRepresentative: v.AgentList.LegalRepresentative,
BusinessLicenseAddress: v.AgentList.BusinessLicenseAddress,
BusinessLicenseImg: v.AgentList.BusinessLicenseImgUrl,
}
agent := NewAgentDb.GetSuperAdmin(v.AgentWithMedium.AgentId)
if agent != nil {
tmp.Account = agent.Username
tmp1.Account = agent.Username
}
list = append(list, tmp)
list = append(list, tmp1)
}
}
res := md.MediumListRes{
@@ -281,7 +282,7 @@ func GetAgentInfo(c *gin.Context, mediumId int) map[string]string {
"name": "",
}
NewAgentDb := implement2.NewAgentDb(MasterDb(c))
NewAgentListDb := implement.NewAgentListDb(MasterDb(c))
NewAgentListDb := implement.NewAgentListDb(db.Db)
medium := NewAgentDb.GetSuperAdmin(mediumId)
if medium != nil {
res["account"] = medium.Username


Loading…
Cancel
Save