Selaa lähdekoodia

更新

master
huangjiajun 1 kuukausi sitten
vanhempi
commit
98a9c98772
4 muutettua tiedostoa jossa 8 lisäystä ja 6 poistoa
  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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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


Ladataan…
Peruuta
Tallenna