|
|
@@ -19,6 +19,12 @@ func SettleCenterList(c *gin.Context, req md.SettleCenterDataReq) md.SettleCente |
|
|
|
MediumList, total, _ := NewMediumSettlementDb.FindMediumSettlementList(c.GetString("mid"), utils.IntToStr(user.MediumId), "", "", "", req.StartTime, req.EndTime, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) |
|
|
|
data := make([]md.SettleCenterDataData, 0) |
|
|
|
if len(MediumList) > 0 { |
|
|
|
NewUserAppDomainDb := implement.NewUserAppDomainDb(db.Db) |
|
|
|
domain, _ := NewUserAppDomainDb.GetUserAppDomainByPlatform(utils.StrToInt(c.GetString("mid")), "medium") |
|
|
|
host := c.Request.Host |
|
|
|
if domain != nil { |
|
|
|
host = domain.Domain |
|
|
|
} |
|
|
|
for _, v := range MediumList { |
|
|
|
var tmp = md.SettleCenterDataData{ |
|
|
|
Id: utils.IntToStr(v.Id), |
|
|
@@ -32,6 +38,7 @@ func SettleCenterList(c *gin.Context, req md.SettleCenterDataReq) md.SettleCente |
|
|
|
Label: "预估", |
|
|
|
SettleFile: v.SettleFile, |
|
|
|
} |
|
|
|
tmp.DownUrl = "http://" + host + "/api/settle/file/down?id=" + utils.IntToStr(v.Id) |
|
|
|
if v.EndDate != "" && v.EndDate != "0000-00-00" { |
|
|
|
if v.EndDate != v.StartDate { |
|
|
|
tmp.TimeStr += "~" + v.EndDate |
|
|
@@ -88,6 +95,13 @@ func SettleCenterDetail(c *gin.Context, req md.CommDetailReq) md.SettleCenterDat |
|
|
|
tmp.TimeStr += "~" + data.EndDate |
|
|
|
} |
|
|
|
} |
|
|
|
NewUserAppDomainDb := implement.NewUserAppDomainDb(db.Db) |
|
|
|
domain, _ := NewUserAppDomainDb.GetUserAppDomainByPlatform(utils.StrToInt(c.GetString("mid")), "medium") |
|
|
|
host := c.Request.Host |
|
|
|
if domain != nil { |
|
|
|
host = domain.Domain |
|
|
|
} |
|
|
|
tmp.DownUrl = "http://" + host + "/api/settle/file/down?id=" + utils.IntToStr(data.Id) |
|
|
|
res := md.SettleCenterDataDetailRes{ |
|
|
|
Data: tmp, |
|
|
|
InvoiceCate: md.InvoiceCate, |
|
|
|