Ver código fonte

更新

master
huangjiajun 1 mês atrás
pai
commit
2f6abf1fae
2 arquivos alterados com 7 adições e 5 exclusões
  1. +0
    -4
      app/hdl/hdl_data_center_generate_data.go
  2. +7
    -1
      app/svc/svc_data_center_generate_data.go

+ 0
- 4
app/hdl/hdl_data_center_generate_data.go Ver arquivo

@@ -211,10 +211,6 @@ func DataCenterTable(c *gin.Context) {
e.OutErr(c, err1.Code, err1.Error())
return
}
if req.StartDate == "" || req.EndDate == "" {
e.OutErr(c, 400, e.NewErr(400, "筛选时间不能为空"))
return
}
res := svc.DataCenterTable(c, req)
e.OutSuc(c, res, nil)
return


+ 7
- 1
app/svc/svc_data_center_generate_data.go Ver arquivo

@@ -414,7 +414,7 @@ func DataCenterSelectData(c *gin.Context) {
ids = append(ids, utils.IntToStr(v.MediumId))
}
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
}
_, ok := appMap[v.Platform]
@@ -442,6 +442,7 @@ func DataCenterTable(c *gin.Context, req md.DataCenterTableReq) md.DataCenterTab
var req1 md.DataCenterRecordReq
copier.Copy(&req1, &req)
nativeString, _ := comm(c, 0, req1)

list := make([]md.DataCenterTableData, 0)
tmpMap := make(map[string]md.DataCenterTableData)
for _, v := range nativeString {
@@ -481,6 +482,11 @@ func comm(c *gin.Context, isTotal int, req md.DataCenterRecordReq) ([]map[string
where %s %s
`
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 != "" {
where += " and app_id in('" + appId + "')"
}


Carregando…
Cancelar
Salvar