|
@@ -414,7 +414,7 @@ func DataCenterSelectData(c *gin.Context) { |
|
|
ids = append(ids, utils.IntToStr(v.MediumId)) |
|
|
ids = append(ids, utils.IntToStr(v.MediumId)) |
|
|
} |
|
|
} |
|
|
for _, v := range appList { |
|
|
for _, v := range appList { |
|
|
if utils.InArr(utils.IntToStr(v.MediumId), ids) == false { |
|
|
|
|
|
|
|
|
if utils.InArr(utils.IntToStr(v.MediumId), ids) == false && user.IsSuperAdministrator != 1 { |
|
|
continue |
|
|
continue |
|
|
} |
|
|
} |
|
|
_, ok := appMap[v.Platform] |
|
|
_, ok := appMap[v.Platform] |
|
@@ -442,6 +442,7 @@ func DataCenterTable(c *gin.Context, req md.DataCenterTableReq) md.DataCenterTab |
|
|
var req1 md.DataCenterRecordReq |
|
|
var req1 md.DataCenterRecordReq |
|
|
copier.Copy(&req1, &req) |
|
|
copier.Copy(&req1, &req) |
|
|
nativeString, _ := comm(c, 0, req1) |
|
|
nativeString, _ := comm(c, 0, req1) |
|
|
|
|
|
|
|
|
list := make([]md.DataCenterTableData, 0) |
|
|
list := make([]md.DataCenterTableData, 0) |
|
|
tmpMap := make(map[string]md.DataCenterTableData) |
|
|
tmpMap := make(map[string]md.DataCenterTableData) |
|
|
for _, v := range nativeString { |
|
|
for _, v := range nativeString { |
|
@@ -481,6 +482,11 @@ func comm(c *gin.Context, isTotal int, req md.DataCenterRecordReq) ([]map[string |
|
|
where %s %s |
|
|
where %s %s |
|
|
` |
|
|
` |
|
|
where := "is_generate_report=1 and uuid=" + c.GetString("mid") |
|
|
where := "is_generate_report=1 and uuid=" + c.GetString("mid") |
|
|
|
|
|
user := GetUser(c) |
|
|
|
|
|
mediumId := GetMediumIdStr(c, user.AdmId, "", "") |
|
|
|
|
|
if mediumId != "" { |
|
|
|
|
|
where += " and medium_id in('" + mediumId + "')" |
|
|
|
|
|
} |
|
|
if req.AppId != "" || req.Platform != "" { |
|
|
if req.AppId != "" || req.Platform != "" { |
|
|
where += " and app_id in('" + appId + "')" |
|
|
where += " and app_id in('" + appId + "')" |
|
|
} |
|
|
} |
|
|