Selaa lähdekoodia

更新

master
huangjiajun 3 viikkoa sitten
vanhempi
commit
7a5aadcb7c
1 muutettua tiedostoa jossa 21 lisäystä ja 2 poistoa
  1. +21
    -2
      app/svc/svc_data_center_generate_data.go

+ 21
- 2
app/svc/svc_data_center_generate_data.go Näytä tiedosto

@@ -14,6 +14,7 @@ import (
"fmt"
"github.com/gin-gonic/gin"
"github.com/jinzhu/copier"
"strings"
"time"
)

@@ -485,10 +486,28 @@ func comm(c *gin.Context, isTotal int, req md.DataCenterRecordReq) ([]map[string
user := GetUser(c)
mediumId := GetMediumIdStr(c, user.AdmId, "", "")
if mediumId != "" {
where += " and medium_id in('" + mediumId + "')"
ex := strings.Split(mediumId, ",")
str := ""
for _, v := range ex {
if str == "" {
str += "'" + v + "'"
} else {
str += ",'" + v + "'"
}
}
where += " and medium_id in(" + str + ")"
}
if req.AppId != "" || req.Platform != "" {
where += " and app_id in('" + appId + "')"
ex := strings.Split(appId, ",")
str := ""
for _, v := range ex {
if str == "" {
str += "'" + v + "'"
} else {
str += ",'" + v + "'"
}
}
where += " and app_id in(" + str + ")"
}
if req.AdType != "" {
where += " and ad_slot='" + req.AdType + "'"


Ladataan…
Peruuta
Tallenna